threerings / playn

Legacy 1.x version of PlayN library.
http://playn.io/
Apache License 2.0
195 stars 66 forks source link

Detecting keyboard modifiers (Shift, Alt, Ctrl, etc) #80

Closed BenDol closed 9 years ago

BenDol commented 9 years ago

I can't find out how to detect keyboard modifier clicks, if there isn't a way to do it, perhaps it could be implemented since its a very common feature required in game design.

I would have expected the modifiers to be returned in the Keyboard.Event

Cheers!

samskivert commented 9 years ago

Right now PlayN does not report the up/down state of the modifier keys. You can listen for, for example, a Key pressed event with Key.SHIFT and note that the shift key is down, and then listen for the Key.SHIFT released event and note that it's no longer down.