#include "config.h"#include <ctype.h>#include <limits.h>#include <stdbool.h>#include <stdlib.h>#include <string.h>#include "mutt/lib.h"#include "gui/lib.h"#include "keymap.h"
Include dependency graph for keymap.c:Go to the source code of this file.
Functions | |
| struct Keymap * | keymap_alloc (size_t len, keycode_t *keys) |
| Allocate space for a sequence of keys. | |
| void | keymap_free (struct Keymap **pptr) |
| Free a Keymap. | |
| void | keymaplist_free (struct KeymapList *kml) |
| Free a List of Keymaps. | |
| struct Keymap * | keymap_compare (struct Keymap *km1, struct Keymap *km2, size_t *pos) |
| Compare two keymaps' keyscodes and return the bigger one. | |
| void | keymap_get_name (int c, struct Buffer *buf) |
| Get the human name for a key. | |
| bool | keymap_expand_key (struct Keymap *km, struct Buffer *buf) |
| Get the key string bound to a Keymap. | |
| void | keymap_expand_string (const char *str, struct Buffer *buf) |
| Get a human-readable key string. | |
| int | parse_fkey (char *str) |
| Parse a function key string. | |
| int | parse_keycode (const char *str) |
| Parse a numeric keycode. | |
| size_t | parse_keys (const char *str, keycode_t *d, size_t max) |
| Parse a key string into key codes. | |
Variables | |
| struct Mapping | KeyNames [] |
| Key name lookup table. | |
Keymap handling.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file keymap.c.
Allocate space for a sequence of keys.
| len | Number of keys |
| keys | Array of keys |
| ptr | Sequence of keys |
Definition at line 112 of file keymap.c.
Here is the caller graph for this function:| void keymap_free | ( | struct Keymap ** | pptr | ) |
| void keymaplist_free | ( | struct KeymapList * | kml | ) |
Free a List of Keymaps.
| kml | List of Keymaps to free |
Definition at line 144 of file keymap.c.
Here is the call graph for this function:
Here is the caller graph for this function:Compare two keymaps' keyscodes and return the bigger one.
| [in] | km1 | First keymap to compare |
| [in] | km2 | Second keymap to compare |
| [out] | pos | Position where the two keycodes differ |
| ptr | Keymap with a bigger ASCII keycode |
Definition at line 162 of file keymap.c.
Here is the caller graph for this function:| void keymap_get_name | ( | int | c, |
| struct Buffer * | buf ) |
Get the human name for a key.
| [in] | c | Key code |
| [out] | buf | Buffer for the result |
Definition at line 185 of file keymap.c.
Here is the call graph for this function:
Here is the caller graph for this function:Get the key string bound to a Keymap.
| [in] | km | Keybinding map |
| [out] | buf | Buffer for the result |
| true | Success |
Definition at line 229 of file keymap.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void keymap_expand_string | ( | const char * | str, |
| struct Buffer * | buf ) |
| int parse_fkey | ( | char * | str | ) |
Parse a function key string.
| str | String to parse |
| num | Number of the key |
| -1 | Error |
Given "<f8>", it will return 8.
Definition at line 263 of file keymap.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int parse_keycode | ( | const char * | str | ) |
Parse a numeric keycode.
| str | String to parse |
| num | Number of the key |
This function parses the string <NNN> and uses the octal value as the key to bind.
Definition at line 290 of file keymap.c.
Here is the call graph for this function:
Here is the caller graph for this function:| size_t parse_keys | ( | const char * | str, |
| keycode_t * | d, | ||
| size_t | max ) |
Parse a key string into key codes.
| str | Key string |
| d | Array for key codes |
| max | Maximum length of key sequence |
| num | Length of key sequence |
Definition at line 315 of file keymap.c.
Here is the call graph for this function:
Here is the caller graph for this function:| struct Mapping KeyNames[] |
Key name lookup table.
Definition at line 42 of file keymap.c.