Lines Matching refs:scancode

264 int pckbd_setkeycode(unsigned int scancode, unsigned int keycode)  in pckbd_setkeycode()  argument
266 if (scancode < SC_LIM || scancode > 255 || keycode > 127) in pckbd_setkeycode()
268 if (scancode < 128) in pckbd_setkeycode()
269 high_keys[scancode - SC_LIM] = keycode; in pckbd_setkeycode()
271 e0_keys[scancode - 128] = keycode; in pckbd_setkeycode()
275 int pckbd_getkeycode(unsigned int scancode) in pckbd_getkeycode() argument
278 (scancode < SC_LIM || scancode > 255) ? -EINVAL : in pckbd_getkeycode()
279 (scancode < 128) ? high_keys[scancode - SC_LIM] : in pckbd_getkeycode()
280 e0_keys[scancode - 128]; in pckbd_getkeycode()
283 static int do_acknowledge(unsigned char scancode) in do_acknowledge() argument
291 if (scancode == KBD_REPLY_ACK) { in do_acknowledge()
295 } else if (scancode == KBD_REPLY_RESEND) { in do_acknowledge()
303 scancode); in do_acknowledge()
309 int pckbd_translate(unsigned char scancode, unsigned char *keycode, in pckbd_translate() argument
315 if (scancode == 0xe0 || scancode == 0xe1) { in pckbd_translate()
316 prev_scancode = scancode; in pckbd_translate()
321 if (scancode == 0x00 || scancode == 0xff) { in pckbd_translate()
326 scancode &= 0x7f; in pckbd_translate()
334 if (prev_scancode == 0xe1 && scancode == 0x1d) { in pckbd_translate()
337 } else if (prev_scancode == 0x100 && scancode == 0x45) { in pckbd_translate()
363 if (scancode == 0x2a || scancode == 0x36) in pckbd_translate()
366 if (e0_keys[scancode]) in pckbd_translate()
367 *keycode = e0_keys[scancode]; in pckbd_translate()
372 scancode); in pckbd_translate()
377 } else if (scancode >= SC_LIM) { in pckbd_translate()
388 *keycode = high_keys[scancode - SC_LIM]; in pckbd_translate()
394 " - ignored\n", scancode); in pckbd_translate()
400 *keycode = scancode; in pckbd_translate()
443 static inline void handle_mouse_event(unsigned char scancode) in handle_mouse_event() argument
448 if (scancode == AUX_ACK) { in handle_mouse_event()
454 else if(scancode == AUX_RECONNECT2 && prev_code == AUX_RECONNECT1 in handle_mouse_event()
462 prev_code = scancode; in handle_mouse_event()
463 add_mouse_randomness(scancode); in handle_mouse_event()
467 queue->buf[head] = scancode; in handle_mouse_event()
480 static inline void handle_keyboard_event(unsigned char scancode) in handle_keyboard_event() argument
484 if (do_acknowledge(scancode)) in handle_keyboard_event()
485 handle_scancode(scancode, !(scancode & 0x80)); in handle_keyboard_event()
503 unsigned char scancode; in handle_kbd_event() local
505 scancode = kbd_read_input(); in handle_kbd_event()
515 handle_mouse_event(scancode); in handle_kbd_event()
517 handle_keyboard_event(scancode); in handle_kbd_event()