X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=src%2Fkeybindings.h;h=fc0faae354a7081d4da30aec60233b572ae1d333;hb=e75b508724effaad1bfd6dcf337c34a368855095;hp=3d1b75e73ae619ec055531682ab0205e6caed628;hpb=7290dec4219eaa2325aa00ef6139f715743dba3a;p=plomrogue diff --git a/src/keybindings.h b/src/keybindings.h index 3d1b75e..fc0faae 100644 --- a/src/keybindings.h +++ b/src/keybindings.h @@ -18,8 +18,6 @@ struct KeyBinding char * name; /* name of functionality bound to keycode */ }; - - /* Wrapper to keybinding chain, contains some keybinding editing metadata. */ struct KeyBiData { @@ -30,6 +28,9 @@ 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); @@ -45,8 +46,6 @@ extern uint16_t get_n_of_keybs(struct KeyBinding * kb_p); /* 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". */ @@ -56,8 +55,6 @@ extern void save_keybindings(char * path, struct KeyBiData * 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.