Closed AndreasNasman closed 9 months ago
I've never heard of this being possible. skhd is only sending key presses. A key released event will require some background logic to keep a track of key press state.
could it potentially work to chuck a sleep 1
somewhere in a script, so that you give yourself more time to execute the subsequent command?
failing that, you could look at a program like keyboard maestro to handle the key release event (and then send an osascript / subsequent keypress).
Having used the switch-desktop
keybinding for a while, I've noticed that this is a non-issue since my muscle memory has improved, and the script execution takes longer than me releasing the keys.
Is it possible to run commands on keyup, i.e. when a key combination is released, instead of keydown?
For context, I have these
skhd
key bindings to run a desktop switcher script:The problem I'm having is that I have to be super quick with the
lalt - X
key combinations, sinceswitch-desktop
triggers actrl - X
command, often resulting in an unwantedctrl + lalt - X
command.A workaround would be add a delay before the
ctrl - X
commandbut a nicer solution would be to have
lalt - X
trigger on keyup instead, as I'm inconsistent with key presses from time to time like any human.NB: I cannot use
lalt - 1: yabai --message space --focus 1
etc. for I need to keep SIP enabled (work computer).