I have a Microsoft Mobile Wedge keyboard. I've connected it to my Nexus 9 and after setting the language in the settings it works almost perfectly. Almost! There are 4 keys on it that don't work, because they're multi-keycode keys. They're the "magnifier glass"-key, the "3 dots on a ring"-key, the "black rectangle intersecting with rectangle border"-key and the "gears/settings"-key.
So far I've found out with
getevent -lt /dev/input/event4
that the Linux keycodes they send are
KEY_LEFTSHIFT
KEY_LEFTMETA
KEY_F21
KEY_LEFTALT
KEY_LEFTMETA
KEY_F21
KEY_LEFTCTRL
KEY_LEFTMETA
KEY_F21
KEY_LEFTMETA
KEY_F21
I've created the 2 files from their Generic.kl
and Generic.kcm
counterparts
/system/usr/keylayout/Vendor_045e_Product_0790.kl
/system/usr/keychars/Vendor_045e_Product_0790.kcm
and made sure with
dumpsys input
that they're used.
I tried to enable F21 in the layout first, but that didn't work because there's no Android keycode for F21. So I bound it to INSERT instead, because it's an unused key. Then I went into the character map and tried making an INSERT key (which is actually F21) and applying the right modifiers to it.
key INSERT {
base: 'a'
lmeta: 'A'
}
The above being for the key that only had 2 keycodes. Unfortunately this didn't work. Nothing happened. So now I'm here to pick your brain.
Does anyone know how to do multi-keycode keys?
Thank you very much in advance.
keycode_search