jtroo / kanata

Improve keyboard comfort and usability with advanced customization
GNU Lesser General Public License v3.0
2.15k stars 111 forks source link

Bug: kanata interception gui executable does not use interception #1190

Closed jvlara closed 5 days ago

jvlara commented 1 month ago

Requirements

Describe the bug

Hi, i downloaded the binary https://github.com/jtroo/kanata/releases/download/v1.7.0-prerelease-1/kanata_gui_wintercept.exe but it starts with llhook

maybe it was not compiled with the flag? it does not have the same file size as the normal, strange image

Relevant kanata config

No response

To Reproduce

  1. Download the interception binary for gui on windows
  2. Run the file and run it, check that it starts with llhook

Expected behavior

Run with interception

Kanata version

1.7.0

Debug logs

No response

Operating system

Windows 11

Additional context

No response

jtroo commented 1 month ago

Interesting, I wonder if the fault is some alignment nonsense https://github.com/jtroo/kanata/blob/ac27bdb58b28ac915964aad273a186e7a9d8d9ce/justfile#L24

eugenesvk commented 6 days ago

Could you check the kanata_gui_wintercept_cmd_allowed version? It seems like indeed the whitespace is the issue and the kanata_gui_wintercept.exe is a copy of the previous build katana.exe (since the new kanata fails to build), which uses llhook (kanata_gui_wintercept_cmd_allowed has no whitespace, so should work as is, and works for me) Or try the linked PR version if you can build

gerhard-h commented 6 days ago
cargo build --release --features win_manifest,gui,interception_driver,cmd
   Compiling kanata v1.7.0-prerelease-1 (C:\path\kanata)
   Compiling kanata-parser v0.171.1 (C:\path\kanata\parser)
error[E0428]: the name `DEF_LOCAL_KEYS` is defined multiple times
   --> parser\src\cfg\mod.rs:392:1
    |
390 | const DEF_LOCAL_KEYS: &str = "deflocalkeys-winiov2";
    | ---------------------------------------------------- previous definition of the value `DEF_LOCAL_KEYS` here
391 | #[cfg(all(feature = "interception_driver", target_os = "windows"))]
392 | const DEF_LOCAL_KEYS: &str = "deflocalkeys-wintercept";
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `DEF_LOCAL_KEYS` redefined here

I got this error on the main branch. After commenting out line 390 I was able to compile and run kanata on command line. GUI worked.

eugenesvk commented 5 days ago

Yeah, had the same issue, forgot to mention that I used an earlier commit (before 1.8 fix, something is broken in the current compile conditionals)

Thanks for testing