Pep Andorra
Member
Hello,
I am very confused with the keyboard workflow.
I have two main objects:
- obj_button: simply a button to "close" an obj_window that sends the Escape key
With this code:
- obj_control (used to control keyboard input)
In the event 'Step' I put this code:
Only 80% of tests work well. In the remaining 20%. I see at the exit:
"Press the ESC key", but not "Key Escape Process ..."
I move the code of the event 'Step' code and put in the 'Key Presses -Escape' event without any improvement.
If I press directly the 'Escape' key It continue to work only sometimes!
It seems like sometimes the keyboard input is emptied beetween the key press and the key check.
I hope you can help me to understand whats happen.
I am very confused with the keyboard workflow.
I have two main objects:
- obj_button: simply a button to "close" an obj_window that sends the Escape key
With this code:
GML:
show_debug_message ("Press ESC");
keyboard_key_press (vk_escape);
In the event 'Step' I put this code:
Code:
if keyboard_check_pressed (vk_escape) {
show_debug_message ("Key escape processing ...");
"Press the ESC key", but not "Key Escape Process ..."
I move the code of the event 'Step' code and put in the 'Key Presses -Escape' event without any improvement.
If I press directly the 'Escape' key It continue to work only sometimes!
It seems like sometimes the keyboard input is emptied beetween the key press and the key check.
I hope you can help me to understand whats happen.