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

Example
{end = [ { type = "keyboard" show_scroll = false icons.caps_on = "" icons.layout_map.'English (US)' = "🇺🇸" icons.layout_map.Ukrainian = "🇺🇦" } ]}{ "end": [ { "type": "keyboard", "show_scroll": false, "icons": { "caps_on": "", "layout_map": { "English (US)": "🇺🇸", "Ukrainian": "🇺🇦" } } } ]}end: - type: keyboard show_scroll: false icons: caps_on: layout_map: English (US): 🇺🇸 Ukrainian: 🇺🇦[[end]]type = "keyboard"show_scroll = false
[end.icons] caps_on = ""
[end.icons.layout_map] "English (US)" = "🇺🇸" Ukrainian = "🇺🇦"Configuration
Type:
keyboard
icon_size
Section titled “icon_size”Size to render the icons at, in pixels (image icons only).
Type: integer
Default: 32
Player state icons.
See icons.
Default: None
Object keys
icons.caps_off
Section titled “icons.caps_off”Icon to show when capslock is disabled.
Type: string
Default: None
icons.caps_on
Section titled “icons.caps_on”Icon to show when capslock is enabled.
Type: string
Default:
icons.layout_map
Section titled “icons.layout_map”Map of icons or labels to show for a particular keyboard layout.
If a layout is not present in the map, it will fall back to using its actual name.
Type: object
Default: {}
Example
Section titled “Example”{ type = "keyboard" show_layout = true icons.layout_map.'English (US)' = "EN" icons.layout_map.Ukrainian = "UA"}{ "type": "keyboard", "show_layout": true, "icons": { "layout_map": { "English (US)": "EN", "Ukrainian": "UA" } }}type: keyboardshow_layout: trueicons: layout_map: English (US): EN Ukrainian: UAtype = "keyboard"show_layout = true
[icons.layout_map]"English (US)" = "EN"Ukrainian = "UA"icons.num_off
Section titled “icons.num_off”Icon to show when num lock is disabled.
Type: string
Default: None
icons.num_on
Section titled “icons.num_on”Icon to show when num lock is enabled.
Type: string
Default:
icons.scroll_off
Section titled “icons.scroll_off”Icon to show when scroll lock is disabled.
Type: string
Default: None
icons.scroll_on
Section titled “icons.scroll_on”Icon to show when scroll lock is enabled.
Type: string
Default:
justify
Section titled “justify”The justification (alignment) of the widget text shown on the bar.
Type: 'left' | 'right' | 'center' | 'fill'
Default: 'left'
orientation
Section titled “orientation”The orientation to display the widget contents. Setting to vertical will rotate text 90 degrees.
Type: 'horizontal' | 'vertical'
Default: 'horizontal'
The Wayland seat to attach to. You almost certainly do not need to change this.
Type: string
Default: seat0
show_caps
Section titled “show_caps”Whether to show capslock indicator.
Type: boolean
Default: true
show_layout
Section titled “show_layout”Whether to show the current keyboard layout.
Default: true
Type: boolean
Default: true
show_num
Section titled “show_num”Whether to show num lock indicator.
Default: true
Type: boolean
Default: true
show_scroll
Section titled “show_scroll”Whether to show scroll lock indicator.
Default: true
Type: boolean
Default: true
Styling
| Selector | Description |
|---|---|
.keyboard | Keys box container widget. |
.keyboard .key | Individual key indicator container widget. |
.keyboard .key.enabled | Key indicator where key is toggled on. |
.keyboard .key.caps | Capslock key indicator. |
.keyboard .key.num | Num lock key indicator. |
.keyboard .key.scroll | Scroll lock key indicator. |
.keyboard .key.image | Key indicator image icon. |
.keyboard .key.text-icon | Key indicator textual icon. |
.keyboard .layout | Keyboard layout indicator. |
For more information on styling, please see the styling guide.