diff options
Diffstat (limited to 'skey.c')
-rw-r--r-- | skey.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -176,6 +176,7 @@ int processkey(int row, int column, int state) { if ((KEYSTATE_PHYS & keystate[row][column]) && !state) { printk(KERN_INFO "skey: falling edge detected for r:%d,c:%d\n", row, column); if (!stickymode) { + printk(KERN_INFO "skey: stickymode off with falling edge, reporting key up with keycode %d\n", skey_keymap[current_keymap][row][column]); //reports key up input_report_key(skey_dev, skey_keymap[current_keymap][row][column], 0); input_sync(skey_dev); @@ -190,25 +191,31 @@ int processkey(int row, int column, int state) { */ switch (skey_keymap[current_keymap][row][column]) { case KEY_ALPHAMAP: + printk(KERN_INFO "skey: changing to keymap ALPHA\n"); current_keymap = 0; return 0; break; case KEY_NUMBERMAP: + printk(KERN_INFO "skey: changing to keymap NUM\n"); current_keymap = 1; return 0; break; case KEY_SPECIALMAP: + printk(KERN_INFO "skey: changing to keymap SPECIAL\n"); current_keymap = 2; return 0; break; case KEY_STICKYMAP: + printk(KERN_INFO "skey: toggling stickymode\n"); stickymode = !stickymode; if (!stickymode) { clearkeystate(); + printk(KERN_INFO "skey: cleaned stickmode states\n"); } return 0; break; case KEY_MS_2ND: + printk(KERN_INFO "skey: toggling MS_2ND\n"); if (current_keymap == 2) { current_keymap = 3; } else if (current_keymap == 3) { @@ -249,14 +256,17 @@ int processkey(int row, int column, int state) { } //if it's stickymode, toggle the state stored and send corresponding vent if (stickymode) { + printk(KERN_INFO "skey: stickymoe on with rising edge\n"); //it was high before, so now it's being toggled off if (keystate[row][column] & keystate_bitmask) { + printk(KERN_INFO "skey: stickymode sending key up with code %d\n", skey_keymap[current_keymap][row][column]); input_report_key(skey_dev, skey_keymap[current_keymap][row][column], 0); input_sync(skey_dev); keystate[row][column] = (~keystate_bitmask) & keystate[row][column]; //it was low before, so now it's being toggled on } else { + printk(KERN_INFO "skey: stickymode sending key down with code %d\n", skey_keymap[current_keymap][row][column]); input_report_key(skey_dev, skey_keymap[current_keymap][row][column], 1); input_sync(skey_dev); keystate[row][column] = keystate_bitmask | keystate[row][column]; @@ -264,6 +274,7 @@ int processkey(int row, int column, int state) { } //otherwise just send a key down event } else { + printk(KERN_INFO "skey:skey rising edge w/o stickymode, sending key down with keycode %d\n", skey_keymap[current_keymap][row][column]); input_report_key(skey_dev, skey_keymap[current_keymap][row][column], 1); input_sync(skey_dev); } |