Skip to content

v1.3.0

Compare
Choose a tag to compare
@jtroo jtroo released this 25 Mar 06:14
· 528 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: fork action that chooses left or right actions based on currently active keys
  • 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
561b58713d9b0967be17e782355766feca3fa9bed45e6b396fa0ba224eba36b5  kanata
a2848d43067de517855ca4321a90d6f3ff3bd0ea221aec52d0d6973df28c8760  kanata.exe
f862b7cad27d5d0bc4e7371bbb106fdb08453682f3729e63d45f62a7308ed7e6  kanata.kbd
5d8566211f0025c508397d7ff33f766ed3bb928556ef54c0ad536a07716bc18c  kanata_cmd_allowed
df2cab04eab5cb4fbd57e8ab72b7808e2bb3b93321f9c15a8e4f06dea3e5439d  kanata_cmd_allowed.exe
8fd91940772e790027e2e0024fff90db6c9e0b88f4641274dfa59148b663a3ca  kanata_wintercept.exe
2ad144c51c62f7af8c73af1d6ffd4454d559d5ccb3aa9e820a7d66d12008e859  kanata_wintercept_cmd_allowed.exe