Check for NoSymbol more explicitly - thanks Julien Trolet (dmxen at
sourceforge)
This commit is contained in:
parent
80389b5dd5
commit
131d04cf42
2 changed files with 7 additions and 2 deletions
|
@ -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}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue