From: Michael Stapelberg Date: Thu, 6 Sep 2012 15:31:30 +0000 (+0200) Subject: docs/userguide: document the --release flag for key bindings X-Git-Tag: 4.3~30 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=41868273860613ffbbe5d2e517131886d884617b;p=i3%2Fi3 docs/userguide: document the --release flag for key bindings --- diff --git a/docs/userguide b/docs/userguide index 0a9458cf..e42a6acb 100644 --- a/docs/userguide +++ b/docs/userguide @@ -348,10 +348,15 @@ your bindings in the same physical location on the keyboard, use keycodes. If you don’t switch layouts, and want a clean and simple config file, use keysyms. +Some tools (such as +import+ or +xdotool+) might be unable to run upon a +KeyPress event, because the keyboard/pointer is still grabbed. For these +situations, the +--release+ flag can be used, which will execute the command +after the keys have been released. + *Syntax*: ---------------------------------- -bindsym [Modifiers+]keysym command -bindcode [Modifiers+]keycode command +bindsym [--release] [Modifiers+]keysym command +bindcode [--release] [Modifiers+]keycode command ---------------------------------- *Examples*: @@ -364,6 +369,12 @@ bindsym mod+Shift+r restart # Notebook-specific hotkeys bindcode 214 exec --no-startup-id /home/michael/toggle_beamer.sh + +# Simulate ctrl+v upon pressing $mod+x +bindsym --release $mod+x exec --no-startup-id xdotool key --clearmodifiers ctrl+v + +# Take a screenshot upon pressing $mod+x (select an area) +bindsym --release $mod+x exec --no-startup-id import /tmp/latest-screenshot.png -------------------------------- Available Modifiers: