Changeset 2391aaf in mainline for uspace/drv/usbhid/conv.c
- Timestamp:
- 2011-02-27T19:22:53Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5d4d98b
- Parents:
- c2fa801
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhid/conv.c
rc2fa801 r2391aaf 163 163 }; 164 164 165 unsigned int usb kbd_parse_scancode(int scancode)165 unsigned int usbhid_parse_scancode(int scancode) 166 166 { 167 // console_ev_type_t type;168 167 unsigned int key; 169 168 int *map = scanmap_simple; 170 169 size_t map_length = sizeof(scanmap_simple) / sizeof(int); 171 172 /*173 * ACK/NAK are returned as response to us sending a command.174 * We are not interested in them.175 */176 // if (scancode == SC_ACK || scancode == SC_NAK)177 // return;178 179 // if (scancode == 0xe0) {180 // ds = ds_e;181 // return;182 // }183 184 // switch (ds) {185 // case ds_s:186 // map = scanmap_simple;187 // map_length = sizeof(scanmap_simple) / sizeof(int);188 // break;189 // case ds_e:190 // map = scanmap_e0;191 // map_length = sizeof(scanmap_e0) / sizeof(int);192 // break;193 // default:194 // map = NULL;195 // map_length = 0;196 // }197 198 // ds = ds_s;199 200 // if (scancode & 0x80) {201 // scancode &= ~0x80;202 // type = KEY_RELEASE;203 // } else {204 // type = KEY_PRESS;205 // }206 170 207 171 if ((scancode < 0) || ((size_t) scancode >= map_length)) … … 210 174 key = map[scancode]; 211 175 212 if (scancode == 0x53) {213 usb_log_debug("\n\nWe have a NUM LOCK!, sending key %u\n\n", key);214 }215 216 if (scancode == 0x47) {217 usb_log_debug("\n\nWe have a SCROLL LOCK!, sending key %u\n\n", key);218 }219 220 if (scancode == 0x39) {221 usb_log_debug("\n\nWe have a CAPS LOCK!, sending key %u\n\n", key);222 }223 224 // if (key != 0)225 // kbd_push_ev(type, key);226 176 return key; 227 177 }
Note:
See TracChangeset
for help on using the changeset viewer.