After fix for #142 Any did not work anymore as the key section identifying
Any was never reached.
| src/Config.cc | |
| 842 | @@ -842,6 +842,9 @@ |
| 842 | num = tok.size() - 1; |
| 843 | if ((tok[num].size() > 1) && (tok[num][0] == '#')) { |
| 844 | key = strtol(tok[num].c_str() + 1, 0, 10); |
| 845 | } else if (strcasecmp(tok[num].c_str(), "ANY") == 0) { |
| 846 | // Do no matching, anything goes. |
| 847 | key = 0; |
| 848 | } else { |
| 849 | KeySym keysym = XStringToKeysym(tok[num].c_str()); |
| 850 | |
| ... | |
| 854 | @@ -851,7 +854,7 @@ |
| 854 | // uppercase and at last we try a complete uppercase string. If all |
| 855 | // fails, we print a warning and return false. |
| 856 | if (keysym == NoSymbol) { |
| 854 | std::string str = tok[num]; |
| 858 | string str = tok[num]; |
| 859 | Util::to_lower(str); |
| 860 | keysym = XStringToKeysym(str.c_str()); |
| 861 | if (keysym == NoSymbol) { |
| ... | |
| 864 | @@ -861,17 +864,13 @@ |
| 864 | Util::to_upper(str); |
| 865 | keysym = XStringToKeysym(str.c_str()); |
| 866 | if (keysym == NoSymbol) { |
| 864 | std::cerr << " *** WARNING: Couldn't find keysym for " << tok[num] <<std::endl; |
| 868 | cerr << " *** WARNING: Couldn't find keysym for " << tok[num] << endl; |
| 869 | return false; |
| 870 | } |
| 871 | } |
| 872 | } |
| 873 | } |
| 871 | key = XKeysymToKeycode(PScreen::instance()->getDpy(), |
| 872 | keysym); |
| 873 | if (strcasecmp(tok[num].c_str(), "ANY") == 0) { |
| 874 | key = 0; // FIXME: for now, but there's no XK_Any? |
| 875 | } |
| 879 | key = XKeysymToKeycode(PScreen::instance()->getDpy(), keysym); |
| 880 | } |
| 881 | |
| 882 | // if the last token isn't an key/button, the action isn't valid |
| ... | |