I've got a hardware USB keyboard plugged into an Android device running a NEWT backed application.
I've noticed that some keys don't seem to work the same when running a Linux desktop version of the same app, namely the following keys which are of interest to me:
Couldn't test with 2.3.2 as my android app wouldn't work at all anymore, it couldn't find the libglugen native libraries anymore, has the build process changed for building an Android JOGL app in 2.3.2 vs 2.3.1?
I've had chance to have a proper dig around with regards to my original question, the KeyEvents:
In short, it looks like there are a few android.view.KeyEvent constants that aren't converted into a corresponding com.jogamp.newt.event.KeyEvent constant & the event appears to be being dropped before it makes it to the com.jogamp.newt.event.KeyListener interface implementation as I don't receive a callback for the affect key codes below.
I've had a look at the jogamp.newt.driver.android.event.AndroidNewtEventFactory at master and spotted the aKeyCode2NewtKeyCode method which appears to convert from the android KeyEvent type to the newt KeyEvent type but there isn't any mention of a few keys & these are the ones we've had issues with - which are, when using a hardware keyboard:
KEYCODE_MOVE_HOME - 'Home' key
KEYCODE_MOVE_END - 'End' key
KEYCODE_INSERT - 'Insert' key
KEYCODE_FORWARD_DEL 'Delete' key
KEYCODE_DPAD_UP - up arrow key
KEYCODE_DPAD_DOWN - down arrow key
KEYCODE_DPAD_LEFT - left arrow key
KEYCODE_DPAD_RIGHT - right arrow key
KEYCODE_GRAVE - the ` key
KEYCODE_NUMLOCK - 'Num Lock' key
KEYCODE_NUMPAD_DIVIDE - the num-pad / key
KEYCODE_NUMPAD_MULTIPLY - the num-pad * key
KEYCODE_NUMPAD_SUBSTRACT - the num-pad - key
KEYCODE_NUMPAD_ADD - the num-pad + key
KEYCODE_NUMPAD_DOT - the num-pad 'Del' or '.' key
There may be more as these are just the ones I'm trying to use.
Also at line 148 of AndroidNewtEventFactory the aKeyCode2NewtKeyCode method attempts to convert KEYCODE_HOME to VK_HOME but this should be KEYCODE_MOVE_HOME to VK_HOME as the prior looks to be linked to firing the 'home itent':
I've written a converter similar to that in AndroidNewtEventFactory for the key code list above for my use case so I'm happy but thought it best to report back in case any of this was of interest to yourselves - also in-case I may have gotten things wrong and done something I needn't have... XD