all repos — openbox @ 349ac3f0e3922473df3f03586cee69ed44ff618c

openbox fork - make it a bit more like ryudo

can build trees with modifiers
Dana Jansens danakj@orodu.net
commit

349ac3f0e3922473df3f03586cee69ed44ff618c

parent

c9ca0e797de3f8b67b47333476a98b18445cdb67

1 files changed, 7 insertions(+), 2 deletions(-)

jump to
M src/bindings.ccsrc/bindings.cc

@@ -39,9 +39,14 @@

static bool translate(const std::string str, Binding &b) { - KeySym sym = XStringToKeysym(const_cast<char *>(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<char *>(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; }