Lines Matching full:keyboard
78 * We need at least one entry each in order to initialize a keyboard
85 static keyboard_t **keyboard = &kbd_ini; variable
107 bcopy(keyboard, new_kbd, sizeof(*keyboard)*keyboards); in kbd_realloc_array()
109 free(keyboard, M_DEVBUF); in kbd_realloc_array()
110 keyboard = new_kbd; in kbd_realloc_array()
120 * Low-level keyboard driver functions
121 * Keyboard subdrivers, such as the AT keyboard driver and the USB keyboard
123 * and register it to the virtual keyboard driver `kbd'.
160 /* declare a new keyboard driver */
169 ("%s: keyboard driver list garbage detected", __func__)); in kbd_add_driver()
193 /* register a keyboard and associate it with a function table */
205 if (keyboard[index] == NULL) in kbd_register()
224 keyboard[index] = kbd; in kbd_register()
249 if (keyboard[kbd->kb_index] != kbd) in kbd_unregister()
263 keyboard[kbd->kb_index] = NULL; in kbd_unregister()
283 * Keyboard client functions
284 * Keyboard clients, such as the console driver `syscons' and the keyboard
285 * cdev driver, use these functions to claim and release a keyboard for
290 * find the keyboard specified by a driver name and a unit number
302 if (keyboard[i] == NULL) in kbd_find_keyboard2()
304 if (!KBD_IS_VALID(keyboard[i])) in kbd_find_keyboard2()
306 if (strcmp("*", driver) && strcmp(keyboard[i]->kb_name, driver)) in kbd_find_keyboard2()
308 if ((unit != -1) && (keyboard[i]->kb_unit != unit)) in kbd_find_keyboard2()
316 /* find the keyboard specified by a driver name and a unit number */
323 /* allocate a keyboard */
336 if (KBD_IS_BUSY(keyboard[index])) { in kbd_allocate()
339 keyboard[index]->kb_token = id; in kbd_allocate()
340 KBD_BUSY(keyboard[index]); in kbd_allocate()
341 keyboard[index]->kb_callback.kc_func = func; in kbd_allocate()
342 keyboard[index]->kb_callback.kc_arg = arg; in kbd_allocate()
343 kbdd_clear_state(keyboard[index]); in kbd_allocate()
390 /* get a keyboard structure */
396 if (keyboard[index] == NULL) in kbd_get_keyboard()
398 if (!KBD_IS_VALID(keyboard[index])) in kbd_get_keyboard()
400 return (keyboard[index]); in kbd_get_keyboard()
425 * Virtual keyboard cdev driver functions
426 * The virtual keyboard driver dispatches driver functions to
458 if (keyboard[kbd->kb_index] != kbd) in kbd_attach()
476 if (keyboard[kbd->kb_index] != kbd) in kbd_detach()
486 * Generic keyboard cdev driver functions
487 * Keyboard subdrivers may call these functions to implement common
548 * NOTE: even when we have successfully claimed a keyboard, in genkbdopen()
602 return (ENXIO); /* our keyboard has gone... */ in genkbdread()
663 revents = POLLHUP; /* the keyboard has gone */ in genkbdpoll()
689 /* the keyboard is going... */ in genkbd_event()
774 * Generic low-level keyboard functions
775 * The low-level functions in the keyboard subdriver may use these
804 case KDGKBINFO: /* get keyboard information */ in genkbd_commonioctl()
815 case KDGKBTYPE: /* get keyboard type */ in genkbd_commonioctl()
819 case KDGETREPEAT: /* get keyboard repeat rate */ in genkbd_commonioctl()
824 case GIO_KEYMAP: /* get keyboard translation table */ in genkbd_commonioctl()
829 case OGIO_KEYMAP: /* get keyboard translation table (compat) */ in genkbd_commonioctl()
842 case PIO_KEYMAP: /* set keyboard translation table */ in genkbd_commonioctl()
844 case OPIO_KEYMAP: /* set keyboard translation table (compat) */ in genkbd_commonioctl()
882 case GIO_KEYMAPENT: /* get keyboard translation table entry */ in genkbd_commonioctl()
891 case PIO_KEYMAPENT: /* set keyboard translation table entry */ in genkbd_commonioctl()