rvaiya / keyd

A key remapping daemon for linux.
MIT License
2.97k stars 175 forks source link

Overload + click emits the macro #815

Open abgruszecki opened 2 months ago

abgruszecki commented 2 months ago

keyd version: 2.4.3, on Ubuntu Noble if that makes a difference.

I have the following in my config:

leftshift = overload(shift, S-9)
rightshift = overload(shift, S-0)

Holding shift, clicking, and releasing shift emits a parenthesis. This means that I can't shift-click anymore to select text. I saw overloadt2 in the manpage, but it doesn't work for me either: the timeout is either too big and when quickly typing S-a I get (a, or the timeout is too small and I can't type the parenthesis alone.

It'd be great if overload+click did not emit the macro (or whatever the second argument is).

BTW the readme links to this doc, which seems outdated compared to the manpage. I only found out about overloadt2 when writing this issue, after grepping the repo & then looking at the manpage.

abgruszecki commented 2 months ago

Alternatively, it'd be great if there was a way to emit the macro on release, only if there was no intervening event. This is the way that xcape works, and I believe kmonad can do the same with tap-hold: https://github.com/kmonad/kmonad/blob/master/keymap/tutorial.kbd#L816-L820.

nsbgn commented 2 months ago

This means that I can't shift-click anymore to select text.

I believe this should be solved by adding your mouse to your [ids] (explicitly, not by the wildcard *). Then, the mouse click will be treated as an intervening event.

Alternatively, it'd be great if there was a way to emit the macro on release, only if there was no intervening event.

That should be how it currently works for plain overload :)

which seems outdated compared to the manpage

I can see the confusion. Probably best not to use permalinks in the README.