Lines Matching refs:key

1 /* bind.c -- key binding and startup file support for the readline library. */
96 /* rl_add_defun (char *name, rl_command_func_t *function, int key)
100 rl_add_defun (name, function, key)
103 int key;
105 if (key != -1)
106 rl_bind_key (key, function);
113 rl_bind_key (key, function)
114 int key;
117 if (key < 0)
118 return (key);
120 if (META_CHAR (key) && _rl_convert_meta_chars_to_ascii)
127 key = UNMETA (key);
128 escmap[key].type = ISFUNC;
129 escmap[key].function = function;
132 return (key);
135 _rl_keymap[key].type = ISFUNC;
136 _rl_keymap[key].function = function;
144 rl_bind_key_in_map (key, function, map)
145 int key;
154 result = rl_bind_key (key, function);
159 /* Bind key sequence KEYSEQ to DEFAULT_FUNC if KEYSEQ is unbound. Right
163 rl_bind_key_if_unbound_in_map (key, default_func, kmap)
164 int key;
170 keyseq[0] = (unsigned char)key;
176 rl_bind_key_if_unbound (key, default_func)
177 int key;
182 keyseq[0] = (unsigned char)key;
190 rl_unbind_key (key)
191 int key;
193 return (rl_bind_key (key, (rl_command_func_t *)NULL));
199 rl_unbind_key_in_map (key, map)
200 int key;
203 return (rl_bind_key_in_map (key, (rl_command_func_t *)NULL, map));
238 /* Bind the key sequence represented by the string KEYSEQ to
249 /* Bind the key sequence represented by the string KEYSEQ to
271 /* Bind key sequence KEYSEQ to DEFAULT_FUNC if KEYSEQ is unbound. Right
305 /* Bind the key sequence represented by the string KEYSEQ to
327 /* Bind the key sequence represented by the string KEYSEQ to
391 key binding, we save that keybinding into the ANYOTHERKEY
403 key sequence is found in the keymap. This (with a little
724 /* If this is the last key in the key sequence, return the
736 /* If we're not at the end of the key sequence, and the current key
737 is bound to something other than a keymap, then the entire key
752 /* The last key bindings file read. */
755 /* The file we're currently reading key bindings from. */
818 /* Do key bindings from a file. If FILENAME is NULL it defaults
1152 A key binding command looks like: Keyname: function-name\0,
1161 int key, equivalency;
1181 /* If this keyname is a complex key expression surrounded by quotes,
1183 backslash to quote characters in the key expression. */
1208 _rl_init_file_error ("no closing `\"' in key binding");
1313 /* If this is a new-style key-binding, then do the binding with
1366 key = glean_key_from_name (kname);
1370 key = CTRL (_rl_to_upper (key));
1373 key = META (key);
1381 useq[0] = key; useq[1] = '\0';
1393 seq[0] = key;
1399 rl_bind_key (key, rl_named_function (funname));
1845 _rl_get_keyname (key)
1846 int key;
1853 c = key;
1863 Just add the special ESC key sequence and return. */
1874 if (key == RUBOUT)
1911 /* Now add the key, terminate the string, and return it. */
1918 /* Return a NULL terminated array of strings which represent the key
1925 register int key;
1932 for (key = 0; key < KEYMAP_SIZE; key++)
1934 switch (map[key].type)
1942 if (map[key].function == function)
1946 keyname = _rl_get_keyname (key);
1965 their target. Add the key sequences found to RESULT. */
1966 if (map[key].function)
1968 rl_invoking_keyseqs_in_map (function, FUNCTION_TO_KEYMAP (map, key));
1979 if (key == ESC)
1990 else if (CTRL_CHAR (key))
1991 sprintf (keyname, "\\C-%c", _rl_to_lower (UNCTRL (key)));
1992 else if (key == RUBOUT)
1994 else if (key == '\\' || key == '"')
1997 keyname[1] = (char) key;
2002 keyname[0] = (char) key;
2027 /* Return a NULL terminated array of strings which represent the key
2110 rl_dump_functions (count, key)
2111 int count, key;
2126 register int key;
2130 for (key = 0; key < KEYMAP_SIZE; key++)
2132 switch (map[key].type)
2135 keyname = _rl_get_keyname (key);
2136 out = _rl_untranslate_macro_value ((char *)map[key].function);
2153 if (key == ESC)
2164 keyname = _rl_get_keyname (key);
2175 _rl_macro_dumper_internal (print_readably, FUNCTION_TO_KEYMAP (map, key), keyname);
2190 rl_dump_macros (count, key)
2191 int count, key;
2288 rl_dump_variables (count, key)
2289 int count, key;