MyGit

v1.7.0-prerelease-2

jtroo/kanata

版本发布时间: 2024-10-20 08:11:35

jtroo/kanata最新发布版本:v1.7.0(2024-10-27 15:42:03)

Configuration guide

Link to the appropriate configuration guide version: guide link.

Changelog (since v1.6.1)

BREAKING FIX: On Linux, mouse device auto-grabbing will happen only if mouse buttons are mapped in defsrc. This is breaking if all of the following apply:

Change log

Added: O-(...) for any-order overlapping keys in sequences. Added: conditional configuration using environment variables via (environment (name val) ...) Added: allow double-quotes within strings by adding Rust-style strings r#"<content>"#. Potentially breaking, but seems doubtful that anyone has a good reason to be doing this Added: --log-layer-changes flag to override false configuration temporarily for testing Added: parse numbers as a delay (unit milliseconds) for cmd-output-keys Added: unmod can accept a modifier list as the first parameter to selectively undo only some modifiers Added: option to eagerly release override output to help with some use cases Added: cmd-log Added: reverse-release-order within multi Added: base-layer for switch logic Added: alias-to-trigger-on-load for defcfg Added: allow-hardware-repeat for defcfg Added: --quiet CLI argument to suppress warning and info logs Added(Windows): capability to use Kanata as a library for AHK Added(Windows): GUI tray app (gui variants of the executable) Added(Windows): JIS key mappings Added(Windows-Interception): add device exclusion (include by default) in defcfg Added(Linux): linux-use-trackpoint-property for middle mouse scrolling on ThinkPads Added(Linux): linux-output-device-bus-type for defcfg Added(Linux): linux-device-detect-mode for defcfg Added(macOS): unicode action is now implemented Added(macOS): mouse actions are now implemented (some bugs still exist) Fixed: chordsv2 now eagerly activates tap-hold-press|release Fixed: chordsv2 preserves event release order Fixed: chordsv2 configuration errors point to precise location Fixed: chordsv2 configuration causes error on duplicate input keys where before it would silently overwrite earlier configurations Fixed: one-shot activations from within chordsv2 are preserved Fixed: keep other macros around when another macro completes Fixed: swap incorrect unmod with custom mod keys for alt/meta Fixed: block-unmapped-keys now only blocks unspecified actions, where before it would block explicitly transparent keys 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

NOTE: All Linux binaries are compiled for x86-64 architectures only.

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 and other operating systems. This variant 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 within Windows and want kanata to handle the key positions consistently

This variant contains the same output change as in the scancode variant below, and also changes the input to also operate on scancodes.

The gui variants only use the winiov2 I/O mechanism.


NOTE: The kanata_legacy_output.exe variant has the same input defsrc handling as the standard kanata.exe file. It uses the same output mechanism as the standard kanata.exe variant in version 1.6.1 and earlier. In other words the formerly experimental_scancode variant is now the default binary. The non-legacy variants contain changes for an issue; the fix is omitted from this legacy variant. The legacy variant is included in case issues are found with the new output mechanism.


Linux

Instructions

NOTE: All Windows binaries are compiled for x86-64 architectures only.

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.

For macOS 11 and newer:

To activate it:

/Applications/.Karabiner-VirtualHIDDevice-Manager.app/Contents/MacOS/Karabiner-VirtualHIDDevice-Manager activate

For macOS 10 and older:

After installing the appropriate driver for your OS

Download a kanata_macos variant.

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.

Example

chmod +x kanata_macos_arm64   # may be downloaded without executable permissions
sudo ./kanata_macos_arm64 --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: 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 release 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.

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

kanata_passthru.dll

Explanation and instructions

The Windows kanata_passthru.dll file allows using Kanata as a library within AutoHotkey to avoid conflicts between keyboard hooks installed by both. You can channel keyboard input events received by AutoHotkey into Kanata's keyboard engine and get the transformed keyboard output events (per your Kanata config) that AutoHotkey can then send to the OS.

To make use of this, download kanata_passthru.dll, then the simulated_passthru_ahk folder with a brief example, place the dll there, open kanata_passthru.ahk to read what the example does and then double-click to launch it.

sha256 checksums

Sums
3f7223f37f86bc86872284a15f9efb4ae35a96073efd7986f106e1612bc5c65d  kanata
022bd3ab22d40a909cb9bde6a9e44b2cd981e22876efcfa29ebbcf89aa41b883  kanata.exe
0f8126baafb313f2a9c3909539ef6e1f3f5ad97375a22895f1052168bd87bc4b  kanata.kbd
b9e8040a72bb111ef38997c97d900965c8675fb3510d69e4320b35b088e48770  kanata_cmd_allowed
01caf07818be75491f17b2c7477b412aeee349a4abf5cf44559f64c7822fb985  kanata_cmd_allowed.exe
b0f1c8f9e628cb916189d5125c9dfa166aa469551e9656228d2113e1e890de7c  kanata_gui.exe
249f795f9d57ad823a980fec6e146f20968d8ca6bc99137d8755f8d0e88b2439  kanata_gui_cmd_allowed.exe
4abf2aaa406ec7b6f9ff044ba100856390ca93a0ec45c0a689fec689eab41443  kanata_gui_wintercept.exe
d4d4adcece0e1123dcf74116c2fd6516acf01b2401ad1fdc5a8d8a0856c1ca92  kanata_gui_wintercept_cmd_allowed.exe
6a5ecc2c3fb7c88fcd365e89eee163d06040fd38576e923ec25a29d4dbcbd25c  kanata_legacy_output.exe
59c3b78a53bcffd350cb6c3b7644915a2066a8c55212d5427c0f88f2d999fbca  kanata_macos_arm64
581a5de3cecfa89206fc5d6bb35c58c5ba856e1e6b0866972bfe5db1275e46ff  kanata_macos_cmd_allowed_arm64
45d1bf1ffb9d74a6185488652763cffbf2835b9bd11fcd3bd762c95cccb766ef  kanata_macos_cmd_allowed_x86_64
e8a9bae08f42a21222cdc0fb1db8fc322cf06709229f9e5cd2a2e77a0b8dc7c6  kanata_macos_x86_64
e6c0465ed6d914a6bf9257c64ba8d7f616bf0caa4c65bf319ae1f6d68efb4ed9  kanata_passthru.dll
d76642054c0e4c51299045183e1426b3d04fbe622b1d719969a426ebf1d8ad02  kanata_winIOv2.exe
bff981ee5e9426e1e954f09034d3c3dc047da57f2440c1121f29b7b2b202ea84  kanata_wintercept.exe
6d5ad0e5795e511fc7972600bd96f537835f3098423c043a299b7df46a9f9b3f  kanata_wintercept_cmd_allowed.exe

相关地址:原始地址 下载(tar) 下载(zip)

1、 kanata 1.69MB

2、 kanata.exe 1.16MB

3、 kanata.kbd 56.08KB

4、 kanata_cmd_allowed 1.7MB

5、 kanata_cmd_allowed.exe 1.24MB

6、 kanata_gui.exe 2.23MB

7、 kanata_gui_cmd_allowed.exe 2.31MB

8、 kanata_gui_wintercept.exe 2.25MB

9、 kanata_gui_wintercept_cmd_allowed.exe 2.33MB

10、 kanata_legacy_output.exe 1.22MB

11、 kanata_macos_arm64 2.55MB

12、 kanata_macos_cmd_allowed_arm64 2.6MB

13、 kanata_macos_cmd_allowed_x86_64 2.71MB

14、 kanata_macos_x86_64 2.66MB

15、 kanata_passthru.dll 1.93MB

16、 kanata_winIOv2.exe 1.16MB

17、 kanata_wintercept.exe 1.18MB

18、 kanata_wintercept_cmd_allowed.exe 1.26MB

19、 sha256sums 1.55KB

查看:2024-10-20发行的版本