keybinding: only warn when a keysym really couldn't be found.

Signed-off-by: Nathan Weizenbaum <nex342@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Nathan Weizenbaum 2008-09-18 01:54:38 -07:00 committed by Julien Danjou
parent b37110efd9
commit 0953d5f870
1 changed files with 7 additions and 4 deletions

View File

@ -304,10 +304,13 @@ luaA_keystore(keybinding_t *key, const char *str, ssize_t len)
if(*str != '#')
{
key->keysym = XStringToKeysym(str);
if (!key->keysym && len == 1)
key->keysym = *str;
else
warn("there's no keysym named \"%s\"", str);
if (!key->keysym)
{
if (len == 1)
key->keysym = *str;
else
warn("there's no keysym named \"%s\"", str);
}
}
else
key->keycode = atoi(str + 1);