diff options
Diffstat (limited to 'drivers/input/i8042.c')
-rw-r--r-- | drivers/input/i8042.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/input/i8042.c b/drivers/input/i8042.c index c7b1a7d885..57ece844d6 100644 --- a/drivers/input/i8042.c +++ b/drivers/input/i8042.c @@ -231,6 +231,11 @@ static const unsigned char usb_kbd_numkey_shifted[] = { '\r', 0x1b, '\b', '\t', ' ', '_', '+', '{', '}', '|', '~', ':', '"', '~', '<', '>', '?' }; +static const unsigned char usb_kbd_numkey_ctrled[] = { + '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', + '\n', 0x1b, '\b', '\t', ' ', '-', '=', '[', ']', + '\\', '#', ';', '\'', '`', ',', '.', '/' +}; @@ -601,6 +606,9 @@ static int usb_cook_scan_code(unsigned char usb_scan_code) if ((usb_scan_code > 0x1d) && (usb_scan_code < 0x3a)) { int shifted; + if (bits_modifiers & (LEFT_CNTR | RIGHT_CNTR)) + return usb_kbd_numkey_ctrled[usb_scan_code - 0x1e]; + /* Shift inverts Num Lock state */ shifted = (bits_modifiers & (LEFT_SHIFT | RIGHT_SHIFT)) != 0; if (bits_state & USB_KBD_NUMLOCK) |