Add handling of 0xe0xx keycodes to pxa2xx_driver.
Extended keycodes in keymap should be marked with most significant
bit set (i.e. 0x80). Without this patch it's not possible to handle
i.e. cursor keys.
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
qemu_irq irq;
struct keymap *map;
int pressed_cnt;
+ int alt_code;
uint32_t kpc;
uint32_t kpdk;
int row, col, rel, assert_irq = 0;
uint32_t val;
+ if (keycode == 0xe0) {
+ kp->alt_code = 1;
+ return;
+ }
+
if(!(kp->kpc & KPC_ME)) /* skip if not enabled */
return;
rel = (keycode & 0x80) ? 1 : 0; /* key release from qemu */
keycode &= ~(0x80); /* strip qemu key release bit */
+ if (kp->alt_code) {
+ keycode |= 0x80;
+ kp->alt_code = 0;
+ }
row = kp->map[keycode].row;
col = kp->map[keycode].column;