Hi Jiri,
By the way, do you know how to use the Key.Modifier properly? I don't quite understand the reason it's there.
Again, this functionality delegates straight to Java, namely the bit-masks in java.awt.event.InputEvent. I think the reason for the Key.Modifier module is to expose these constants in an idiomatic Scala style, ie. not all capitals and underscores.
You use the 'modifiers' integer by using the bit-wise operators:
val ev: java.awt.event.InputEvent = ...
int mod = ev.getModifiers()
val hasAlt = (mod & Key.Modifier.Alt) != 0
val hasControl = (mod & Key.Modifier.Control) != 0
Bitfields always remind me of C++ :)
Cheers,
Ken