|
ELinks 0.20.0
|
#include <ctype.h>#include <string.h>#include "elinks.h"#include "bfu/dialog.h"#include "config/conf.h"#include "config/dialogs.h"#include "config/kbdbind.h"#include "config/options.h"#include "intl/libintl.h"#include "main/event.h"#include "main/module.h"#include "terminal/kbd.h"#include "util/conv.h"#include "util/memory.h"#include "util/string.h"#include "config/actions-main.inc"#include "config/actions-edit.inc"#include "config/actions-menu.inc"
Data Structures | |
| struct | named_key |
| struct | default_kb |
| struct | action_alias |
Macros | |
| #define | table table_elinks |
| #define | ACTION_(map, name, action, caption, flags) |
| #define | KEYMAP_ID KEYMAP_MAIN |
| #define | KEYMAP_ID KEYMAP_EDIT |
| #define | KEYMAP_ID KEYMAP_MENU |
Functions | |
| static void | add_default_keybindings (void) |
| static int | delete_keybinding (keymap_id_T keymap_idkeymap_id, struct term_event_keyboard *kbd) |
| static int | keybinding_is_default (struct keybinding *keybinding) |
| struct keybinding * | add_keybinding (keymap_id_T keymap_idkeymap_id, action_id_T action_id, struct term_event_keyboard *kbd, int event) |
| void | free_keybinding (struct keybinding *keybinding) |
| int | keybinding_exists (keymap_id_T keymap_idkeymap_id, struct term_event_keyboard *kbd, action_id_T *action_id) |
| action_id_T | kbd_action (keymap_id_T keymap_idkeymap_id, struct term_event *ev, int *event) |
| struct keybinding * | kbd_ev_lookup (keymap_id_T keymap_idkeymap_id, struct term_event_keyboard *kbd, int *event) |
| static struct keybinding * | kbd_act_lookup (keymap_id_T keymap_idkeymap_id, action_id_T action_id) |
| struct keybinding * | kbd_nm_lookup (keymap_id_T keymap_idkeymap_id, const char *name) |
| static struct keybinding * | kbd_stroke_lookup (keymap_id_T keymap_idkeymap_id, const char *keystroke_str) |
| static const struct action * | get_action_from_keystroke (keymap_id_T keymap_idkeymap_id, const char *keystroke_str) |
| char * | get_action_name_from_keystroke (keymap_id_T keymap_idkeymap_id, const char *keystroke_str) |
| action_id_T | get_action_from_string (keymap_id_T keymap_idkeymap_id, const char *str) |
| const struct action * | get_action (keymap_id_T keymap_idkeymap_id, action_id_T action_id) |
| char * | get_action_name (keymap_id_T keymap_idkeymap_id, action_id_T action_id) |
| static char * | get_action_desc (keymap_id_T keymap_idkeymap_id, action_id_T action_id) |
| static struct keymap * | get_keymap (keymap_id_T keymap_idkeymap_id) |
| static keymap_id_T | get_keymap_id (const char *keymap_str) |
| const char * | get_keymap_name (keymap_id_T keymap_idkeymap_id) |
| term_event_key_T | read_key (const char *key_str) |
| int | parse_keystroke (const char *s, struct term_event_keyboard *kbd) |
| Parse the string s as the name of a keystroke. | |
| void | add_keystroke_to_string (struct string *str, struct term_event_keyboard *kbd, int escape) |
| void | add_keystroke_action_to_string (struct string *string, action_id_T action_id, keymap_id_T keymap_idkeymap_id) |
| char * | get_keystroke (action_id_T action_id, keymap_id_T keymap_idkeymap_id) |
| void | add_actions_to_string (struct string *string, action_id_T action_ids[], keymap_id_T keymap_idkeymap_id, struct terminal *term) |
| static void | init_keymaps (struct module *xxx) |
| static void | free_keymaps (struct module *xxx) |
| static action_id_T | get_aliased_action (keymap_id_T keymap_idkeymap_id, char *action_str) |
| int | bind_do (const char *keymap_str, const char *keystroke_str, char *action_str, int is_system_conf) |
| char * | bind_act (char *keymap_str, const char *keystroke_str) |
| static void | single_bind_config_string (struct string *file, keymap_id_T keymap_idkeymap_id, struct keybinding *keybinding) |
| void | bind_config_string (struct string *file) |
Variables | |
| static const struct action | main_action_table [MAIN_ACTIONS+1] |
| static const struct action | edit_action_table [EDIT_ACTIONS+1] |
| static const struct action | menu_action_table [MENU_ACTIONS+1] |
| static const struct action_list | action_table [KEYMAP_MAX] |
| static struct keymap | keymap_table [] |
| static struct keybinding list | keymaps [KEYMAP_MAX] |
| static const struct named_key | key_table [] |
| static struct default_kb | default_main_keymap [] |
| static struct default_kb | default_edit_keymap [] |
| static struct default_kb | default_menu_keymap [] |
| static struct default_kb * | default_keybindings [] |
| static const struct action_alias | main_action_aliases [] |
| static const struct action_alias | edit_action_aliases [] |
| static const struct action_alias * | action_aliases [KEYMAP_MAX] |
| struct module | kbdbind_module |
| #define KEYMAP_ID KEYMAP_MENU |
| #define KEYMAP_ID KEYMAP_EDIT |
| #define KEYMAP_ID KEYMAP_MAIN |
| #define table table_elinks |
| void add_actions_to_string | ( | struct string * | string, |
| action_id_T | action_ids[], | ||
| keymap_id_T | keymap_id, | ||
| struct terminal * | term ) |
|
static |
| struct keybinding * add_keybinding | ( | keymap_id_T | keymap_id, |
| action_id_T | action_id, | ||
| struct term_event_keyboard * | kbd, | ||
| int | event ) |
| void add_keystroke_action_to_string | ( | struct string * | string, |
| action_id_T | action_id, | ||
| keymap_id_T | keymap_id ) |
| void add_keystroke_to_string | ( | struct string * | str, |
| struct term_event_keyboard * | kbd, | ||
| int | escape ) |
| char * bind_act | ( | char * | keymap_str, |
| const char * | keystroke_str ) |
| void bind_config_string | ( | struct string * | file | ) |
| int bind_do | ( | const char * | keymap_str, |
| const char * | keystroke_str, | ||
| char * | action_str, | ||
| int | is_system_conf ) |
|
static |
| void free_keybinding | ( | struct keybinding * | keybinding | ) |
|
static |
| const struct action * get_action | ( | keymap_id_T | keymap_id, |
| action_id_T | action_id ) |
|
static |
|
static |
| action_id_T get_action_from_string | ( | keymap_id_T | keymap_id, |
| const char * | str ) |
| char * get_action_name | ( | keymap_id_T | keymap_id, |
| action_id_T | action_id ) |
| char * get_action_name_from_keystroke | ( | keymap_id_T | keymap_id, |
| const char * | keystroke_str ) |
|
static |
|
static |
|
static |
| const char * get_keymap_name | ( | keymap_id_T | keymap_id | ) |
| char * get_keystroke | ( | action_id_T | action_id, |
| keymap_id_T | keymap_id ) |
|
static |
|
static |
| action_id_T kbd_action | ( | keymap_id_T | keymap_id, |
| struct term_event * | ev, | ||
| int * | event ) |
| struct keybinding * kbd_ev_lookup | ( | keymap_id_T | keymap_id, |
| struct term_event_keyboard * | kbd, | ||
| int * | event ) |
| struct keybinding * kbd_nm_lookup | ( | keymap_id_T | keymap_id, |
| const char * | name ) |
|
static |
| int keybinding_exists | ( | keymap_id_T | keymap_id, |
| struct term_event_keyboard * | kbd, | ||
| action_id_T * | action_id ) |
|
static |
| int parse_keystroke | ( | const char * | s, |
| struct term_event_keyboard * | kbd ) |
Parse the string s as the name of a keystroke.
Write the parsed key and modifiers to *kbd.
This function does not support KBD_MOD_PASTE, because keystrokes that include it should never be bound to actions.
| term_event_key_T read_key | ( | const char * | key_str | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| struct module kbdbind_module |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |