J
Joe B-W
Guest
Hi all,
Does anyone have much experience with using the keyboard_key_press and keyboard_key_release functions to simulate keyboard input?
Context: my students are making 4 player games with gamepads, and at some point we may convert these games to run on an arcade machine using an I_PAC (which converts the arcade controller input into keyboard in order to interface with a PC). For that to work, I either need to double up all of their code when I port it, or find some smart way of building in a gamepad input > keyboard input conversion that's running in the background. Something like Player 1 presses face button A > simulated keypress of keyboard b > ingame action. I'm leaning toward building the ports of the student projects after they're finished to avoid confusing them, but I just wanted to work out whether there was a simple non-intrusive solution I could build into our project templates before they start.
Now, I may be getting ahead of myself but I noticed we only have keyboard_key_press and keyboard_key_release but no equivalent for causing a key to act as if it was held... I guess my main technical question would be: if I trigger a keyboard_key_press every frame for 10 frames, does the system recognize it as "key was pressed" on the first frame and then "key was held down" for the following 9?
Thanks!
Does anyone have much experience with using the keyboard_key_press and keyboard_key_release functions to simulate keyboard input?
Context: my students are making 4 player games with gamepads, and at some point we may convert these games to run on an arcade machine using an I_PAC (which converts the arcade controller input into keyboard in order to interface with a PC). For that to work, I either need to double up all of their code when I port it, or find some smart way of building in a gamepad input > keyboard input conversion that's running in the background. Something like Player 1 presses face button A > simulated keypress of keyboard b > ingame action. I'm leaning toward building the ports of the student projects after they're finished to avoid confusing them, but I just wanted to work out whether there was a simple non-intrusive solution I could build into our project templates before they start.
Now, I may be getting ahead of myself but I noticed we only have keyboard_key_press and keyboard_key_release but no equivalent for causing a key to act as if it was held... I guess my main technical question would be: if I trigger a keyboard_key_press every frame for 10 frames, does the system recognize it as "key was pressed" on the first frame and then "key was held down" for the following 9?
Thanks!