Capture keyboard key or scan code

Get help using Construct 2

Post » Mon Oct 31, 2011 6:09 pm

I have been trying to capture a player-pressed key from the keyboard, for the purpose of allowing the player to select their desired key-mappings in a game. I tried searching the forums, but only found references in the CC sections.

I imagine something working with the Keyboard plug-in, using the OnAnyKeyPressed condition, then setting a variable (global, local, or instance) to either the ASCII code or the keyboard scan code. I would imagine the scan code would be more useful, so that non-alpha keys could be mapped.

Something like: On Keyboard.OnAnyKeypressed --> varKeyPressed = Keyboard.KeyPressed.

Unless I am missing something, this functionality doesn't exist. I was wondering if this was intentional due to some technical reason, or if it just hasn't been addressed yet.

Has anyone figured out a work-around, or created a plug-in for this?

Don't see the fnords and they won't eat you!
Posts: 326
Reputation: 11,986

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 0 guests