Lines Matching refs:scancode
339 int pckbd_setkeycode(unsigned int scancode, unsigned int keycode) in pckbd_setkeycode() argument
341 if (scancode < SC_LIM || scancode > 255 || keycode > 127) in pckbd_setkeycode()
343 if (scancode < 128) in pckbd_setkeycode()
344 high_keys[scancode - SC_LIM] = keycode; in pckbd_setkeycode()
346 e0_keys[scancode - 128] = keycode; in pckbd_setkeycode()
350 int pckbd_getkeycode(unsigned int scancode) in pckbd_getkeycode() argument
353 (scancode < SC_LIM || scancode > 255) ? -EINVAL : in pckbd_getkeycode()
354 (scancode < 128) ? high_keys[scancode - SC_LIM] : in pckbd_getkeycode()
355 e0_keys[scancode - 128]; in pckbd_getkeycode()
358 int pckbd_translate(unsigned char scancode, unsigned char *keycode, in pckbd_translate() argument
364 if (scancode == 0xe0 || scancode == 0xe1) { in pckbd_translate()
365 prev_scancode = scancode; in pckbd_translate()
370 if (scancode == 0x00 || scancode == 0xff) { in pckbd_translate()
374 scancode &= 0x7f; in pckbd_translate()
382 if (prev_scancode == 0xe1 && scancode == 0x1d) { in pckbd_translate()
385 } else if (prev_scancode == 0x100 && scancode == 0x45) { in pckbd_translate()
411 if (scancode == 0x2a || scancode == 0x36) in pckbd_translate()
414 if (e0_keys[scancode]) in pckbd_translate()
415 *keycode = e0_keys[scancode]; in pckbd_translate()
420 scancode); in pckbd_translate()
425 } else if (scancode >= SC_LIM) { in pckbd_translate()
436 *keycode = high_keys[scancode - SC_LIM]; in pckbd_translate()
442 " - ignored\n", scancode); in pckbd_translate()
448 *keycode = scancode; in pckbd_translate()
465 int scancode = 0; in handle_at_scancode() local
480 scancode = keyval; in handle_at_scancode()
485 scancode = keyval; in handle_at_scancode()
496 if (esc1==2) scancode = brk | 0x1d; in handle_at_scancode()
499 if (esc1==1) scancode = brk | 0x45; in handle_at_scancode()
505 if (esc0==1) scancode = brk | 0x2a; in handle_at_scancode()
511 if (!scancode) scancode = brk | keycode_translate[keyval]; in handle_at_scancode()
514 if (!scancode) printk(KERN_INFO "keyboard: unexpected key code %02x\n",keyval); in handle_at_scancode()
517 handle_scancode(scancode,!(scancode&0x80)); in handle_at_scancode()