summaryrefslogtreecommitdiff
path: root/src/actions.c
diff options
context:
space:
mode:
authorShawn Betts <sabetts@gmail.com>2008-05-29 15:01:07 -0700
committerShawn Betts <sabetts@gmail.com>2008-05-29 15:01:07 -0700
commit040d4dbf7332d295b1c3078ded7c418ec396e8fa (patch)
tree9701dd6381a12d8c88e88c67d410b852f264a0ae /src/actions.c
parentd1f633382214f50e07cea482249ff9733fa7ded3 (diff)
downloadratpoison-040d4dbf7332d295b1c3078ded7c418ec396e8fa.zip
don't grab the key if the keysym doesn't map to a keycode
Also, remove the restriction that a keysym must have a keycode in order to be bound.
Diffstat (limited to 'src/actions.c')
-rw-r--r--src/actions.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/actions.c b/src/actions.c
index 374bbae..c46e5ae 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -916,8 +916,7 @@ parse_keydesc (char *s, struct rp_key *key)
/* Its got no hyphens in it, so just grab the keysym */
key->sym = string_to_keysym (keydesc);
- /* A keycode of 0 means the keysym doesn't have a keycode. */
- if (key->sym == NoSymbol || XKeysymToKeycode (dpy, key->sym) == 0)
+ if (key->sym == NoSymbol)
{
cmdret *ret = cmdret_new (RET_FAILURE, "parse_keydesc: Unknown key '%s'", keydesc);
free (keydesc);
@@ -952,8 +951,7 @@ parse_keydesc (char *s, struct rp_key *key)
keysym name. */
key->sym = string_to_keysym (token);
- /* A keycode of 0 means the keysym doesn't have a keycode. */
- if (key->sym == NoSymbol || XKeysymToKeycode (dpy, key->sym) == 0)
+ if (key->sym == NoSymbol)
{
cmdret *ret = cmdret_new (RET_FAILURE, "parse_keydesc: Unknown key '%s'", token);
free (keydesc);