One way to handle the d-pad is to listen for KeyboardEvent.KEY_DOWN
and KeyboardEvent.KEY_UP
and check for Keyboard.UP
, Keyboard.DOWN
, Keyboard.LEFT
, and Keyboard.RIGHT
. If the event's keyLocation
property is equal to KeyLocation.D_PAD
, the event originated from the d-pad and not the keyboard arrow keys.