sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

index.md (1087B)


      1 keypressrelease
      2 ===============
      3 
      4 Description
      5 -----------
      6 This patch lets you specify whether a key binding should be executed at the
      7 _KeyPress_ or _KeyRelease_ event. Executing on _KeyRelease_ fixes bugs such as
      8 `scrot -s` [failing to execute from a key binding](//lists.suckless.org/dev/1108/9185.html)
      9 due to keys not being released in time.
     10 
     11 Note that the new parameter must be added to all non-standard key bindings
     12 manually after patching.
     13 
     14 Usage
     15 -----
     16 A working `scrot -s` key binding:
     17 
     18 	{ KeyRelease, 0,                XK_Print,  spawn,          SHCMD("scrot -s") },
     19 
     20 Or to only display the bar while the toggle key is held down (requires that it
     21 is hidden to start with), add:
     22 
     23     { KeyRelease, MODKEY,           XK_b,      togglebar,      {0} },
     24 
     25 Alternatives
     26 ------------
     27 
     28 An alternative is to put a tiny sleep right before executing scrot.
     29 
     30     { ControlMask,                  XK_Print,  spawn,          SHCMD("sleep 0.2; scrot -s") },
     31 
     32 Download
     33 --------
     34 * [dwm-keypressrelease-6.0.diff](dwm-keypressrelease-6.0.diff)
     35 
     36 Author
     37 ------
     38 * Niklas Høj - `<niklas at hoej dot me>`