From 90899f8b9fd99efe958601421ef296b3e383fbbe Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 15 Jan 2011 00:33:16 +0100 Subject: keys: Allow comments, warn when encountering invalid actions --- src/keyevents.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/keyevents.c b/src/keyevents.c index 6560aaa..049b4db 100644 --- a/src/keyevents.c +++ b/src/keyevents.c @@ -145,7 +145,7 @@ void init_keyevents(void) { read = sscanf(line, "%31s %31s %31s %31s\n", (char *) &action, (char *) &k1, (char* ) &k2, (char *) &k3); - if ((read == EOF) || (read < 2)) + if ((read == EOF) || (read < 2) || (line[0] == '#')) continue; if (!strcmp(action, "menu_close")) @@ -250,6 +250,8 @@ void init_keyevents(void) { cur_kb = &keys.reload_minus; else if (!strcmp(action, "reload_plus")) cur_kb = &keys.reload_plus; + else + weprintf("feh keys: Invalid action: %s", action); if (cur_kb) { feh_set_parse_kb_partial(cur_kb, 0, k1); -- cgit v1.2.3