KEYBOARDEVENT
KEY
This will allow you to listen for a particular keypress and carry out various actions.
Note: the enter and return key are represented by the KEY enter.
Example
INCLUDE arcade
AFUNCTION "updateText", "text"
$("#keytext").html(text);
END AFUNCTION
PRINT "Press either q or w",,"keytext"
KEYBOARDEVENT "q || Q"
GOTO updateText("q was pressed")
KEYBOARDEVENT "w || W"
GOTO updateText("w was pressed")
KEYBOARDEVENT "enter"
GOTO updateText("enter was pressed")
KEYBOARDEVENT "!w && !q && !W && !Q"
GOTO updateText("q and w were not pressed")
END KEYBOARDEVENT