From 9be4ad12e89dec9896f331d105a4ac14d2fc3708 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Mon, 30 Dec 2002 07:35:41 +0000 Subject: [PATCH] parses the modifiers --- src/bindings.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bindings.cc b/src/bindings.cc index 4517f29d..e92b40e5 100644 --- a/src/bindings.cc +++ b/src/bindings.cc @@ -41,6 +41,7 @@ void OBBindings::display() bool OBBindings::translate(const std::string &str, Binding &b) { unsigned int mods = 0; + std::string modstring; // parse out the base key name std::string::size_type keybegin = str.find_last_of('-'); @@ -54,6 +55,7 @@ bool OBBindings::translate(const std::string &str, Binding &b) end = str.find_first_of('-', begin); std::string mod(str, begin, end-begin); + modstring += mod; if (mod == "C") { // control mods |= ControlMask; @@ -78,11 +80,11 @@ bool OBBindings::translate(const std::string &str, Binding &b) mod == "Mod5") { mods |= Mod5Mask; } - printf("got modifier: got modifier: %s\n", mod.c_str()); - begin = end + 1; } + printf("got modifier: %s\n", modstring.c_str()); + KeySym sym = XStringToKeysym(const_cast(key.c_str())); if (sym == NoSymbol) return false; b.modifiers = mods; -- 2.39.2