Changelog (since v1.3.0)
- BREAKING FIX: kanata now errors on unknown
defcfgoptions instead of silently ignoring them. - BREAKING FIX: kanata now errors on unknown
defcfgboolean values (e.g.this-is-not-yes) instead of silently ignoring them. - BREAKING FIX: kanata timer handling accuracy has improved. The accuracy should now be +-1ms of the configuration. It was slow before this version, meaning a value of 100 for a delay/timeout might result in 110 ms instead. This might mean your configured timeouts and delays are now too fast for what you're used to.
Change log
- Fixed: macro with delay at end now behaves correctly
- Fixed: trigger error on duplicate file name
- Fixed: time handling accuracy is now +- 1ms
- Fixed: crashing when combining certain actions with chords
- Fixed(Linux): kanata hi-res scroll now works properly
- Fixed(Linux): symlink path was incorrect
- Fixed(Windows): swiss
$key - Fixed(Windows):
kprtkey behaviour with Interception - Fixed(Windows):
lsft-arrow workaround now triggers more accurately, breaking fewer use cases - Added: chords in
defseq - Added:
caps-word - Added:
macro-repeat - Added:
dynamic-macro-record-stop-truncate - Added:
defaliasenvcond - Added: config directory discovery for kanata cfg file
- Added:
rpt-any - Added: flag to remove kanata startup delay
- Added: chord output key(s)/
layer-while-heldrelease only when all input keys are released - Added:
defcfgitem to delegate transparent keys to first layer - Added:
includein configuration to include other files - Added:
movemouse-speed, to modify mouse speed at runtime - Added:
switch, a switch-case action evaluator - Added:
scnl, sequence cancel, andsequence, per-action sequence timeout - Added(Windows): increase kanata process priority for better responsiveness
- Added(Linux):
defcfgitems for filtering by device name - Added(Linux-X11):
defcfgitem for setting key repeat delay and rate
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
5138efbacedbbec3dca05bd7fbc207c01afd3772d298081735b08d710ee78380 kanata
ada28db8b19dc8122f07d3daeaee02b5a4338ab977fde99471b01bac1c22dd79 kanata.exe
67666d0dc2c36be672e06e9267762a2be92d24dcd307bac6de33330cee3952bf kanata.kbd
843443b218785cede0ec718704f8c6f9435c28337068c49abeaebdc0373f833b kanata_cmd_allowed
da996710ce838b0667afa7bb24fd4eeca0eb2424109ddace883dcf940b6fd642 kanata_cmd_allowed.exe
eff969faf08d7bbefd717dd66438699dd27e466e323cb5606e8ad8460ae0bd2d kanata_wintercept.exe
fd3a1450d99c3ee9fa7d6d18aa3712daf3f998cafdec51e4f141b26de0dc8eb9 kanata_wintercept_cmd_allowed.exe