how to enable a layer by default
I'm not sure if this is implemented or not, but I couldn't find anything. Is there a mechanism that allows the user to say such and such layer is on by default, but can still be toggled off as normal?
Use case: the oneshot examples for shift/control/alt are really cool, but it would be useful to have a way to quickly switch them off if they get in the way of something (for instance, they can complicate some game control schemes).
I use the application mapper app.conf to change how some modifiers work only for specific game windows:
# For Counter Strike
[csgo-linux64]
# Only right meta key works as meta to avoid accidental Alt-Tab out of game
capslock = layer(control)
leftmeta = layer(control)
rightmeta = layer(meta)
Where in /etc/keyd/default.conf has meta bound to some other layer by default:
[main]
# Create a "super" layer, similar to MacOS "Cmd" shortcuts
meta = layer(magic_layer)
It would be better to create a layer to which you explicitly assign keys and then toggle them.
Example:
[global]
overload_tap_timeout = 500
[main]
capslock = overload(control, esc)
tab = overload(TAB, tab)
[TAB]
esc = toggle(NORMAL)
[NORMAL]
esc = clear()
capslock = capslock