Changelog (since v1.4.0)
BREAKING FIX: change unicode yen key mapping to mean KEY_YEN instead of backslash.
BREAKING FIX: clear non-oneshot output chord (e.g. C-a) on next action.
BREAKING FIX: forcefully release all keys for a valid visible-backspaced sequence because modifiers can change the behaviour of backspace.
BREAKING FIX: add default (128) and configurable limit on dynamic macro recorded keys to protect users from forgetting to end and recording too many keys.
Change log
on-idle-fakekey action
toggle option for fake key actions
movemouse-inherit-accel-state
movemouse-smooth-diagonals
unmod and unshift actions
key-history in switch
KEY_YEN instead of backslash
rpt-any works in more cases
mbck/mfwd up/down were switched, making Windows behave strangely
rustix dependency
Sample configuration file
The attached kanata.kbd file is tested to work with the current version. The one in the main branch of the repository may have extra features that are not supported in this release.
Windows
Instructions
Download kanata.exe. Optionally, download kanata.kbd. With the two files in the same directory, you can double-click the exe to start kanata. Kanata does not start a background process, so the window needs to stay open after startup. See this discussion for tips to run kanata in the background.
You need to run kanata.exe via cmd or powershell to use a different configuration file:
kanata.exe --cfg <cfg_file>
Linux
Instructions
Download kanata.
Run it in a terminal and point it to a valid configuration file. Kanata does not start a background process, so the window needs to stay open after startup. See this discussion for how to set up kanata with systemd.
chmod +x kanata # may be downloaded without executable permissions
sudo ./kanata --cfg <cfg_file>`
To avoid requiring sudo, follow the instructions here.
cmd_allowed variants
Explanation
The binaries with the name cmd_allowed are conditionally compiled with the cmd action enabled.
Using the regular binaries, there is no way to get the cmd action to work. This action is restricted behind conditional compilation because I consider the action to be a security risk that should be explicitly opted into and completely forbidden by default.
wintercept variants
Explanation and instructions
Warning: known issue
This issue in the Interception driver exists: oblitum/Interception#25. This will affect you if you put your PC to sleep instead of shutting it down, or if you frequently plug/unplug USB devices.
Description
These variants use the Interception driver instead of Windows hooks. You will need to install the driver using the assets from the linked website or from the copy in this repo. The benefit of using this driver is that it is a lower-level mechanism than Windows hooks. This means kanata will work in more applications, including administrator-privileged apps.
Steps to install the driver
- extract the
.zip - run a shell with administrator privilege
- run the script
"command line installer/install-interception.exe" - reboot
Additional installation steps
The above steps are those recommended by the interception driver author. However, I have found that those steps work inconsistently and sometimes the dll stops being able to be loaded. I think it has something to do with being installed in the privileged location of system32\drivers.
To help with the dll issue, you can copy the following file in the zip archive to the directory that kanata starts from: Interception\library\x64\interception.dll.
E.g. if you start kanata from your Documents folder, put the file there:
C:\Users\my_user\Documents\
kanata_wintercept.exe
kanata.kbd
interception.dll
sha256 checksums
Sums
b06ddd8ad23a95be2b1ff8c8d91dfd4082b61a6f21d6825c615d7729d69736de kanata
61c600b133941899177d358fdc4babedf650eeda56f2636b151ad8cb9906c1d7 kanata.exe
85dc28a5d83b514484414365a46c97863771b44c2b12178beeadf4c34b434bff kanata.kbd
0f502a019169e2bdd070ea3865543b44b86729c324bb5c02e0f024cc3f165893 kanata_cmd_allowed
ff8f4a04b4af4ece130262ec1707d2f2da438e7b527413e6f6014c72f44bcd34 kanata_cmd_allowed.exe
dcd9ff220ea0145b9f325f01d10f427aef87663df00274fbe32c7f8a3fe3d9e6 kanata_wintercept.exe
ded65e0b616b36f8033fabf0936dc5a7450aa57eb187c304946f61a672d168d6 kanata_wintercept_cmd_allowed.exe