Menu key as additional Windows key with Kb options
Trying to get a “Super” key on the right side of my keyboard.
The problem #
The Hyprland tiling Wayland compositor uses the Windows key as a part of most of its keyboard commands. The Windows key is referred to as the “Super” key. E.g., to the command to switch to a new workspace is “Super + <workspace number>”. The positioning of the Windows key on my keyboard (most keyboards(?)) leads to some awkward hand movements. To fix the issue, I want to add an additional Windows key on the right side of the keyboard.
Configuring the Menu key to act as an additional Windows key #
On (most (?)) Linux systems, use XKB (X Keyboard Extension) to handle keyboard layouts: The XKB Configuration Guide . It defines mappings between keys and characters/actions.
Hyprland kb_options setting #
Hyprland exposes the XKB XkbOptions setting through its “Input” variables configuration:
https://wiki.hypr.land/Configuring/Variables/#input
. Here’s how I configured Hyprland to use the “Menu” key as an additional “Windows” key:
input {
# ...
# This literally swaps the alt and windows keys!
# kb_options = altwin:swap_alt_win
# Make the Menu key an additional Windows key
kb_options = altwin:menu_win
# ...
}