X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=src%2Fkeybindings.c;h=52c6c7077a8e8b0ed67b33ed0d293748bf42e0f5;hb=4b5302fe73b9aa08819ff740bbf8286352a990fb;hp=709813c89a98a6d98832a37085acaf013c4ff991;hpb=e6ed641e5feea84437d154b29ea8982cf9dfb37d;p=plomrogue diff --git a/src/keybindings.c b/src/keybindings.c index 709813c..52c6c70 100644 --- a/src/keybindings.c +++ b/src/keybindings.c @@ -37,6 +37,21 @@ static uint8_t try_keycode(uint16_t keycode_given, char * keyname, +extern char * get_func_to_keycode(struct KeyBinding * kb_p, uint16_t key) +{ + while (0 != kb_p) + { + if (key == kb_p->key) + { + return kb_p->name; + } + kb_p = kb_p->next; + } + return NULL; +} + + + extern uint16_t get_keycode_to_action(struct KeyBinding * kb_p, char * name) { while (0 != kb_p)