diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-01-15 12:31:42 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-01-15 12:31:42 +0100 |
commit | 972821998aea7b0ff47fba3e41e1bb17819c79d2 (patch) | |
tree | e9e9b805fb8e5484aa9841aaf3d01478be2a97ca | |
parent | 5cc2c324e269756464275741c35033d972cc645a (diff) | |
download | feh-972821998aea7b0ff47fba3e41e1bb17819c79d2.zip |
feh/keys: Further error handling (invalid keysyms etc.)
-rw-r--r-- | src/keyevents.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/keyevents.c b/src/keyevents.c index f3a6624..e58c44b 100644 --- a/src/keyevents.c +++ b/src/keyevents.c @@ -73,7 +73,7 @@ static void feh_set_parse_kb_partial(fehkey *key, int index, char *ks) { mod = Mod5Mask; break; default: - weprintf("feh keys: invalid modifier %c in %s", ks[0], ks); + weprintf("keys: invalid modifier %c in %s", ks[0], ks); break; } cur = ks + 2; @@ -81,6 +81,9 @@ static void feh_set_parse_kb_partial(fehkey *key, int index, char *ks) { key->keysyms[index] = XStringToKeysym(cur); key->keystates[index] = mod; + + if (key->keysyms[index] == NoSymbol) + weprintf("keys: Invalid keysym: %s", cur); } void init_keyevents(void) { @@ -280,7 +283,7 @@ void init_keyevents(void) { else if (!strcmp(action, "reload_plus")) cur_kb = &keys.reload_plus; else - weprintf("feh keys: Invalid action: %s", action); + weprintf("keys: Invalid action: %s", action); if (cur_kb) { feh_set_parse_kb_partial(cur_kb, 0, k1); |