summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-01-15 00:33:16 +0100
committerDaniel Friesel <derf@finalrewind.org>2011-01-15 00:33:16 +0100
commit90899f8b9fd99efe958601421ef296b3e383fbbe (patch)
treedb2512d58a305d0b1020a85d02e474ea3071b50e
parente406710610d45e51f52e827e2d0ad77b16d6fbe8 (diff)
keys: Allow comments, warn when encountering invalid actions
-rw-r--r--src/keyevents.c4
1 files changed, 3 insertions, 1 deletions
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);