aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands
diff options
context:
space:
mode:
authorLibravatar Linus Heckemann <git@sphalerite.org>2020-03-23 12:34:04 +0100
committerLibravatar Simon Ser <contact@emersion.fr>2020-03-30 14:18:27 +0200
commitdf48c48123de88a91362844881fa20eddc30f597 (patch)
tree307ec481503f0090519565dbf2c22b14e66ab5c0 /sway/commands
parentChange focus_on_window_activation default to urgent (diff)
downloadsway-df48c48123de88a91362844881fa20eddc30f597.tar.gz
sway-df48c48123de88a91362844881fa20eddc30f597.tar.zst
sway-df48c48123de88a91362844881fa20eddc30f597.zip
add --no-repeat option for bindings
This allows e.g. triggering one command while a key is held, then triggering another to undo the change performed by it afterwards. One use case for this is triggering push-to-talk functionality for VoIP tools without granting them full access to all input events. Fixes #3151
Diffstat (limited to 'sway/commands')
-rw-r--r--sway/commands/bind.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sway/commands/bind.c b/sway/commands/bind.c
index c86c39dd..4e49982a 100644
--- a/sway/commands/bind.c
+++ b/sway/commands/bind.c
@@ -373,6 +373,8 @@ static struct cmd_results *cmd_bindsym_or_bindcode(int argc, char **argv,
373 binding->input = strdup(argv[0] + strlen("--input-device=")); 373 binding->input = strdup(argv[0] + strlen("--input-device="));
374 } else if (strcmp("--no-warn", argv[0]) == 0) { 374 } else if (strcmp("--no-warn", argv[0]) == 0) {
375 warn = false; 375 warn = false;
376 } else if (strcmp("--no-repeat", argv[0]) == 0) {
377 binding->flags |= BINDING_NOREPEAT;
376 } else { 378 } else {
377 break; 379 break;
378 } 380 }