diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-03-25 22:51:21 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-03-25 22:51:21 +0400 |
| commit | 78dbb2308e9a86186e781f078d0c3503dbf753aa (patch) | |
| tree | 1940ee58b2a7b3df9ef3c87dad536941890e8309 /wiki/Configuration:-Input.md | |
| parent | 1dce99352e16f6ead13ae11c1fa0d9ef37b2aeb6 (diff) | |
| download | niri-78dbb2308e9a86186e781f078d0c3503dbf753aa.tar.gz niri-78dbb2308e9a86186e781f078d0c3503dbf753aa.tar.bz2 niri-78dbb2308e9a86186e781f078d0c3503dbf753aa.zip | |
wiki: Start writing input configuration
Diffstat (limited to 'wiki/Configuration:-Input.md')
| -rw-r--r-- | wiki/Configuration:-Input.md | 110 |
1 files changed, 109 insertions, 1 deletions
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 |
