Discord
Login
Community
DARK THEME

Keyboard input

How do I detect which key am i pressing like for example i press E and i get that i pressed E

It's inside the docs, if-check keyboard.A to check if you hold A, keyboard.press.A is true for the frame you started pressing the button, otherwise false, keyboard.release.A does the same but the frame you released the button.

For the case you want to see which are currently pressed, without specifying which one, use a for loop to iterate through all items in the keyboard object, and check if they are true.

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community