char * name; /* name of functionality bound to keycode */
};
-
-
/* Wrapper to keybinding chain, contains some keybinding editing metadata. */
struct KeyBiData
{
+/* Return name of action / functionality coupled to keycode; NULL on failure. */
+extern char * get_func_to_keycode(struct KeyBinding * kb_p, uint16_t key);
+
/* Return keycode matched by keybinding to command of "name". */
extern uint16_t get_keycode_to_action(struct KeyBinding * keybindings,
char * name);
/* Return "n"-th keybinding in keybindings chain from "kb_p" on. */
extern struct KeyBinding * get_keyb_of_n(struct KeyBinding * kb_p, uint16_t n);
-
-
/* Initialize/save keybindings data from/to file at "path" to/from keybindings
* data pointer "kbd".
*/
/* Free keybinding chain starting at "kb_start". */
extern void free_keybindings(struct KeyBinding * kb_start);
-
-
/* Mark keybinding selected for modification as being edited, get user input to
* modify it, then unmark it again. Ensure there are max. three digits in the
* keycode ASCII representation.