Skip to content

v1.3.0-prerelease-1

Pre-release
Pre-release
Compare
Choose a tag to compare
@jtroo jtroo released this 27 Feb 07:28
· 589 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.
  • Fix: do not close immediately on error

  • Fix(Linux): change locking pattern causing unresponsiveness in some cases

  • 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: ensure all keys are released at the end of a dynamic macro

  • 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

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>

You can also set up a toolbar shortcut.

Linux

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

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

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

210f8e84daadb8897d3dc58977d51ce07d4563800d88adf400c95f63171eb02a  kanata
f3676580580b9d4df7ece6068d0d6feac9d05ef092cf5b0e961b9b5b3c1d5680  kanata.exe
7e00eb2ff2bfff6fe4cf46eaf48dbe6d87d15fa86041a8306672fbb26718cb54  kanata.kbd
f125165c22b9d830e4d587ff8f1f164c51a9e785c27e9a53f459594db7d2da96  kanata_cmd_allowed
5f4ac0ed29f1eb7811b0f598ad3b995acb60a4ee0e74875393079b7b15e40d2e  kanata_cmd_allowed.exe
9b80498acc978d451682f833592aab17cfecdc5a931d608df3ce342593c420e5  kanata_wintercept.exe
096679538b87ede63b450949752a2ce5612766214de4acaa1e13308eb288e7a8  kanata_wintercept_cmd_allowed.exe