120
edits
(2 intermediate revisions by one other user not shown) | |||
Line 28: | Line 28: | ||
* If you want to specify a different layout, dvorak, bepo, etc, change the variant flag to <syntaxhighlight lang=console inline>dvorak,dyalog</syntaxhighlight>. | * If you want to specify a different layout, dvorak, bepo, etc, change the variant flag to <syntaxhighlight lang=console inline>dvorak,dyalog</syntaxhighlight>. | ||
=== NixOS === | |||
Adding these entries to <code>/etc/nixos/configuration.nix</code> will setup xkbmap to work correctly after the next time you build your configuration (usually with <code>nixos-rebuild switch</code>). | |||
<syntaxhighlight lang=console> | |||
services.xserver = { | |||
layout = "cn,apl"; | |||
xkbVariant = ",dyalog"; | |||
xkbOptions = "grp:switch"; | |||
}; | |||
</syntaxhighlight> | |||
== libinput == | == libinput == | ||
Line 134: | Line 144: | ||
== Wayland == | == Wayland == | ||
Currently, [https://en.wikipedia.org/wiki/Wayland_%28display_server_protocol%29 Wayland] uses [https://www.x.org/wiki/XKB/ XKB] for keyboards, but they are not modifiable during runtime using e.g. <code lang=console>setxkbmap</code> by default. The keyboard layout must be configured and then the session restarted. | Currently, [https://en.wikipedia.org/wiki/Wayland_%28display_server_protocol%29 Wayland] uses [https://www.x.org/wiki/XKB/ XKB] for keyboards, but they are not modifiable during runtime using e.g. <code lang=console>setxkbmap</code> by default. The keyboard layout must be configured and then the session restarted. | ||
=== Raspberry Pi "Bookworm" onwards === | |||
Raspbian OS has moved to its own Wayland-based desktop environment "LXDE-pi-wayfire" in Bookworm. | |||
You can check that this is your currently running environment by inspecting the <syntaxhighlight lang=console inline>DESKTOP_SESSION</syntaxhighlight> environment variable. | |||
<syntaxhighlight lang=console> | |||
echo $DESKTOP_SESSION | |||
</syntaxhighlight> | |||
The current user can modify their keyboard configuration using XKB options by editing the file <syntaxhighlight lang=console inline>~/.config/wayfire.ini</syntaxhighlight>. These options take effect while using the graphical desktop environment. | |||
Under the <syntaxhighlight lang=console inline>[input]</syntaxhighlight> section, set | |||
<syntaxhighlight lang=console> | |||
xkb_layout = gb,apl | |||
xkb_options = grp:lswitch | |||
</syntaxhighlight> | |||
to use the UK keyboard layout with a <kbd>Left Alt</kbd> APL shifting key. See the [[#setxkbmap|section on setxkbmap]] for more information about XKB keyboard configuration. | |||
To set the keyboard configuration for use in the terminal console outside of the Wayland GUI, modify <syntaxhighlight lang=console inline>/etc/default/keyboard</syntaxhighlight> to include: | |||
<syntaxhighlight lang=console> | |||
XKBLAYOUT="gb,apl" | |||
XKBOPTIONS="grp:switch" | |||
</syntaxhighlight> | |||
=== GNOME Tweaks === | === GNOME Tweaks === |