Skip to content Skip to sidebar Skip to footer

Can't Get Meta State From Android Keyevent

Looks silly, but I can't get meta state out of KeyEvent, accessed from onKeyListener. Tried with all keyboards I have and with emulators. Whether or not Shift, Ctrl, etc keys are p

Solution 1:

Yes, it's really about android configuration file.

You modify TAB entry in /system/usr/kychars/Generic.kcm (or the file for corresponding vendor) and add a line for shift, as the following:

key TAB {
    label:                              '\t'
    base:                               '\t'
    shift:                              '\t'
    ctrl, alt, meta:                    none
}

Some devices uses qwerty.kcm, which has the shift line alaready present. They should work OK without intrusion. BTW, unicode has provides a special code \u21B9 for Shift+TAB, but it might not be recognised by Android.

Post a Comment for "Can't Get Meta State From Android Keyevent"