home · contact · privacy
Some shortening / re-styling of place_win()'s code and comments.
[plomrogue] / src / keybindings.c
index 709813c89a98a6d98832a37085acaf013c4ff991..29afb78483eaf8c35c76e4d4941427cf5287225a 100644 (file)
@@ -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)
@@ -218,8 +233,7 @@ extern void free_keybindings(struct KeyBinding * kb_start)
 extern void mod_selected_keyb(struct KeyBiData * kbd)
 {
     kbd->edit = 1;
-    char * err = "Trouble with draw_all_wins() in mod_selected_keyb().";
-    exit_err(draw_all_wins(world.wmeta), err);
+    draw_all_wins();
     int key = getch();
     if (key < 1000)
     {