Skip to content

v1.3.0-prerelease-3

Pre-release
Pre-release
Compare
Choose a tag to compare
@jtroo jtroo released this 17 Mar 07:36
· 550 commits to main since this release

Changelog (since v1.2.0)

WARNING: Kanata now errors on invalid top-level config items. Kanata previously would ignore these and they would do nothing. Now they result in errors in the configuration.


Change log
  • Fix: do not close immediately on error
  • Fix: increase keyberon key queue size to help with long tap-hold durations
  • Fix(Linux): change locking pattern causing unresponsiveness in some cases
  • Fix(Linux): add accidentally uncfg'd key names
  • Fix(Windows): release shift properly on shifted arrows
  • Fix(Windows-Interception): correction of deflocalkeys-wintercept
  • Fix(Windows-Interception): fix issue with Interception driver sending Esc
  • Fix(Windows-Interception): use Interception mouse movement instead of SendInput

  • Added: -timeout variants of tap-hold that add a third potential action
  • Added: pretty errors using the miette crate
  • Added: make defcfg optional
  • Added: allow disabling of layer logging
  • Added: ensure all keys are released at the end of a dynamic macro
  • Added: tap-hold-release-keys
  • Added: one-shot variants
  • Added: defvar to allow defining variables
  • Added(Linux): mouse move support to Linux
  • Added(Linux): systemd notification when kanata has finished starting up
  • Added(Windows-Interception): use SendInput for arbitrary-code in Interception as well

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
a05d8176c2b6ca8a97beab317e1beaafd32fdfb97ed44c6e8bd3d72e439efef2  kanata
ba82f934ec56d54eff9a60262fae35d791b47ca3e23df6b0dce2816e0f5f2e96  kanata.exe
bf71d7a2b05b15bf3d61e68356ec3b054f1c40958fbd564aa126fc9db0652527  kanata.kbd
992ef35db54a5c2b2ffcac04a42e85c7c462f92dfb7c5c0f201e7a273fe8064b  kanata_cmd_allowed
86346d482ac3cefc27f366398f08c250e4c8abe73fb030b774ba130246142fd4  kanata_cmd_allowed.exe
f014b7aa701539117934754589bfb2219a915638f70bc380ca4abd5e5e8a24ee  kanata_wintercept.exe
7fdb7af98a431005c59dc42733334c5b33ebf59a93a2ab43da4e6004863823cc  kanata_wintercept_cmd_allowed.exe