aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/KeyUtil.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/KeyUtil.hh')
-rw-r--r--src/FbTk/KeyUtil.hh9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/FbTk/KeyUtil.hh b/src/FbTk/KeyUtil.hh
index 4cafcdd..e32384f 100644
--- a/src/FbTk/KeyUtil.hh
+++ b/src/FbTk/KeyUtil.hh
@@ -70,6 +70,14 @@ public:
70 return mods & ~(capslock() | numlock() ); 70 return mods & ~(capslock() | numlock() );
71 } 71 }
72 72
73 /**
74 strip away everything which is actually not a modifier
75 eg, xkb-keyboardgroups are encoded as bit 13 and 14
76 */
77 unsigned int isolateModifierMask(unsigned int mods) {
78 return mods & (ShiftMask|LockMask|ControlMask|Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask);
79 }
80
73 /** 81 /**
74 Convert the specified key into appropriate modifier mask 82 Convert the specified key into appropriate modifier mask
75 @return corresponding modifier mask 83 @return corresponding modifier mask
@@ -78,6 +86,7 @@ public:
78 int numlock() const { return Mod2Mask; } //m_numlock; } 86 int numlock() const { return Mod2Mask; } //m_numlock; }
79 int capslock() const { return LockMask; } //m_capslock; } 87 int capslock() const { return LockMask; } //m_capslock; }
80 int scrolllock() const { return Mod5Mask; } //m_scrolllock; } 88 int scrolllock() const { return Mod5Mask; } //m_scrolllock; }
89
81private: 90private:
82 void loadModmap(); 91 void loadModmap();
83 92