key-as-keyword

key-code

key-coded?

key-modifiersclj

key-pressed?

raw-key

key-as-keyword

Arguments
[]
Docstring
Returns a keyword representing the currently pressed key. Modifier
keys are represented as: :up, :down, :left, :right, :alt, :control,
:shift, :command, :f1-24
Works only inside sketch functions?
Yes
Original Processing method
None. It is present only in Quil.

key-code

Arguments
[]
Docstring
The variable keyCode is used to detect special keys such as the UP,
DOWN, LEFT, RIGHT arrow keys and ALT, CONTROL, SHIFT. When checking
for these keys, it's first necessary to check and see if the key is
coded. This is done with the conditional (= (key) CODED).

The keys included in the ASCII specification (BACKSPACE, TAB, ENTER,
RETURN, ESC, and DELETE) do not require checking to see if they key
is coded, and you should simply use the key variable instead of
key-code If you're making cross-platform projects, note that the
ENTER key is commonly used on PCs and Unix and the RETURN key is
used instead on Macintosh. Check for both ENTER and RETURN to make
sure your program will work for all platforms.

For users familiar with Java, the values for UP and DOWN are simply
shorter versions of Java's KeyEvent.VK_UP and
KeyEvent.VK_DOWN. Other keyCode values can be found in the Java
KeyEvent reference.
Works only inside sketch functions?
Yes
Original Processing method
keyCode

key-coded?

Arguments
[c]
Docstring
Returns true if char c is a 'coded' char i.e. it is necessary to
fetch the key-code as an integer and use that to determine the
specific key pressed. See key-keyword.
Works only inside sketch functions?
No
Original Processing method
None. It is present only in Quil.

key-modifiersclj

Arguments
[]
Docstring
Set of key modifiers that were pressed when event happened.
Possible modifiers :ctrl, :alt, :shift, :meta. Not available in
ClojureScript.
Works only inside sketch functions?
Yes
Original Processing method
None. It is present only in Quil.

key-pressed?

Arguments
[]
Docstring
true if any key is currently pressed, false otherwise.
Works only inside sketch functions?
Yes
Original Processing method
keyPressed

raw-key

Arguments
[]
Docstring
Contains the value of the most recent key on the keyboard that was
used (either pressed or released).

For non-ASCII keys, use the keyCode variable. The keys included in
the ASCII specification (BACKSPACE, TAB, ENTER, RETURN, ESC, and
DELETE) do not require checking to see if they key is coded, and you
should simply use the key variable instead of keyCode If you're
making cross-platform projects, note that the ENTER key is commonly
used on PCs and Unix and the RETURN key is used instead on
Macintosh. Check for both ENTER and RETURN to make sure your program
will work for all platforms.
Works only inside sketch functions?
Yes
Original Processing method
key