User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915
Hi
I have implemented a keyboard listener based on
org.eclipse.swt.events.KeyListener in a SWT application. The program is
a game and i am tracking the keys 'a', 'w', 's' and 's' to move a
character on a canvas.
If i press two keys, and then release them, i seem to only get one call
to the keyReleased() function. Thus my game gets confused and my
character keeps moving even when keys are released.
Is there another way i can inspect the state of the keyboard in SWT
which would be more reliable? Can anyone recommend a proper way to
achieve the desired behavior?