If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Course: Unlisted resources area > Unit 2

Lesson 1: ProcessingJS documentation

keyCode

A global variable that represents the last key pressed. Used to check for special keys such as the UP, DOWN, LEFT, RIGHT arrow keys and ALT, CONTROL, and SHIFT.
Do not use this to check for keys other than the special keys listed above, it will not work all of the time.

Want to join the conversation?

No posts yet.