From ce0779e5c910c0e93d05449e2a4515cad6fea856 Mon Sep 17 00:00:00 2001 From: Christoph Lohmann <20h@r-36.net> Date: Sat, 27 Oct 2012 00:01:15 +0200 Subject: [PATCH] Unpress modifiers so there is no problem when exiting svkbd inbetween. --- svkbd.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/svkbd.c b/svkbd.c index 9823919..5281a84 100644 --- a/svkbd.c +++ b/svkbd.c @@ -371,6 +371,14 @@ press(Key *k, KeySym mod) { True, 0); } XTestFakeKeyEvent(dpy, XKeysymToKeycode(dpy, k->keysym), True, 0); + + for(i = 0; i < LENGTH(keys); i++) { + if(keys[i].pressed && IsModifierKey(keys[i].keysym)) { + XTestFakeKeyEvent(dpy, + XKeysymToKeycode(dpy, keys[i].keysym), + False, 0); + } + } } drawkey(k); }