Done. That was a pile of work because it is low level stuff so it had to be implemented for Amiga, Windows, Linux, Mac OS (Carbon), Mac OS (Cocoa), Android, and iOS separately. Since Hollywood's original key event handler is incompatible with modifier keys, there are two new event handlers now: OnRawKeyDown and OnRawKeyUp. With these new handlers it's finally possible to listen to combinations of normal and modifier keys now too.
Code: Select all
- New: Introducing raw key support; this finally allows you to listen to combinations of normal
keys and modifier keys like SHIFT, ALT, CTRL, and CMD; to get notified about raw key events,
install the new event handlers "OnRawKeyDown" and "OnRawKeyUp"; the "Key" field of the event
message will contain either a character in the range from A-Z (always upper case), 0-9,
NP0-NP9, NPDEC, NPADD, NPSUB, NPMUL, NPDIV (NP = numpad), one of the Hollywood key definitions
like UP, DOWN, RIGHT, etc. or modifier keys like LSHIFT, RSHIFT, LCONTROL, etc.; note that
in contrast to "OnKeyDown" and "OnKeyUp", "OnRawKeyDown" and "OnRawKeyUp" will also trigger
when a modifier key is pressed or released on its own; also note that for the space key you
will get a key named "SPACE" instead of " " and for the return and enter keys the key that
is generated will be "RETURN" or "ENTER" instead of a linefeed as it is the case with the
"OnKeyDown" and "OnKeyUp" events; finally, the message that is sent to your event callback
will also contain a field named "Modifiers" which contains a bitmask of the modifiers which
were down at the time the key was pressed; this is just for your convenience; of course you
can also call IsKeyDown() to check which modifiers are down