Instructions
Download the appropriate kanata-windows-variant.zip file for your machine CPU. Extract and move the desired binary variant to its intended location. Optionally, download kanata.kbd. With the two files in the same directory, you can double-click the extracted .exe file 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 via cmd or powershell to use a different configuration file:
kanata_windows_binaryvariant.exe --cfg <cfg_file>
Binary variants
Explanation of items in the binary variant:
- x64 vs. arm64:
- Select x64 if your machine's CPU is Intel or AMD. If ARM, use arm64.
- tty vs gui:
- tty runs in a terminal, gui runs as a system tray application
- cmd_allowed vs. not
- cmd_allowed allows the
cmd actions; otherwise, they are compiled out of the application
- winIOv2 vs. wintercept
- winIOv2 uses the LLHOOK and SendInput Windows mechanisms to intercept and send events.
- wintercept uses the Interception driver. Beware of its known issue that disables keyboards and mice until system reboot: Link to issue.
- you will need to install the driver using the release or from the copy in this repo.
- the benefit of using this driver is that it is a lower-level mechanism than Windows hooks, and
kanata will work in more applications.
wintercept installation
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 suspect 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:
Example:
C:\Users\my_user\Documents\
kanata_windows_wintercept_x64.exe
kanata.kbd
interception.dll
kanata_passthru_x64.dll
The Windows kanata_passthru_x64.dll file allows using Kanata as a library within AutoHotkey to avoid conflicts between keyboard hooks installed by both. You can channel keyboard input events received by AutoHotkey into Kanata's keyboard engine and get the transformed keyboard output events (per your Kanata config) that AutoHotkey can then send to the OS.
To make use of this, take kanata_passthru_x64.dll, then the simulated_passthru_ahk folder with a brief example, place the dll there, open kanata_passthru.ahk to read what the example does and then double-click to launch it.