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

Example

{
end = [
{
type = "keyboard"
show_scroll = false
icons.caps_on = "󰪛"
icons.layout_map.'English (US)' = "🇺🇸"
icons.layout_map.Ukrainian = "🇺🇦"
}
]
}

Configuration

Type: keyboard

Size to render the icons at, in pixels (image icons only).

Type: integer
Default: 32

Player state icons.

See icons.

Default: None

Object keys

Icon to show when capslock is disabled.

Type: string
Default: None

Icon to show when capslock is enabled.

Type: string
Default: 󰪛

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: {}

{
type = "keyboard"
show_layout = true
icons.layout_map.'English (US)' = "EN"
icons.layout_map.Ukrainian = "UA"
}

Icon to show when num lock is disabled.

Type: string
Default: None

Icon to show when num lock is enabled.

Type: string
Default:

Icon to show when scroll lock is disabled.

Type: string
Default: None

Icon to show when scroll lock is enabled.

Type: string
Default:

The justification (alignment) of the widget text shown on the bar.

Type: 'left' | 'right' | 'center' | 'fill'
Default: 'left'

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

Whether to show capslock indicator.

Type: boolean
Default: true

Whether to show the current keyboard layout.

Default: true

Type: boolean
Default: true

Whether to show num lock indicator.

Default: true

Type: boolean
Default: true

Whether to show scroll lock indicator.

Default: true

Type: boolean
Default: true

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.