Introduction
Introduction Statistics Contact Development Disclaimer Help
Better handle multiple modifiers on keys. - sam - An updated version of the sam…
git clone git://vernunftzentrum.de/sam.git
Log
Files
Refs
LICENSE
---
commit 0d7c06d3a08a25ba6050a2c4f1fe531f4a8cbc1e
parent c0b56f6d1dd91596de93449e90cd0ec73636e635
Author: Rob King <[email protected]>
Date: Sun, 4 Sep 2016 22:52:29 -0500
Better handle multiple modifiers on keys.
There are modifiers like Num_Lock that are always on; we need to be able
to handle that situation.
Diffstat:
libXg/gwin.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/libXg/gwin.c b/libXg/gwin.c
@@ -201,11 +201,13 @@ Keyaction(Widget w, XEvent *e, String *p, Cardinal *np)
/* Check to see if it's a specially-handled key first. */
for (Keymapping *m = keymappings; m && m->kind != Kend; m++){
- if (e->xkey.state == m->mask && k == m->sym){
- f = ((GwinWidget)w)->gwin.gotchar;
- if (f)
- (*f)(m->result, m->kind, Tcurrent, 0, 0);
- return;
+ if (k == m->sym){
+ if ((e->xkey.state & m->mask) || m->mask == 0){
+ f = ((GwinWidget)w)->gwin.gotchar;
+ if (f)
+ (*f)(m->result, m->kind, Tcurrent, 0, 0);
+ return;
+ }
}
}
You are viewing proxied material from vernunftzentrum.de. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.