From 517d13fbce3ae56f154343671c325c000a7de040 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Tue, 11 Aug 2020 10:44:27 +0200 Subject: [PATCH] config: don't allow Shift in mouse bindings Shift is a special modifier that is used to enable selection when the client application is grabbing the mouse. --- config.c | 5 +++++ doc/footrc.5.scd | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/config.c b/config.c index d46b5f8e..40a7e81b 100644 --- a/config.c +++ b/config.c @@ -1026,6 +1026,11 @@ parse_mouse_combos(struct config *conf, const char *combos, key_combo_list_t *ke *key = '\0'; if (!parse_modifiers(conf, combo, key - combo, &modifiers, path, lineno)) goto err; + if (modifiers.shift) { + LOG_AND_NOTIFY_ERR("%s:%d: Shift cannot be used in mosue bindings", + path, lineno); + goto err; + } key++; /* Skip past the '+' */ } diff --git a/doc/footrc.5.scd b/doc/footrc.5.scd index 64f9c500..d5ea808d 100644 --- a/doc/footrc.5.scd +++ b/doc/footrc.5.scd @@ -369,6 +369,10 @@ of the modifiers *must* be valid XKB key names, and the button name *must* be a valid libinput name. You can find the button names using *libinput debug-events*. +Note that *Shift* cannot be used as a modifier in mouse bindings since +it is used to enable selection when the client application is grabbing +the mouse. + The trailing *COUNT* is optional and specifies the click count required to trigger the binding. The default if *COUNT* is omitted is _1_.