I’m trying to run kanata on xubuntu linux. I followed the instructions at https://github.com/jtroo/kanata/blob/main/docs/setup-linux.md, so ls -l /dev/uinput gives me crw-rw---- 1 root uinput 10, 223 Jun 2 21:41 /dev/uinput, as it should.
Now, running kanata --cfg kanata-minimal.kbd leads to this output:
21:49:23.2223 [INFO] kanata v1.9.0 starting
21:49:23.2230 [INFO] process unmapped keys: true
21:49:23.2233 [INFO] NOTE: kanata was compiled to never allow cmd
21:49:23.2240 [INFO] config file is valid
21:49:23.2271 [INFO] Created device "/dev/input/event7"
21:49:23.2274 [INFO] Sleeping for 2s. Please release all keys and don't press additional ones. Run kanata with --help to see how understand more and how to disable this sleep.
21:49:25.2276 [INFO] entering the processing loop
21:49:25.2279 [INFO] entering the event loop
21:49:25.2279 [INFO] looking for devices in /dev/input
21:49:25.2281 [INFO] Init: catching only releases and sending immediately
21:49:25.3289 [INFO] registering /dev/input/event4: "ThinkPad Extra Buttons"
21:49:25.3365 [WARN] found device /dev/input/event4 but could not register it Os { code: 16, kind: ResourceBusy, message: "Device or resource busy" }
21:49:25.3366 [INFO] registering /dev/input/event3: "AT Translated Set 2 keyboard"
21:49:25.3447 [WARN] found device /dev/input/event3 but could not register it Os { code: 16, kind: ResourceBusy, message: "Device or resource busy" }
21:49:25.8090 [INFO] Starting kanata proper
21:49:25.8090 [INFO] You may forcefully exit kanata by pressing lctl+spc+esc at any time. These keys refer to defsrc input, meaning BEFORE kanata remaps keys.
Kanata will keep running apparently, but has no effect whatsoever. Interrupting with lctl+space+Esc will not work either, stopping the process with Ctrl+C in the terminal works though.
thinkpad keyboard
So the warning probably tells me what the problem is, but I don’t know what do do about it. Does someone have an idea what to try?
I used the sample minimal config file with the following content to check, but it’s the same result with any valid config file that I tried.
This minimal config changes Caps Lock to act as Caps Lock on quick tap, but
if held, it will act as Left Ctrl. It also changes the backtick/grave key to
act as backtick/grave on quick tap, but change ijkl keys to arrow keys on hold.
This text between the two pipe+octothorpe sequences is a multi-line comment.
|#
;; Text after double-semicolons are single-line comments.
#|
One defcfg entry may be added, which is used for configuration key-pairs. These
configurations change kanata's behaviour at a more global level than the other
configuration entries.
|#
(defcfg
#|
This configuration will process all keys pressed inside of kanata, even if
they are not mapped in defsrc. This is so that certain actions can activate
at the right time for certain input sequences. By default, unmapped keys are
not processed through kanata due to a Windows issue related to AltGr. If you
use AltGr in your keyboard, you will likely want to follow the simple.kbd
file while unmapping lctl and ralt from defsrc.
|#
process-unmapped-keys yes
)
(defsrc
caps grv i
j k l
lsft rsft
)
(deflayer default
@cap @grv _
_ _ _
_ _
)
(deflayer arrows
_ _ up
left down rght
_ _
)
(defalias
cap (tap-hold-press 200 200 caps lctl)
grv (tap-hold-press 200 200 grv (layer-toggle arrows))
)
Same goes for using the linux binaries from v.1.11.0 and calling as sudo (sudo ./kanata_linux_cmd_allowed_x64 --cfg kanata.kbd).