Changes in uspace/drv/usbhid/conv.c [66d5062:2391aaf] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhid/conv.c
r66d5062 r2391aaf 36 36 #include <io/keycode.h> 37 37 #include <stdint.h> 38 #include <stdio.h> 39 #include <usb/debug.h> 38 40 #include "conv.h" 39 41 … … 141 143 //[0xe7] = KC_R // TODO: right GUI 142 144 145 [0x53] = KC_NUM_LOCK, 146 [0x54] = KC_NSLASH, 147 [0x55] = KC_NTIMES, 148 [0x56] = KC_NMINUS, 149 [0x57] = KC_NPLUS, 150 [0x58] = KC_NENTER, 151 [0x59] = KC_N1, 152 [0x5a] = KC_N2, 153 [0x5b] = KC_N3, 154 [0x5c] = KC_N4, 155 [0x5d] = KC_N5, 156 [0x5e] = KC_N6, 157 [0x5f] = KC_N7, 158 [0x60] = KC_N8, 159 [0x61] = KC_N9, 160 [0x62] = KC_N0, 161 [0x63] = KC_NPERIOD 162 143 163 }; 144 164 145 unsigned int usb kbd_parse_scancode(int scancode)165 unsigned int usbhid_parse_scancode(int scancode) 146 166 { 147 // console_ev_type_t type;148 167 unsigned int key; 149 168 int *map = scanmap_simple; 150 169 size_t map_length = sizeof(scanmap_simple) / sizeof(int); 151 152 /*153 * ACK/NAK are returned as response to us sending a command.154 * We are not interested in them.155 */156 // if (scancode == SC_ACK || scancode == SC_NAK)157 // return;158 159 // if (scancode == 0xe0) {160 // ds = ds_e;161 // return;162 // }163 164 // switch (ds) {165 // case ds_s:166 // map = scanmap_simple;167 // map_length = sizeof(scanmap_simple) / sizeof(int);168 // break;169 // case ds_e:170 // map = scanmap_e0;171 // map_length = sizeof(scanmap_e0) / sizeof(int);172 // break;173 // default:174 // map = NULL;175 // map_length = 0;176 // }177 178 // ds = ds_s;179 180 // if (scancode & 0x80) {181 // scancode &= ~0x80;182 // type = KEY_RELEASE;183 // } else {184 // type = KEY_PRESS;185 // }186 170 187 171 if ((scancode < 0) || ((size_t) scancode >= map_length)) … … 189 173 190 174 key = map[scancode]; 191 // if (key != 0) 192 // kbd_push_ev(type, key); 175 193 176 return key; 194 177 }
Note:
See TracChangeset
for help on using the changeset viewer.