diff options
| author | Marius Nita <marius@cs.pdx.edu> | 2002-10-14 05:03:15 +0000 |
|---|---|---|
| committer | Marius Nita <marius@cs.pdx.edu> | 2002-10-14 05:03:15 +0000 |
| commit | 8ea3db574ad4fc3e8022d89045b66d4fe2597356 (patch) | |
| tree | 6a250bc3c761c2a656bdd0e011d37bf5a7be12ef /util/epist/keytree.cc | |
| parent | 2037631f753753a5c1ee9b2475b55658c3bb6eea (diff) | |
more fixes, better sanity detection and error messages. it shouldn't hog the keyboard in any case now. it won't grab when modifiers or keys are borked.
Diffstat (limited to 'util/epist/keytree.cc')
| -rw-r--r-- | util/epist/keytree.cc | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/util/epist/keytree.cc b/util/epist/keytree.cc index 5a3515ea..94b542b0 100644 --- a/util/epist/keytree.cc +++ b/util/epist/keytree.cc @@ -195,13 +195,8 @@ void keytree::addAction(Action::ActionType action, unsigned int mask, } KeySym sym = XStringToKeysym(key.c_str()); - - if (sym == 0) { - std::cerr << "Key " << key << " is invalid! (Action ignored)\n"; - return; - } - keynode *tmp = new keynode; + tmp->action = new Action(action, XKeysymToKeycode(_display, sym), mask, arg); @@ -229,10 +224,10 @@ void keytree::setCurrentNodeProps(Action::ActionType action, unsigned int mask, { if (_current->action) delete _current->action; - + + KeySym sym = XStringToKeysym(key.c_str()); _current->action = new Action(action, - XKeysymToKeycode(_display, - XStringToKeysym(key.c_str())), + XKeysymToKeycode(_display, sym), mask, arg); } |
