Skip to content

Keyboard

Displays the toggle state of the capslock, num lock and scroll lock keys, and the current keyboard layout.

Screenshot of keyboard widget

Configuration

Type: keyboard

NameTypeDefaultDescription
show_capsbooleantrueWhether to show capslock indicator.
show_numbooleantrueWhether to show num lock indicator.
show_scrollbooleantrueWhether to show scroll lock indicator.
show_layoutbooleantrueWhether to show the keyboard layout button.
icon_sizeinteger32Size to render icon at (image icons only).
icons.caps_onstring or image󰪛Icon to show for enabled capslock indicator.
icons.caps_offstring or image''Icon to show for disabled capslock indicator.
icons.num_onstring or imageIcon to show for enabled num lock indicator.
icons.num_offstring or image''Icon to show for disabled num lock indicator.
icons.scroll_onstring or imageIcon to show for enabled scroll lock indicator.
icons.scroll_offstring or image''Icon to show for disabled scroll lock indicator.
icons.layout_mapMap<string, string or image>{}Map of icons or labels to show for a particular keyboard layout. Layouts use their actual name if not present in the map. Layouts are matched in the order they appear in the map. If a pattern to match ends with a *, it acts as a wildcard, matching any layout name that begins with the part before the *.
seatstringseat0ID of the Wayland seat to attach to.
JSON
{
"end": [
{
"type": "keyboard",
"show_scroll": false,
"icons": {
"caps_on": "󰪛",
"layout_map": {
"English (US)": "🇺🇸",
"Ukrainian": "🇺🇦"
}
}
}
]
}
TOML
[[end]]
type = "keyboard"
show_scroll = false
[end.icons]
caps_on = "󰪛"
[end.icons.layout_map]
"English (US)" = "🇺🇸"
Ukrainian = "🇺🇦"
YAML
end:
- type: keyboard
show_scroll: false
icons:
caps_on: 󰪛
layout_map:
"English (US)": 🇺🇸
Ukrainian: 🇺🇦
Corn
{
end = [
{
type = "keyboard"
show_scroll = false
icons.caps_on = "󰪛"
icons.layout_map.'English (US)' = "🇺🇸"
icons.layout_map.Ukrainian = "🇺🇦"
}
]
}

Styling

SelectorDescription
.keyboardKeys box container widget.
.keyboard .keyIndividual key indicator container widget.
.keyboard .key.enabledKey indicator where key is toggled on.
.keyboard .key.capsCapslock key indicator.
.keyboard .key.numNum lock key indicator.
.keyboard .key.scrollScroll lock key indicator.
.keyboard .key.imageKey indicator image icon.
.keyboard .key.text-iconKey indicator textual icon.
.keyboard .layoutKeyboard layout indicator.

For more information on styling, please see the styling guide.