Skip to content

Commit e684dae

Browse files
committed
update docs/examples for new keyboard/input detection
Signed-off-by: Zen <[email protected]>
1 parent 0587f98 commit e684dae

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

docs/configuration.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,13 +170,25 @@ The following parameters can be used to change the kernel module pulling and ini
170170
* `kernel_version` (uname -r) Used to specify the kernel version to pull modules for, should be a directory under `/lib/modules/<kernel_version>`.
171171
* `kmod_pull_firmware` (true) Adds kernel module firmware to dependencies
172172
* `kmod_init` - Kernel modules to `modprobe` at boot.
173-
* `kmod_autodetect_lspci` (false) Populates `kmod_init` with modules listed in `lspci -k`.
174-
* `kmod_autodetect_lsmod` (false) Populates `kmod_init` with modules listed in `lsmod`.
173+
* `kmod_autodetect_lspci` (false) Finds kernel modules for PCI devices using `/sys/bus/pci/drivers`, formely used `lspci -k`.
174+
* `kmod_autodetect_lsmod` (false) Pulls kernel modules using `/proc/modules`, formerly used `lsmod`.
175175
* `kernel_modules` - Kernel modules to pull into the initramfs. These modules will not be `modprobe`'d automatically.
176176
* `kmod_ignore` - Kernel modules to ignore. Modules which depend on ignored modules will also be ignored.
177177
* `kmod_ignore_softdeps` (false) Ignore softdeps when checking kernel module dependencies.
178178
* `no_kmod` (false) Disable kernel modules entirely.
179179

180+
##### ugrd.kmod.input
181+
182+
`ugrd.kmod.input` is automatically imported by `ugrd.kmod.kmod` and is used to detect kernel modules for keyboards, and keyboard like input devices.
183+
184+
> Miscellaneous devices and buttons may present as "input devices providing keyboard events", but are not keyboards. The `keyboard_key_threshold` option can be used to filter these devices.
185+
186+
* `kmod_autodetect_input` (true) Detects keyboard devices using `/sys/class/input/`, using `keyboard_key_threshold`.
187+
* `keyboard_key_threshold` (25) The number of keys provided by an input device before it should be considered a keyboard.
188+
189+
> If necessary input devices are not detected, they may be detected using `kmod_autodetect_lspci` or `kmod_autodetect_lsmod`.
190+
> This is not recommended, as it may cause unnecessary modules to be loaded. Please open an issue if this module does not work for your keyboard.
191+
180192
#### Kernel module helpers
181193

182194
Some helper modules have been created to make importing required kernel modules easier.

examples/example.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ modules = [
3535
kmod_autodetect_lspci = true
3636
# lsmod detection can be helpful, but can bring in unnecessary modules
3737
#kmod_autodetect_lsmod = true
38+
# keyboard/input device detection is enabled by default, but can be disabled or adjusted
39+
#kmod_autodetect_input = false
40+
# If input detection is finding non-keyboard devices, the key count threshold can be adjusted
41+
#keyboard_key_threshold = 50
3842
# If no kernel modules are needed, or installed, no_kmod should be set
3943
#no_kmod = true
4044

0 commit comments

Comments
 (0)