1 /* keymaps.h -- Manipulation of readline keymaps. */
6 #include <readline/chardefs.h>
9 typedef int Function ();
10 #define __FUNCTION_DEF
13 /* A keymap contains one entry for each key in the ASCII set.
14 Each entry consists of a type and a pointer.
15 POINTER is the address of a function to run, or the
16 address of a keymap to indirect through.
17 TYPE says which kind of thing POINTER is. */
18 typedef struct _keymap_entry {
23 /* I wanted to make the above structure contain a union of:
24 union { Function *function; struct _keymap_entry *keymap; } value;
25 but this made it impossible for me to create a static array.
26 Maybe I need C lessons. */
28 typedef KEYMAP_ENTRY KEYMAP_ENTRY_ARRAY[128];
29 typedef KEYMAP_ENTRY *Keymap;
31 /* The values that TYPE can have in a keymap entry. */
36 extern KEYMAP_ENTRY_ARRAY emacs_standard_keymap, emacs_meta_keymap, emacs_ctlx_keymap;
37 extern KEYMAP_ENTRY_ARRAY vi_insertion_keymap, vi_movement_keymap;
39 /* Return a new, empty keymap.
40 Free it with free() when you are done. */
41 Keymap rl_make_bare_keymap ();
43 /* Return a new keymap which is a copy of MAP. */
44 Keymap rl_copy_keymap ();
46 /* Return a new keymap with the printing characters bound to rl_insert,
47 the lowercase Meta characters bound to run their equivalents, and
48 the Meta digits bound to produce numeric arguments. */
49 Keymap rl_make_keymap ();
51 #endif /* _KEYMAPS_H_ */