houmain / keymapper

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

Not (!) only applies to first item of an OR alias `modifier="!OrAlias"` #128

Closed G-M0N3Y-2503 closed 2 months ago

G-M0N3Y-2503 commented 2 months ago

With the config below the [modifier="!OrAlias"] block applies when !Alias1 and ignores the value of Alias2.

The previous behaviour was that the [modifier="!OrAlias"] would apply when both !Alias1 and !Alias2.

[system="Linux"]
Notify = $(notify-send -t 500 -a "keymapper" "$0")

Alias1 = Virtual1
Alias2 = Virtual2
OrAlias = Alias1 | Alias2

[modifier="!OrAlias"]
ButtonForward >> Notify["Alias Forward"]
ButtonBack >> Notify["Alias Back"]

[default]
ButtonForward >> Notify["Default Forward"]
ButtonBack >> Notify["Default Back"]
1 >> Alias1 Notify["Alias1"]
2 >> Alias2 Notify["Alias2"]
ristomatti commented 2 months ago

I have noticed the same. A workaround I've used is:

NotOrAlias = !Alias1 !Alias2

[modifier="NotOrAlias"]
houmain commented 2 months ago

Hi, this should be fixed with the 4.1.0 release.