From a72fc5e00213eccb1fcf019566eea7c98fdb0611 Mon Sep 17 00:00:00 2001 From: markt Date: Fri, 21 Jul 2006 08:36:12 +0000 Subject: unfix *lock modifiers, ignore scroll lock on events --- ChangeLog | 4 ++++ src/FbTk/KeyUtil.cc | 2 +- src/FbTk/KeyUtil.hh | 8 ++++---- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index f01b37b..607c1f9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ (Format: Year/Month/Day) Changes for 1.0rc3: +*06/07/21: + * Stop using fixed values for num/caps/scroll lock, and ignore scroll lock + as a modifier (Mark) + FbTk/KeyUtil.cc/hh *06/07/20: * Fix _NET_WM_MOVERESIZE, bug #1525404 (Mark) Ewmh.cc diff --git a/src/FbTk/KeyUtil.cc b/src/FbTk/KeyUtil.cc index 4300cd7..24e43c8 100644 --- a/src/FbTk/KeyUtil.cc +++ b/src/FbTk/KeyUtil.cc @@ -62,7 +62,7 @@ KeyUtil &KeyUtil::instance() { KeyUtil::KeyUtil() - : m_modmap(0) + : m_modmap(0), m_capslock(0), m_numlock(0), m_scrolllock(0) { init(); } diff --git a/src/FbTk/KeyUtil.hh b/src/FbTk/KeyUtil.hh index e32384f..e1f1276 100644 --- a/src/FbTk/KeyUtil.hh +++ b/src/FbTk/KeyUtil.hh @@ -67,7 +67,7 @@ public: */ unsigned int cleanMods(unsigned int mods) { //remove numlock, capslock and scrolllock - return mods & ~(capslock() | numlock() ); + return mods & ~(capslock() | numlock() | scrolllock()); } /** @@ -83,9 +83,9 @@ public: @return corresponding modifier mask */ static unsigned int keycodeToModmask(unsigned int keycode); - int numlock() const { return Mod2Mask; } //m_numlock; } - int capslock() const { return LockMask; } //m_capslock; } - int scrolllock() const { return Mod5Mask; } //m_scrolllock; } + int numlock() const { return m_numlock; } + int capslock() const { return m_capslock; } + int scrolllock() const { return m_scrolllock; } private: void loadModmap(); -- cgit v0.11.2