summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorWez Furlong <wez@wezfurlong.org>2021-11-24 09:51:27 -0700
committerWez Furlong <wez@wezfurlong.org>2021-11-24 10:07:47 -0700
commitefbdbd7328af7c7434a5099f7b69511ebf19e822 (patch)
tree4dd6654bb5fa5e516c4d2ddeca2d461d0698546f /README.md
parent2418943fd5f945e02bdfa8bbaa5eb3759f738e3d (diff)
Improve handling ambiguous device names
* Adds the `phys` info for the device to the list * Orders names by name first then by the eventXXX number component so that there is a "stable" ordering for a given set of inputs * When a name has ambiguous matches, warnings are logged to advise the user how to resolve them. Example: ``` ; cat /tmp/evremap.toml device_name = "Power Button" ``` ``` sudo ./target/debug/evremap remap /tmp/evremap.toml 2021-11-24T10:04:40.885 ERROR evremap > Short delay: release any keys now! 2021-11-24T10:04:43.084 WARN evremap::deviceinfo > The following devices match name `Power Button`: 2021-11-24T10:04:43.084 WARN evremap::deviceinfo > DeviceInfo { name: "Power Button", path: "/dev/input/event0", phys: "PNP0C0C/button/input0" } 2021-11-24T10:04:43.084 WARN evremap::deviceinfo > DeviceInfo { name: "Power Button", path: "/dev/input/event1", phys: "LNXPWRBN/button/input0" } 2021-11-24T10:04:43.084 WARN evremap::deviceinfo > evremap will use the first entry. If you want to use one of the others, add the corresponding phys value to your configuration, for example, `phys = "LNXPWRBN/button/input0"` for the second entry in the list. 2021-11-24T10:04:43.085 ERROR evremap::remapper > Going into read loop ``` refs: #2 closes: #3
Diffstat (limited to 'README.md')
-rw-r--r--README.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/README.md b/README.md
index 6656baf..0b4b2ca 100644
--- a/README.md
+++ b/README.md
@@ -29,6 +29,10 @@ Here's an example configuration that makes capslock useful:
# on your system.
device_name = "AT Translated Set 2 keyboard"
+# If you have multiple devices with the same name, you can optionally
+# specify the `phys` value that is printed by the `list-devices` subcommand
+# phys = "usb-0000:07:00.3-2.1.1/input0"
+
# Configure CAPSLOCK as a Dual Role key.
# Holding it produces LEFTCTRL, but tapping it
# will produce ESC.