keyd icon indicating copy to clipboard operation
keyd copied to clipboard

how to enable a layer by default

Open crabdancing opened this issue 2 years ago • 4 comments

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).

crabdancing avatar Jun 24 '23 01:06 crabdancing

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)

cheyngoodman avatar Jun 25 '23 22:06 cheyngoodman

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

tkna91 avatar Jul 02 '23 12:07 tkna91