Check for NoSymbol more explicitly - thanks Julien Trolet (dmxen at

sourceforge)
This commit is contained in:
simonb 2006-06-25 14:00:13 +00:00
parent 80389b5dd5
commit 131d04cf42
2 changed files with 7 additions and 2 deletions

View file

@ -1,6 +1,9 @@
(Format: Year/Month/Day)
Changes for 1.0rc2:
*06/06/25:
* Explicitly map NoSymbol to keycode 0 (thanks Julien Trolet)
(seems to be assigned to several keycodes)
FbTk/KeyUtil.cc
* Menu aware of text encodings (Simon)
- new menu file options:
[encoding] {CODESET}

View file

@ -172,8 +172,10 @@ void KeyUtil::grabKey(unsigned int key, unsigned int mod) {
unsigned int KeyUtil::getKey(const char *keystr) {
if (!keystr)
return 0;
return XKeysymToKeycode(App::instance()->display(),
XStringToKeysym(keystr));
KeySym sym = XStringToKeysym(keystr);
if (sym==NoSymbol)
return 0;
return XKeysymToKeycode(App::instance()->display(), sym);
}