Input🔗

Configure keyboards, mice, touchpads, and the cursor inside the input block. Changes reload on save.

Keyboard🔗

input {
  keyboard {
    xkb {
      layout  "us"
      variant ""
      options "ctrl:nocaps"
    }
    repeat-rate  40
    repeat-delay 300
  }
}
SettingFormatDescription
xkb.layoutStringXKB layout name, e.g. "us", "de", "us,ru".
xkb.variantStringLayout variant, e.g. "dvorak", "colemak".
xkb.optionsStringXKB options, e.g. "ctrl:nocaps", "compose:ralt".
xkb.modelStringKeyboard model. Usually not needed.
xkb.rulesStringXKB rules file. Usually not needed.
repeat-rateHzKeys repeated per second while held.
repeat-delaymsDelay before key repeat starts.

To list available layouts, variants, and options:

localectl list-x11-keymap-layouts
localectl list-x11-keymap-variants us
localectl list-x11-keymap-options | grep ctrl

Mouse🔗

input {
  mouse {
    natural-scroll #false
    accel-speed    0.0
  }
}
SettingValuesDescription
natural-scrollBoolReverse scroll direction.
accel-speed-1.0..1.0Pointer acceleration. 0.0 is the default.
accel-profile"flat", "adaptive"Acceleration profile.
offBoolDisable the device entirely.

Touchpad🔗

input {
  touchpad {
    tap            #true
    natural-scroll #true
    dwt            #true
    accel-speed    0.2
  }
}
SettingValuesDescription
tapBoolEnable tap-to-click.
tap-button-map"lrm", "lmr"Map 1/2/3-finger tap to left/right/middle or left/middle/right.
natural-scrollBoolReverse scroll direction.
dwtBoolDisable touchpad while typing.
accel-speed-1.0..1.0Pointer acceleration.
scroll-factorFloatScroll speed multiplier.
offBoolDisable the touchpad entirely.

Cursor🔗

input {
  cursor {
    theme         "Adwaita"
    size          24
    shake-to-find #true
  }
}
SettingFormatDescription
themeStringCursor theme name. Must be installed on the system.
sizePixelsBase cursor size.
shake-to-findBoolTemporarily enlarge the cursor when you shake the mouse — useful on high-DPI or multi-monitor setups.

Targeting a Specific Device🔗

Name a device block to apply settings only to a specific input device. Use libinput list-devices to find the device name:

input {
  device "ACME Gaming Mouse" {
    accel-speed    -0.5
    accel-profile  "flat"
  }
}