Hello guest! Login or Register
Construct 2 r90

Released Friday, May 11, 2012 at 2:01:09 PM

28mb for Windows XP, Vista & 7

Free Download
Download Manual

Coming Soon

Keyboard


The Keyboard object allows projects to respond to keyboard input.

Note on the modern web it is naïve to assume all users have a keyboard. Many users now browse the web with touch-screen devices that have no keyboard. (The Keyboard object also does not respond to input from on-screen keyboards on any modern touch devices.) Therefore if your game uses exclusively mouse or keyboard control, it is impossible to use on touch devices. See the Touch controls tutorial for an alternative control system.

Browser shortcut keys


In some browsers, some keys are shortcuts for browser actions. For example, space bar sometimes is a shortcut to scroll down the page. If any events exist for 'On key pressed' with a given key, Construct 2 blocks the browser from performing its normal action. For example, if you wish to prevent space bar scrolling down the page, add an empty 'On Space pressed' event, if you don't have one already.

Keyboard conditions


Key is down
True if a given keyboard key is currently being held down.

On any key pressed
Triggered when any keyboard key is pressed. Useful for title screens or cutscenes.

On key pressed
Triggered when a specific keyboard key is pressed.

On key released
Triggered when a specific keyboard key is released.

Keyboard actions


The Keyboard object does not have any actions.

Keyboard expressions


The Keyboard object does not have any expressions.

Previous Entry
Facebook
Next Entry
Kongregate

Feedback on this page
How useful was this page for you?
Do you have any suggestions for this page?