Fix keycodes (#325)
authorIlya Zhuravlev <zhuravlevilya@ya.ru>
Sat, 22 Dec 2012 22:11:32 +0000 (02:11 +0400)
committerIlya Zhuravlev <zhuravlevilya@ya.ru>
Sat, 22 Dec 2012 22:11:32 +0000 (02:11 +0400)
src/keycode.cpp

index cdf3c6062dde7aad2e5c7a0d77c8ce4c1b6bc2d6..9aa9d300d688e601c2e24286c41fa5da68a52f50 100644 (file)
@@ -260,7 +260,7 @@ KeyPress::KeyPress(const char *name)
                try {
                        Key = keyname_to_keycode(name);
                        m_name = name;
-                       if (strlen(name) > 8) {
+                       if (strlen(name) > 8 && strncmp(name, "KEY_KEY_", 8) == 0) {
                                int chars_read = mbtowc(&Char, name + 8, 1);
                                assert (chars_read == 1 && "unexpected multibyte character");
                        } else