String _key(keysym);
KeyEvent key;
- scim_string_to_key (key, _key);
+ if (!scim_string_to_key (key, _key)) {
+ xkb_keysym_t code = xkb_keysym_from_name(keysym, XKB_KEYSYM_NO_FLAGS);
+ if (code == XKB_KEY_NoSymbol) {
+ code = xkb_keysym_from_name(keysym, XKB_KEYSYM_CASE_INSENSITIVE);
+ }
+ key.code = code;
+ }
scim_set_device_info (key, dev_name ? dev_name : "", dev_class, dev_subclass);
bool ignore_key = filter_keys (keysym, SCIM_CONFIG_HOTKEYS_FRONTEND_IGNORE_KEY);
EXAPI bool
scim_string_to_key (KeyEvent &key, const String & str)
{
+ bool void_symbol = false;
std::vector <String> list;
bool skip;
size_t i;
key.code = p->value;
} else if (it->length () >= 6 && (*it)[0] == '0' && ((*it)[1] == 'x' || (*it)[1] == 'X')){
key.code = strtol (it->c_str () + 2, NULL, 16);
- } else if (it->length () >= 5 && ((*it)[0] == 'u' || (*it)[0] == 'U')){
- key.code = strtol (it->c_str () + 1, NULL, 16);
- key.code |= 0x1000000;
} else if (p && p->name && strcmp (p->name, "VoidSymbol") == 0) {
key.code = SCIM_KEY_VoidSymbol;
+ void_symbol = true;
}
}
- return key.code != 0;
+ return void_symbol || key.code != 0;
}
EXAPI bool