v1.3.0-prerelease-2
版本发布时间: 2023-03-12 15:13:40
jtroo/kanata最新发布版本:v1.7.0(2024-10-27 15:42:03)
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(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(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>
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
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: https://github.com/oblitum/Interception/issues/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
7e919063e29c85b6fe6a6bbb5e746da329bb04013a569246a85e1ed7c0bc9a14 kanata
87af0cb1612c55693c4aef62e66eba041863bbc0915954e6b80097e9abf7c93e kanata.exe
b8605a1eb1e1cdfb73ee0cd2cc6fb39a39bc824984f7f31d3c49df9cf9629c1f kanata.kbd
9bd5aa163b5d1cbf8fda84222a3d8626aad8ee6702c72fd1bef6a9c7955caaad kanata_cmd_allowed
5d0f27ee95b1bb054b80c02d781bf3117635fe9a54031f313906e970f2759dfa kanata_cmd_allowed.exe
20bf9b80721b8ef9ebd7fc4bb95e5bd765bad20efc0b7081038f90da64a7388d kanata_wintercept.exe
f40e3938f081897b2670c55d3103f047fd8f032f9934636604c5fd74d66b434e kanata_wintercept_cmd_allowed.exe
1、 kanata 1.26MB
2、 kanata.exe 899.5KB
3、 kanata.kbd 31.89KB
4、 kanata_cmd_allowed 1.3MB
5、 kanata_cmd_allowed.exe 981KB
6、 kanata_wintercept.exe 904.5KB
7、 kanata_wintercept_cmd_allowed.exe 985.5KB
8、 sha256sums 589B