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?