Syntax

on arrowKey direction
  if direction is left then
    ...
  else
    pass arrowKey
  end if
end arrowKey

Explanation

Whenever you press one of the arrow keys on the keyboard, the current text field first receives a keyDown message, and if that message is not handled by anyone (or passed after handling it), an arrowKey message is generated instead.

Possible directions to be passed as the first parameter are "left", "up", "right" or "down".

See Also