Lines Matching refs:key

84 	"kbtrans (key translation)"
154 * and up/down key codes are reported.
406 /* Scan table of down key stations */
473 * When a key is pressed or released, the hardware module should
474 * call kbtrans, passing the key number and its new
482 kbtrans_key_t key,
505 if (key == (kbtrans_key_t)kp->k_abort1 ||
506 key == (kbtrans_key_t)kp->k_abort1a) {
509 upper->kbtrans_streams_abort1_key = key;
512 /* Shift key needs to be sent to upper immediately */
513 if (key == (kbtrans_key_t)kp->k_newabort1 ||
514 key == (kbtrans_key_t)kp->k_newabort1a) {
517 upper->kbtrans_streams_new_abort1_key = key;
523 key == (kbtrans_key_t)kp->k_abort2) {
536 key == (kbtrans_key_t)kp->k_newabort2) {
547 kbtrans_processkey(lower, upper->kbtrans_streams_callback, key, state);
926 * Since this only affects any subsequent key presses,
949 * Since this only affects any subsequent key presses,
1166 * If a key is held down, this function is set up to be called
1176 "kbtrans_rpt: repeat key %X\n",
1201 * Cancel the repeating key
1241 * Used for expanding a function key to the ascii equivalent
1336 " key=%d", key_station));
1340 /* Scan table of down key stations */
1383 DPRINTF(PRINT_L0, PRINT_MASK_ALL, (NULL, "RELEASE key=%d\n",
1392 /* Scan table of down key stations */
1406 * for the same key station in the case of the kbtrans_rpt
1554 * key is pressed. This code will just send the scancode up the
1558 kbtrans_untrans_keypressed_raw(struct kbtrans *upper, kbtrans_key_t key)
1567 fe.id = (unsigned short)key;
1573 kbtrans_queuepress(upper, key, &fe);
1579 * and a key is released. This code will just send the scancode up
1583 kbtrans_untrans_keyreleased_raw(struct kbtrans *upper, kbtrans_key_t key)
1586 * Deal with a key released event.
1588 kbtrans_keyreleased(upper, key);
1593 * To compose the key sequences for virtual terminal switching.
1615 * when it is a kind of arrow key as indicated by is_arrow_key,
1616 * otherwise it indicates a function key and keyid is the number
1617 * corresponding to that function key.
1662 * This is the code if we are in TR_ASCII mode and a key
1664 * is specific to ASCII key translation.
1671 kbtrans_key_t key,
1681 * Based on the type of key, we may need to do some ASCII
1724 * We need to expand this key to get the ascii
1802 * This is the function if we are in TR_ASCII mode and a key
1805 * checking 'Alt/AltGraph' release key in order to reset the state
1806 * of vt switch key sequence.
1810 kbtrans_ascii_keyreleased(struct kbtrans *upper, kbtrans_key_t key)
1812 if (key == KB_SCANCODE_ALT || key == KB_SCANCODE_ALTGRAPH) {
1820 * translation module has decided that a key needs to be repeated.
1827 kbtrans_key_t key)
1833 * key to repeat.
1838 * Set the value of the key to be repeated.
1840 lower->kbtrans_repeatkey = key;
1843 * Start the timeout for repeating this key. kbtrans_rpt will
1844 * be called to repeat the key.
1852 * This is the function if we are in TR_EVENT mode and a key
1854 * is specific to EVENT key translation.
1860 kbtrans_key_t key,
1868 * Based on the type of key, we may need to do some EVENT
1882 kbtrans_keypressed(upper, key, &fe, fe.id);
1895 kbtrans_keypressed(upper, key, &fe, fe.id);
1915 kbtrans_keypressed(upper, key, &fe, fe.id);
1918 * Function key events can be expanded
1922 * if a function key event is not used
1963 kbtrans_keypressed(upper, key, &fe, fe.id);
1966 * Keypad key events can be expanded
1970 * if a keypad key event is not used
2010 * This is the function if we are in TR_EVENT mode and a key
2015 kbtrans_trans_event_keyreleased(struct kbtrans *upper, kbtrans_key_t key)
2018 * Mark the key as released and send an event upstream.
2020 kbtrans_keyreleased(upper, key);
2026 * translation module has decided that a key needs to be repeated.
2027 * We will set a timeout to retranslate the repeat key.
2033 kbtrans_key_t key)
2048 * key to repeat.
2053 * Set the value of the key to be repeated.
2055 lower->kbtrans_repeatkey = key;
2058 * Start the timeout for repeating this key. kbtrans_rpt will
2059 * be called to repeat the key.
2066 * Administer the key tables.
2109 kbtrans_setkey(struct kbtrans_lower *lower, struct kiockey *key, cred_t *cr)
2119 if (key->kio_station >= kp->k_keymap_size)
2127 tablemask = key->kio_tablemask;
2139 kp->k_abort1 = key->kio_station;
2142 kp->k_abort1a = key->kio_station;
2145 kp->k_abort2 = key->kio_station;
2154 ke = kbtrans_find_entry(lower, (uint_t)tablemask, key->kio_station);
2158 if (key->kio_entry >= (uchar_t)OLD_STRING &&
2159 key->kio_entry <= (uchar_t)(OLD_STRING + 15)) {
2160 strtabindex = key->kio_entry - OLD_STRING;
2161 bcopy(key->kio_string,
2166 entry = key->kio_entry;
2208 kbtrans_getkey(struct kbtrans_lower *lower, struct kiockey *key)
2217 if (key->kio_station >= kp->k_keymap_size)
2223 switch (key->kio_tablemask) {
2225 key->kio_station = kp->k_abort1;
2228 key->kio_station = kp->k_abort1a;
2231 key->kio_station = kp->k_abort2;
2235 ke = kbtrans_find_entry(lower, (uint_t)key->kio_tablemask,
2236 key->kio_station);
2243 key->kio_entry =
2248 key->kio_entry = (ushort_t)OLD_ISOCHAR; /* you lose */
2250 key->kio_entry = (ushort_t)entry;
2256 key->kio_string, KTAB_STRLEN);
2267 kbtrans_skey(struct kbtrans_lower *lower, struct kiockeymap *key, cred_t *cr)
2275 if (key->kio_station >= kp->k_keymap_size) {
2284 switch (key->kio_tablemask) {
2291 switch (key->kio_tablemask) {
2293 kp->k_abort1 = key->kio_station;
2296 kp->k_abort1a = key->kio_station;
2299 kp->k_abort2 = key->kio_station;
2305 ke = kbtrans_find_entry(lower, (uint_t)key->kio_tablemask,
2306 key->kio_station);
2310 if (key->kio_entry >= STRING &&
2311 key->kio_entry <= (ushort_t)(STRING + 15)) {
2312 strtabindex = key->kio_entry-STRING;
2313 bcopy(key->kio_string,
2318 *ke = key->kio_entry;
2329 kbtrans_gkey(struct kbtrans_lower *lower, struct kiockeymap *key)
2337 if (key->kio_station >= kp->k_keymap_size)
2343 switch (key->kio_tablemask) {
2345 key->kio_station = kp->k_abort1;
2348 key->kio_station = kp->k_abort1a;
2351 key->kio_station = kp->k_abort2;
2355 ke = kbtrans_find_entry(lower, (uint_t)key->kio_tablemask,
2356 key->kio_station);
2360 key->kio_entry = *ke;
2362 if (key->kio_entry >= STRING &&
2363 key->kio_entry <= (ushort_t)(STRING + 15)) {
2364 strtabindex = key->kio_entry-STRING;
2366 key->kio_string, KTAB_STRLEN);