xkeysnail icon indicating copy to clipboard operation
xkeysnail copied to clipboard

Are there any plans to support keyup/keydown events?

Open chrisshroba opened this issue 5 years ago • 2 comments

I'd like to be able to use xkeysnail to show information only while a particular key is held. For example:

define_keymap(None, {
    KeyDown("LSuper"): show_information_window(),
    KeyUp("LSuper"):   hide_information_window(),
})

If this seems like an easy task but no one has the time to implement, I'd be happy to take a stab at it if someone can give me some pointers :)

Also, I believe this is a duplicate of #21, but that one is in Japanese so I think it's okay to open a new one.

chrisshroba avatar Jul 02 '20 18:07 chrisshroba

As far as I know, sxhkd has ability to remap key up event, may be you could learn something from it repos. I love both xkeysnail and sxhkd!

michael-nhat avatar Dec 16 '20 03:12 michael-nhat

This wouldn't be that difficult to do but it would require added:

  • KeyUp command
  • KeyDown command
  • real tracking of key up/down status on the output (which we don't have now)

This would perhaps be easier after output is enhanced a bit if I get to adding sticky keys (which will track key status and allow holds in the first place - which this kind of thing could be built upon)

joshgoebel avatar May 28 '22 11:05 joshgoebel