Capture keyboard key or scan code

0 favourites
  • 1 posts
From the Asset Store
5 levels with simple coding Source-code (.c3p) + HTML5 Exported
  • 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?

    Thanks!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)