diff options
| author | Dana Jansens <danakj@orodu.net> | 2002-12-30 07:35:41 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2002-12-30 07:35:41 +0000 |
| commit | 9be4ad12e89dec9896f331d105a4ac14d2fc3708 (patch) | |
| tree | 2720875ca955fb87ac0e129ac073fb63c9ca9dc9 /src | |
| parent | 1369b32df813bfad0a19ec77751c2d3594e944c6 (diff) | |
parses the modifiers
Diffstat (limited to 'src')
| -rw-r--r-- | src/bindings.cc | 6 |
1 files 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<char *>(key.c_str())); if (sym == NoSymbol) return false; b.modifiers = mods; |
