* [matchbox-wm][PATCH 1/2] wm: disregard Caps/Num/Scroll-lock when handling keypresses
@ 2016-04-12 11:43 Jussi Kukkonen
2016-04-12 11:43 ` [matchbox-wm][PATCH 2/2] keys: Grab all modifier combos Jussi Kukkonen
0 siblings, 1 reply; 3+ messages in thread
From: Jussi Kukkonen @ 2016-04-12 11:43 UTC (permalink / raw)
To: yocto
<alt>-Tab and other keybindings should work even when the various
locks are on.
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
src/wm.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/wm.c b/src/wm.c
index 2d05ff0..00d88c5 100644
--- a/src/wm.c
+++ b/src/wm.c
@@ -1074,6 +1074,7 @@ wm_handle_keypress(Wm *w, XKeyEvent *e)
#ifndef NO_KBD
MBConfigKbdEntry *entry = w->config->kb->entrys;
Client *p = NULL;
+ int state = e->state;
#ifdef USE_LIBSN
Bool found = False;
@@ -1094,11 +1095,14 @@ wm_handle_keypress(Wm *w, XKeyEvent *e)
return;
}
}
-
+
+ /* Don't care about Caps/Num/Scroll lock here */
+ state &= ~w->config->kb->lock_mask;
+
while (entry != NULL)
{
if (XKeycodeToKeysym(w->dpy, e->keycode, entry->index) == entry->key
- && e->state == entry->ModifierMask )
+ && state == entry->ModifierMask )
{
switch (entry->action)
{
--
2.8.0.rc3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [matchbox-wm][PATCH 2/2] keys: Grab all modifier combos
2016-04-12 11:43 [matchbox-wm][PATCH 1/2] wm: disregard Caps/Num/Scroll-lock when handling keypresses Jussi Kukkonen
@ 2016-04-12 11:43 ` Jussi Kukkonen
2016-04-12 12:08 ` Burton, Ross
0 siblings, 1 reply; 3+ messages in thread
From: Jussi Kukkonen @ 2016-04-12 11:43 UTC (permalink / raw)
To: yocto
Handle even the last combo, the one with all modifiers applied at the
same time.
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
src/keys.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/keys.c b/src/keys.c
index 68c27dd..bc83bd4 100644
--- a/src/keys.c
+++ b/src/keys.c
@@ -495,7 +495,7 @@ keys_grab(Wm *w, Bool ungrab)
int ignored_mask = 0;
/* Needed to grab all ignored combo's too */
- while (ignored_mask < (int) w->config->kb->lock_mask)
+ while (ignored_mask <= (int) w->config->kb->lock_mask)
{
if (ignored_mask & ~(w->config->kb->lock_mask))
{
--
2.8.0.rc3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [matchbox-wm][PATCH 2/2] keys: Grab all modifier combos
2016-04-12 11:43 ` [matchbox-wm][PATCH 2/2] keys: Grab all modifier combos Jussi Kukkonen
@ 2016-04-12 12:08 ` Burton, Ross
0 siblings, 0 replies; 3+ messages in thread
From: Burton, Ross @ 2016-04-12 12:08 UTC (permalink / raw)
To: Jussi Kukkonen; +Cc: yocto
[-- Attachment #1: Type: text/plain, Size: 230 bytes --]
On 12 April 2016 at 12:43, Jussi Kukkonen <jussi.kukkonen@intel.com> wrote:
> Handle even the last combo, the one with all modifiers applied at the
> same time.
>
This and 1/2 both pushed to master, thanks Jussi!
Ross
[-- Attachment #2: Type: text/html, Size: 643 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-04-12 12:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-12 11:43 [matchbox-wm][PATCH 1/2] wm: disregard Caps/Num/Scroll-lock when handling keypresses Jussi Kukkonen
2016-04-12 11:43 ` [matchbox-wm][PATCH 2/2] keys: Grab all modifier combos Jussi Kukkonen
2016-04-12 12:08 ` Burton, Ross
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.