From 30c74c96ca3007bc2118f6fd436f7683ba71f94b Mon Sep 17 00:00:00 2001 From: okan Date: Fri, 19 Nov 2021 19:13:14 +0000 Subject: Do not attempt to grab keys without a keycode; this incidentally allows XF86 keys support. found and fix by Luis Henriques --- conf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/conf.c b/conf.c index 9919597..e47a206 100644 --- a/conf.c +++ b/conf.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: conf.c,v 1.252 2020/04/16 13:32:35 okan Exp $ + * $OpenBSD: conf.c,v 1.253 2021/11/19 19:13:14 okan Exp $ */ #include @@ -682,6 +682,8 @@ conf_grab_kbd(Window win) TAILQ_FOREACH(kb, &Conf.keybindq, entry) { kc = XKeysymToKeycode(X_Dpy, kb->press.keysym); + if (kc == 0) + continue; if ((XkbKeycodeToKeysym(X_Dpy, kc, 0, 0) != kb->press.keysym) && (XkbKeycodeToKeysym(X_Dpy, kc, 0, 1) == kb->press.keysym)) kb->modmask |= ShiftMask; -- cgit v1.2.3-2-gb3c3