From: Dana Jansens Date: Mon, 30 Dec 2002 06:44:14 +0000 (+0000) Subject: can build trees with modifiers X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=349ac3f0e3922473df3f03586cee69ed44ff618c;p=chaz%2Fopenbox can build trees with modifiers --- diff --git a/src/bindings.cc b/src/bindings.cc index a6f7addb..c4469bb1 100644 --- a/src/bindings.cc +++ b/src/bindings.cc @@ -39,9 +39,14 @@ void OBBindings::display() static bool translate(const std::string str, Binding &b) { - KeySym sym = XStringToKeysym(const_cast(str.c_str())); + std::string::size_type keybegin = str.find_last_of('-'); + std::string key(str, keybegin != std::string::npos ? keybegin + 1 : 0); + + // XXX: get some modifiers up in the hizzie + + KeySym sym = XStringToKeysym(const_cast(key.c_str())); if (sym == NoSymbol) return false; - b.modifiers = Mod1Mask; + b.modifiers = Mod1Mask; // XXX: no way b.key = XKeysymToKeycode(otk::OBDisplay::display, sym); return b.key != 0; }