Skip to content

v1.0.7

Compare
Choose a tag to compare
@jtroo jtroo released this 20 Aug 21:37
· 702 commits to main since this release

Changelog

  • Add support for the interception driver
  • Add vertical and horizontal mouse scrolling actions
  • Add fake keys feature with press-only, release-only actions
  • Add leader->sequence actions that activate a fake key tap
  • Fix mouse button regression in Linux in v1.0.6

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.

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:

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: experimental feature

The interception driver support is newly added in this release. Some handling of specific key inputs/outputs may be incorrect because the driver uses a different scancode mechanism vs. existing code. Please file bugs if you find issues.

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 down or 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

Known issues

  • Not all keys are mapped (e.g. L/R Windows keys, numpad Enter)
    • This is fixed in the latest main branch - you can build it yourself with:
    • cargo build --release --features interception_driver

sha256 checksums

4310ec51672d51ed335340861e181aed7e8717f87ea11f07db2c217ab02cd15c  kanata.kbd
40797919c508b5c361038d53009982c508a48339822e8acd874c8daf9696630a  kanata
f82a77495e38a5c04f43eb4c5353cf74c02e2db81c5f0ba9728e8543d9a15325  kanata.exe
1525391232738d3cc139cc68fa24b5624ab11c7d17fe3d48701d3ef8881103ba  kanata_cmd_allowed
aa74311a15edb9a6c9d8f355170f6454c9d7aaff402fc00ebb667b9ae7dd9151  kanata_cmd_allowed.exe
79553252062d0438d00e557d940928f58c1e95c8fdb997bf935b58fcbda280ff  kanata_wintercept.exe
757e57367c68d820afdda4ca5ed812c47b5aed2861debb514a19976436db1a83  kanata_wintercept_cmd_allowed.exe