Commit 90899f8b authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

keys: Allow comments, warn when encountering invalid actions

parent e4067106
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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);