Keyd: Improve print key behaviour.
This commit is contained in:
parent
76b2b2e971
commit
90b5a6e96f
|
@ -6,6 +6,15 @@
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
cfg = config.module.keyd;
|
cfg = config.module.keyd;
|
||||||
|
mkAllLetterKeysSet =
|
||||||
|
mkValue:
|
||||||
|
"abcdefghijklmnopqrstuvwxyz"
|
||||||
|
|> lib.strings.stringToCharacters
|
||||||
|
|> map (key: {
|
||||||
|
name = key;
|
||||||
|
value = mkValue key;
|
||||||
|
})
|
||||||
|
|> lib.listToAttrs;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
@ -22,7 +31,7 @@ in
|
||||||
capslock = "overload(control, esc)"; # Ctrl/esc combo.
|
capslock = "overload(control, esc)"; # Ctrl/esc combo.
|
||||||
compose = "layer(layer_alternative)";
|
compose = "layer(layer_alternative)";
|
||||||
delete = "backslash";
|
delete = "backslash";
|
||||||
esc = "timeout(grave, 150, print)"; # System controls.
|
esc = "overload(layer_print, grave)"; # System controls.
|
||||||
leftcontrol = "overload(layer_alternative, leftcontrol)"; # Alternative layer for home, end etc.
|
leftcontrol = "overload(layer_alternative, leftcontrol)"; # Alternative layer for home, end etc.
|
||||||
rightcontrol = "layer(layer_number)"; # Media and other controls.
|
rightcontrol = "layer(layer_number)"; # Media and other controls.
|
||||||
rightshift = "backspace"; # Backspace.
|
rightshift = "backspace"; # Backspace.
|
||||||
|
@ -99,6 +108,8 @@ in
|
||||||
shift = "backspace";
|
shift = "backspace";
|
||||||
space = "0";
|
space = "0";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
layer_print = mkAllLetterKeysSet (key: "macro(print+${key})");
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue