houmain / keymapper

A cross-platform context-aware key remapper.
GNU General Public License v3.0
257 stars 21 forks source link

Using keymapper for a global PTT gets interrupted by keypresses. #73

Closed naelstrof closed 8 months ago

naelstrof commented 9 months ago

Trying to use a global binding so that discord on wayland works.

# ~/.config/keymapper.conf
ButtonForward >> $(pamixer --default-source -u) ^ $(pamixer --default-source -m)

Expected behavior:

Holding ButtonForward down will unmute, on release it'll mute.

Actual behavior:

pamixer --default-source -m will get called as soon as any key is pressed. Regardless if ButtonForward is still held down or not.

naelstrof commented 9 months ago

Oh this appears to be intended behavior, not sure how to make this match regardless of the key sequences input.

houmain commented 9 months ago

Yes, right, this is the current behavior. It is effectively waiting at the ^ until ButtonForward (or any other key) is released. I will try to allow this use case but I am not sure when I get to it.

naelstrof commented 9 months ago

Thank you! I'm slowly picking at the code and have already soft locked my setup a few times trying to make it be more specific on key releases.

I'll make a pull request if I make more progress tomorrow, but it kind of seems like what I'm doing is going to be a hack.

houmain commented 9 months ago

Thank you very much for your pull request! It looks good, but I recently implemented it differently. Without the blocking behavior there was no longer a good reason, to implement it in the platform specific code.

houmain commented 8 months ago

This is now available. Currently in the 3.0.0 prerelease.