poliver
Member
OK, it's not hard to detect simultaneous key presses if you know which keys to expect.
but
I'm losing my mind trying to figure out how to get just the last keypresses.
I'm trying to detect last max 3 simultaneously pressed keys.
The built in variable keyboard_key returns a numerical code and is triggered i guess every frame.
The keyboard check functions use vk_ and ord("x") synthax.
What i've tried is detecting when keyboard_key is not 0 for the first key_press
THIS WORKS
AFTER THIS I DON'T KNOW WHAT TO DO
I want to break detection if
I want to detect the second key press
for this i check again if keycode != 0 and if keycode != first_key
THIS DOESN'T WORK DURING A FAST SIMULTANEOUS PRESS. ONLY DETECTS IF I DO IT SEQUENTIALLY.
doing same for third key
if keycode != 0 and if keycode != first_key and if keycode != second_key
THIS DOESN'T WORK DURING A FAST SIMULTANEOUS PRESS. ONLY DETECTS IF I DO IT SEQUENTIALLY.
I do have a generic keyboard but 3 keys should be fine. It works in other software so this must have something to do with my code.
but
I'm losing my mind trying to figure out how to get just the last keypresses.
I'm trying to detect last max 3 simultaneously pressed keys.
The built in variable keyboard_key returns a numerical code and is triggered i guess every frame.
The keyboard check functions use vk_ and ord("x") synthax.
What i've tried is detecting when keyboard_key is not 0 for the first key_press
THIS WORKS
AFTER THIS I DON'T KNOW WHAT TO DO
I want to break detection if
- three keys been pressed
- this first key is released =>
I want to detect the second key press
for this i check again if keycode != 0 and if keycode != first_key
THIS DOESN'T WORK DURING A FAST SIMULTANEOUS PRESS. ONLY DETECTS IF I DO IT SEQUENTIALLY.
doing same for third key
if keycode != 0 and if keycode != first_key and if keycode != second_key
THIS DOESN'T WORK DURING A FAST SIMULTANEOUS PRESS. ONLY DETECTS IF I DO IT SEQUENTIALLY.
I do have a generic keyboard but 3 keys should be fine. It works in other software so this must have something to do with my code.