Fix keycodes (#325)

master
Ilya Zhuravlev 2012-12-23 02:11:32 +04:00
parent c4172934e5
commit 145e301269
1 changed files with 1 additions and 1 deletions

View File

@ -260,7 +260,7 @@ KeyPress::KeyPress(const char *name)
try { try {
Key = keyname_to_keycode(name); Key = keyname_to_keycode(name);
m_name = 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); int chars_read = mbtowc(&Char, name + 8, 1);
assert (chars_read == 1 && "unexpected multibyte character"); assert (chars_read == 1 && "unexpected multibyte character");
} else } else