Skip to content

Keyd

services.keyd.enable

Whether to enable keyd, a key remapping daemon. Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/hardware/keyd.nix

services.keyd.keyboards

Configuration for one or more device IDs. Corresponding files in the /etc/keyd/ directory are created according to the name of the keys (like default or externalKeyboard).

Type: attribute set of (submodule)

Default

{ }

Example

{default = {ids = [ "*" ];settings = {main = {capslock = "overload(control, esc)";};};};externalKeyboard = {ids = [ "1ea7:0907" ];settings = {main = {esc = capslock;};};};}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/hardware/keyd.nix

services.keyd.keyboards.<name>.extraConfig

Extra configuration that is appended to the end of the file. Do not write ids section here, use a separate option for it. You can use this option to define compound layers that must always be defined after the layer they are comprised.

Type: strings concatenated with "\n"

Default

""

Example

'' [control+shift] h = left''

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/hardware/keyd.nix

services.keyd.keyboards.<name>.ids

Device identifiers, as shown by {manpage}keyd(1).

Type: list of string

Default

["*"]

Example

["*""-0123:0456"]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/hardware/keyd.nix

services.keyd.keyboards.<name>.settings

Configuration, except ids section, that is written to {file}/etc/keyd/<keyboard>.conf. Appropriate names can be used to write non-alpha keys, for example "equal" instead of "=" sign (see https://github.com/NixOS/nixpkgs/issues/236622). See https://github.com/rvaiya/keyd how to configure.

Type: attribute set of section of an INI file (attrs of INI atom (null, bool, int, float or string))

Default

{ }

Example

{main = {capslock = "overload(control, esc)";rightalt = "layer(rightalt)";};rightalt = {h = "left";j = "down";k = "up";l = "right";};}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/hardware/keyd.nix