Exclusive layers / modifiers?
For instance, I want to remap Alt M to 1 but when I press only the Alt key. I would also like to be able to specify which modifiers would be allowed, like the shift key, so Alt Shift M would output !
I think you need to redefine your mappings in a composite.
[alt]
m = 1
[alt+shift]
m = 1
edit
I thought that your ! was a 1. Which keyboard layout do you use on your system? If ! is S-1, then you don't need anything special apart:
[alt]
m = 1
@lobre The issue is that for instance if I type CTRL ALT M, it registers as CTRL 1. I only want it to be 1 if I press Alt M or ! if I press Alt Shift M.
I am sorry but I don't understand your problem.
For sure it seems easy to fix, but for us to understand your problem, please post your existing config, give us your system keyboard layout, and a precise explanation of what you are trying to do. Like, what do you press, what it does, and what you would like instead.
A general advice that I can give you is that modifiers stack together, except if you redefine what you want in composite layers.
E.g.
[control+alt]
m = 1
...
[control+shift]
m = 1
...
[shift+alt]
m = 1
...
[control+alt+shift]
m = 1
...
Chose the ones you need, but it precisely defines what happens when multiple layers are added together instead of stacking them.
- I want
Alt Mmapped to1 Alt Shift Mmapped to!- Pressing
AltandMwith any modifiers other than shift, just emits those keys.- For instance,
CTRL Alt Mpresses those three keys, and doesn't emit either1or!.
- For instance,
This is tricky.
I am not in front of a computer but maybe something like that.
[main]
alt = layer(myalt)
control = layer(mycontrol)
[myalt:A]
control = layer(mycontrol)
m = 1
[mycontrol:C]
alt = layer(alt)
m = C-m