From 78dbb2308e9a86186e781f078d0c3503dbf753aa Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Mon, 25 Mar 2024 22:51:21 +0400 Subject: wiki: Start writing input configuration --- wiki/Configuration:-Input.md | 110 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 109 insertions(+), 1 deletion(-) (limited to 'wiki/Configuration:-Input.md') diff --git a/wiki/Configuration:-Input.md b/wiki/Configuration:-Input.md index 00d7bdd4..a88f830d 100644 --- a/wiki/Configuration:-Input.md +++ b/wiki/Configuration:-Input.md @@ -1 +1,109 @@ -WIP +### Overview + +In this section you can configure input devices like keyboard and mouse, and some input-related options. + +All settings at a glance: + +``` +input { + keyboard { + xkb { + // layout "us" + // variant "colemak_dh_ortho" + // options "compose:ralt,ctrl:nocaps" + // model "" + // rules "" + } + + // repeat-delay 600 + // repeat-rate 25 + // track-layout "global" + } + + touchpad { + tap + // dwt + // dwtp + natural-scroll + // accel-speed 0.2 + // accel-profile "flat" + // tap-button-map "left-middle-right" + // click-method "clickfinger" + } + + mouse { + // natural-scroll + // accel-speed 0.2 + // accel-profile "flat" + } + + trackpoint { + // natural-scroll + // accel-speed 0.2 + // accel-profile "flat" + } + + tablet { + map-to-output "eDP-1" + } + + touch { + map-to-output "eDP-1" + } + + // disable-power-key-handling + // warp-mouse-to-focus + // focus-follows-mouse + // workspace-auto-back-and-forth +} +``` + +### Keyboard + +#### Layout + +In the `xkb` section, you can set layout, variant, options, model and rules. +These are passed directly to libxkbcommon, which is also used by most other Wayland compositors. +See the `xkeyboard-config(7)` manual for more information. + +``` +input { + keyboard { + xkb { + layout "us" + variant "colemak_dh_ortho" + options "compose:ralt,ctrl:nocaps" + } + } +} +``` + +When using multiple layouts, niri can remember the current layout globally (the default) or per-window. +You can control this with the `track-layout` option. + +- `global`: layout change is global for all windows. +- `window`: layout is tracked for each window individually. + +``` +input { + keyboard { + track-layout "global" + } +} +``` + +#### Repeat + +Delay is in milliseconds before the keyboard repeat starts. +Rate is in characters per second. + +``` +input { + keyboard { + repeat-delay 600 + repeat-rate 25 + } +} +``` + +### TBD -- cgit