tags:

views:

72

answers:

1

Hi,

I am catching keys for bindings, so far most characters work fine, until I reached the directional keys (up down left right)

My code for catching other keys are:

KeyStroke key_3 = KeyStroke.getKeyStroke("3");

How do I catch the directional keys?

Thanks!

A: 
KeyStroke.getKeyStroke("UP")

and you can specify the ctrl and shift versions with

KeyStroke.getKeyStroke("control UP")
KeyStroke.getKeyStroke("shift UP"
Peter