Is there an easy way to get the corresponding keydata (keycode combination) for some value in that enum?
I cannot find one, and creating a switch statement for all those is a bit overkill…
The integer values of the enum elements are not keycodes, but some ‘unknown’ big numbers, so simply casting to int won’t work.
The lower 4 bytes are the key and the upper 4 bytes are a mask for Shift, Ctrl and Alt-Key, So you can get the KeyCode with something like this:
Will output
46which is the code for del key.