Layouts
Themarchyo.keyboard.layouts option accepts a list of layouts. Each can be a simple string or an attribute set for advanced configuration.
Simple layouts
Layouts with variants
Layouts with input methods
For CJK languages and other complex input, specify an IME:ime, the input method engine is automatically activated when you switch to that layout.
Available IMEs
| IME | Language | Required package |
|---|---|---|
"pinyin" | Chinese | fcitx5-chinese-addons |
"mozc" | Japanese | fcitx5-mozc |
"hangul" | Korean | fcitx5-hangul |
"unicode" | Unicode picker | — |
Layout attribute set options
| Option | Type | Default | Description |
|---|---|---|---|
layout | string | — | Keyboard layout code (e.g., "us", "fi", "cn") |
variant | string | "" | Layout variant (e.g., "intl", "dvorak") |
ime | string or null | null | Input method engine |
label | string or null | null | Display label (auto-generated if null) |
Keyboard switching
XKB options
Usemarchyo.keyboard.options for standard XKB options. Default: ["grp:win_space_toggle"] (Super+Space to switch layouts).
Compose key
The compose key lets you type special characters via key sequences (e.g., Compose +' + e = é).
| Value | Key |
|---|---|
"ralt" | Right Alt (default) |
"rwin" | Right Super/Windows |
"caps" | Caps Lock |
"menu" | Menu key |
null | Disable compose key |
IME behavior
Auto-activation
By default, switching to a layout with an IME activates it automatically. Disable this to require manual activation:Manual IME toggle
Configure a key to manually toggle IME on/off:Full example
How it works
- NixOS (
services.xserver.xkb) — Basic layout codes and variants are applied to the console/TTY for fallback support outside the graphical environment. - Hyprland (
home.keyboard) — Layout and XKB options are passed to Hyprland’s input configuration. - fcitx5 — Acts as the authoritative input manager in the graphical environment, managing layouts, IMEs, and layout switching.
All options reference
| Option | Type | Default | Description |
|---|---|---|---|
marchyo.keyboard.layouts | list of strings or attrsets | ["us" "fi"] | Keyboard layouts and input methods |
marchyo.keyboard.options | list of strings | ["grp:win_space_toggle"] | XKB keyboard options |
marchyo.keyboard.composeKey | string or null | "ralt" | Compose key |
marchyo.keyboard.autoActivateIME | bool | true | Auto-activate IME on layout switch |
marchyo.keyboard.imeTriggerKey | list of strings | ["Super+I"] | Manual IME toggle keys |