houmain / keymapper

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

Bug: Groups of simultanous keys kills repeat rate #161

Closed kbilsted closed 1 month ago

kbilsted commented 1 month ago

Not sure if this is a bug. But here goes

Using the configuration

AltLeft{H}          >> ArrowLeft
AltLeft{J}          >> ArrowDown

everything works nicely. I can hold down the keys and they repeat like the cursor keys do.

When I add a group selector

(J K)       >> TO_NORMAL

then the repeat of J is no longer firing

houmain commented 1 month ago

No, this is not a bug. It waits whether the K follows or not. It starts repeating as soon as you also press the 'K'. You could try !AltLeft (J K) >> TO_NORMAL or the recently added ?, which makes it skip the mapping as long as it does not match completely: ? (J K) >> TO_NORMAL

kbilsted commented 1 month ago

Great thanks for the quick reply. Would it be best practice to prefix ? to all definitions? When wouldn't this be a good idea?

kbilsted commented 1 month ago

ok that was a bad idea using ? it spins keymapper out of control using nearly all cpu and eating 2-3 MB ram a second

image

houmain commented 1 month ago

Thanks, this should be fixed in 4.4.5.

Would it be best practice to prefix ? to all definitions?

While ? (J K) immediately outputs J or K when one is pressed alone, (J K) does not. So it depends on your usecase.