v1.6.0-prerelease-2
Pre-releaseConfiguration guide
Link to the appropriate configuration guide version: guide link.
Changelog (since v1.5.0)
BREAKING FIX: dynamic-macro
now records and simulates delays by default to reproduce tap-hold effects correctly. It can be turned off via an undocumented defcfg entry.
BREAKING FIX: TCP server messages now emit newline terminators for easier message differentiation.
BREAKING FIX: Add concat
keyword for defvar that enables appending strings together. This will only break you if you happened to use concat as the very first string in a list value in defvar, which seems unlikely.
BREAKING FIX: Chord release behaviour has been improved but might affect existing workflows
BREAKING CHANGE: Add web event.code names as usable configuration key names, making them no longer usable in deflocalkeys
.
Change log
- Added:
concurrent-tap-hold
to defcfg, allowing tap-hold actions to time out in parallel - Added:
--check
argument to verify config file without starting kanata - Added:
lrld-num
action, allowing live reloading a specific config argument position - Added:
block-unmapped-keys
to defcfg - Added:
rapid-event-delay
as a mitigation around desktop environments incorrectly handling some rapid events - Added: template definition and expansion for reducing boilerplate
- Added: more switch logic (
not
,key-timing
,input
,input-history
) - Added:
lrld-file
action - Added: improved wording + syntax of fake key operations, changing name from fake to virtual
- Added: more TCP client requests and server events
- Added (Windows Interception):
windows-interception-keyboard-hwids
to specify specific keyboards to intercept - Added (Windows Interception):
windows-interception-mouse-hwids
to specify multiple mice to intercept - Added (macOS): kext support for macOS version 10
- Fixed: chord key association for presses/releases
- Fixed: chords resulting in multiple tap-holds can now activate both holds
- Fixed (Linux): exit on
SIGTSTP
to prevent locking out users from using the keyboard - Fixed (Windows LLHOOK): reduced blast radius of lsft workaround (properly this time)
- Fixed (Windows LLHOOK): handling of locking via Win+L works correctly
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>
NOTE: The kanata_winIOv2.exe
variant contains an experimental breaking change that fixes an issue where the Windows LLHOOK+SendInput version of kanata does not handle defsrc
consistently compared to other versions. This will be of interest to you for any of the following reasons:
- you are a new user
- you are a cross-platform user
- you use multiple language layouts and want kanata to handle the key positions consistently
Known issues:
deflocalkeys-win
does not work properly for this variant. It needs a different variant (or use the values you would use fordeflocalkeys-wintercept
NOTE: The kanata_scancode_experimental.exe
variant has the same defsrc
handling as the standard kanata.exe
file but contains an change for an issue where kanata outputs are not handled correctly by some applications. This has not yet been extensively tested but the hope is that it is a strict improvement in scenarios where kanata operates correctly.
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.
macOS
Instructions
WARNING: feature support on macOS is limited
WARNING: the provided binaries are only for x86 devices. If you are using ARM macs, e.g. M1/M2, you must compile kanata yourself
For macOS 11 and newer:
- Install the Karabiner VirtualHiDDevice Driver.
To activate it:
/Applications/.Karabiner-VirtualHIDDevice-Manager.app/Contents/MacOS/Karabiner-VirtualHIDDevice-Manager activate
For macOS 10 and older:
- Install the Karabiner kernel extension.
After installing the appropriate driver for your OS
Download kanata_macos
.
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.
chmod +x kanata_macos # may be downloaded without executable permissions
sudo ./kanata_macos --cfg <cfg_file>`
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
71998c18425b94359b12dc3e406654aa50dc9f79bf40c4a3c082ccbfbfbe7b28 kanata
1fdfe418c41f516507df3498929a28e4b0eece97f02071701a5f318fd28fb1bc kanata.exe
0eaf5b61bf8357e238bdf80980e77e2639c0957cd66d5eaef327a6da11d27952 kanata.kbd
7d814cff7cda4692ebf3268e810c1ef668bae4bd345d90acea6fc1dac5b48cd1 kanata_cmd_allowed
5592cf8228fd9048c84b8e55c9f41756d90d5a11ed74fee403bdf44448d8a481 kanata_cmd_allowed.exe
35a99fe7aee6376252b29e5104b4fddc70e1c0ddf050c1365e8feb3b472aa089 kanata_macos_x86
348fc51b49b2aee23e6513013295a2ba5b409d821ca5435e186092d2a87218aa kanata_macos_cmd_allowed_x86
9e7fa0400fcfc7495bfd69161deb08995f68b0fcf8eda4c261e0346233d3674d kanata_scancode_experimental.exe
6a7fbab1d43be8ba1fd97b92832f5c9760bbcf0ae56b192f4246640e21f14a28 kanata_winIOv2.exe
1ffe166b019ceb7f1f74a562886016a891682be44d93320ab8f1fd111b989b60 kanata_wintercept.exe
43c7d52d31703371171ff1a19955bc22f21b394282b67f90fab8ea13f5590e7a kanata_wintercept_cmd_allowed.exe