(2013-07-28, 06:59)davilla Wrote: in the future, a patch or a PR will get more attention
davilla, I think the AndroidKey.cpp program needs further update fixing to make those new key mappings for SHIFT, ALT and CTRL keys to work properly.
I tried loading the latest nightly builds from Aug 02,2013 and Aug 03, 2013 and those keys still are not responding correctly. Assuming that the AndroidKey.cpp patch was included in those builds, then it seems like more needs to be changed or added to the code to make them recognized properly.
I think the next segment of code that needs to be added or updated is the part in the AndroidKey.cpp file where it is checking for "modifiers". Like here:
...
uint16_t modifiers = 0;
if (state & AMETA_ALT_LEFT_ON)
modifiers |= XBMCKMOD_LALT;
if (state & AMETA_ALT_RIGHT_ON)
modifiers |= XBMCKMOD_RALT;
if (state & AMETA_SHIFT_LEFT_ON)
modifiers |= XBMCKMOD_LSHIFT;
if (state & AMETA_SHIFT_RIGHT_ON)
modifiers |= XBMCKMOD_RSHIFT;
...
I think you may need to add checking now also for the SHIFT key states. Can you give it a try and see if it fixes the key recognitions?
I've only just begun to troubleshoot analyse the new keyboard symtoms I saw in the latest nightly build. But I found this.
In the Android source code file /mbx091512c/frameworks/base/core/java/android\view/KeyEvent.java I see definitions for META keys like this (and would guess that they have corresponding Android to XBMC names like "AMETA_SHIFT_LEFT_ON" and "AMETA_SHIFT_RIGHT_ON" for example):
See starting at around line number: 1856 of the KeyEvent.java I cut and pasted this from:
/**
* <p>Returns the state of the meta keys.</p>
*
* @return an integer in which each bit set to 1 represents a pressed
* meta key
*
* @see #isAltPressed()
* @see #isShiftPressed()
* @see #isSymPressed()
* @see #isCtrlPressed()
* @see #isMetaPressed()
* @see #isFunctionPressed()
* @see #isCapsLockOn()
* @see #isNumLockOn()
* @see #isScrollLockOn()
* @see #META_ALT_ON <-- I think we have to include checking these in the XBMC AndroidKey.cpp file. (i.e - add prefix "A" to become AMETA_ALT_ON Bill Yee)
* @see #META_ALT_LEFT_ON <-- I think we have to include checking these in the XBMC AndroidKey.cpp file. (i.e - add prefix "A" to become AMETA_ALT_LEFT_ON Bill Yee)
* @see #META_ALT_RIGHT_ON <-- I think we have to include checking these in the XBMC AndroidKey.cpp file. (i.e - add prefix "A" to become AMETA_ALT_RIGHT_ON Bill Yee)
* @see #META_SHIFT_ON <-- I think we have to include checking these in the XBMC AndroidKey.cpp file. ditto^
* @see #META_SHIFT_LEFT_ON <-- I think we have to include checking these in the XBMC AndroidKey.cpp file. ditto^
* @see #META_SHIFT_RIGHT_ON <-- I think we have to include checking these in the XBMC AndroidKey.cpp file. ditto^
* @see #META_SYM_ON
* @see #META_FUNCTION_ON
* @see #META_CTRL_ON <-- I think we have to include checking these in the XBMC AndroidKey.cpp file. ditto^
* @see #META_CTRL_LEFT_ON <-- I think we have to include checking these in the XBMC AndroidKey.cpp file. ditto^
* @see #META_CTRL_RIGHT_ON <-- I think we have to include checking these in the XBMC AndroidKey.cpp file. ditto^
* @see #META_META_ON
* @see #META_META_LEFT_ON
* @see #META_META_RIGHT_ON
* @see #META_CAPS_LOCK_ON <-- I think we have to include checking these in the XBMC AndroidKey.cpp file. ditto^
* @see #META_NUM_LOCK_ON
* @see #META_SCROLL_LOCK_ON
* @see #getModifiers
*/
I have not found where those XBMC Android variable names are defined at the moment but am guessing their definitions/declares must be somewhere (i.e. - AMETA_<key_press_description> ).
Update: Nevermind, I see that those AMETA_* keys (i.e. - AMETA_SHIFT_LEFT_ON) look to be setup in the Android source code directory ./frameworks/base/libs/ui/KeyCharacterMap.cpp program. Must be something else why the SHIFT keys did not seem to work for me with the nightly build I tried.