Lines Matching refs:key

890     int	    key;	// Special key code or ascii value  member
1089 simplify_key(int key, int *modifiers) in simplify_key() argument
1098 if (key == TAB && (*modifiers & MOD_MASK_SHIFT)) in simplify_key()
1103 key0 = KEY2TERMCAP0(key); in simplify_key()
1104 key1 = KEY2TERMCAP1(key); in simplify_key()
1115 return key; in simplify_key()
1122 handle_x_keys(int key) in handle_x_keys() argument
1124 switch (key) in handle_x_keys()
1143 return key; in handle_x_keys()
1274 int key; in trans_special() local
1276 key = find_special_key(srcp, &modifiers, flags, did_simplify); in trans_special()
1277 if (key == 0) in trans_special()
1280 return special_to_buf(key, modifiers, flags & FSK_KEYCODE, dst); in trans_special()
1291 special_to_buf(int key, int modifiers, int keycode, char_u *dst) in special_to_buf() argument
1303 if (IS_SPECIAL(key)) in special_to_buf()
1306 dst[dlen++] = KEY2TERMCAP0(key); in special_to_buf()
1307 dst[dlen++] = KEY2TERMCAP1(key); in special_to_buf()
1310 dlen += (*mb_char2bytes)(key, dst + dlen); in special_to_buf()
1312 dlen = (int)(add_char2buf(key, dst + dlen) - dst); in special_to_buf()
1314 dst[dlen++] = key; in special_to_buf()
1338 int key; in find_special_key() local
1419 key = (int)n; in find_special_key()
1433 key = PTR2CHAR(last_dash + off); in find_special_key()
1436 key = get_special_key_code(last_dash + off); in find_special_key()
1438 key = handle_x_keys(key); in find_special_key()
1446 if (key != NUL) in find_special_key()
1452 key = simplify_key(key, &modifiers); in find_special_key()
1457 if (key == K_BS) in find_special_key()
1458 key = BS; in find_special_key()
1459 else if (key == K_DEL || key == K_KDEL) in find_special_key()
1460 key = DEL; in find_special_key()
1464 if (!IS_SPECIAL(key)) in find_special_key()
1465 key = extract_modifiers(key, &modifiers, in find_special_key()
1470 return key; in find_special_key()
1488 may_adjust_key_for_ctrl(int modifiers, int key) in may_adjust_key_for_ctrl() argument
1492 if (ASCII_ISALPHA(key)) in may_adjust_key_for_ctrl()
1493 return TOUPPER_ASC(key); in may_adjust_key_for_ctrl()
1494 if (key == '2') in may_adjust_key_for_ctrl()
1496 if (key == '6') in may_adjust_key_for_ctrl()
1498 if (key == '-') in may_adjust_key_for_ctrl()
1501 return key; in may_adjust_key_for_ctrl()
1512 may_remove_shift_modifier(int modifiers, int key) in may_remove_shift_modifier() argument
1517 && ((key >= '!' && key <= '/') in may_remove_shift_modifier()
1518 || (key >= ':' && key <= 'Z') in may_remove_shift_modifier()
1519 || (key >= '[' && key <= '`') in may_remove_shift_modifier()
1520 || (key >= '{' && key <= '~'))) in may_remove_shift_modifier()
1524 && (key == '{' || key == '}' || key == '|')) in may_remove_shift_modifier()
1538 extract_modifiers(int key, int *modp, int simplify, int *did_simplify) in extract_modifiers() argument
1546 if ((modifiers & MOD_MASK_SHIFT) && ASCII_ISALPHA(key)) in extract_modifiers()
1548 key = TOUPPER_ASC(key); in extract_modifiers()
1558 if ((modifiers & MOD_MASK_CTRL) && ASCII_ISALPHA(key)) in extract_modifiers()
1559 key = TOUPPER_ASC(key); in extract_modifiers()
1566 && strchr("?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_", key) in extract_modifiers()
1569 && ((key >= '?' && key <= '_') || ASCII_ISALPHA(key)) in extract_modifiers()
1573 key = Ctrl_chr(key); in extract_modifiers()
1576 if (key == 0) in extract_modifiers()
1577 key = K_ZERO; in extract_modifiers()
1586 if (simplify && (modifiers & MOD_MASK_ALT) && key < 0x80 in extract_modifiers()
1589 key |= 0x80; in extract_modifiers()
1596 return key; in extract_modifiers()
1609 if (c == key_names_table[i].key) in find_special_key_in_table()
1649 return key_names_table[i].key; in get_special_key_code()