jtroo / kanata

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

Bug: PrintScreen not triggering #1169

Open lavishyay opened 4 months ago

lavishyay commented 4 months ago

Requirements

Describe the bug

When Kanata is running, the print screen doesn't trigger even though it shows up on debug

Relevant kanata config

(defcfg process-unmapped-keys yes )

(defsrc caps y bspc / ralt comp rctrl

)

(deflayer default @cap


)

(deflayer one @cap prtsc del up left down rght )

(defalias cap (tap-hold-press 200 200 (switch ((layer default)) (layer-switch one) break ((layer one)) (layer-switch default) break ) (layer-toggle one)) )

To Reproduce

  1. Run Kanata
  2. Try to press printscreen

Expected behavior

Print Screen to trigger/show up on keyboard tester

Kanata version

kanata 1.7.0-prerelease-1

Debug logs

No response

Operating system

Windows 11

Additional context

No response

jtroo commented 4 months ago

Which variant are you using? Also please add the debug logs

lavishyay commented 4 months ago

https://github.com/jtroo/kanata/releases/tag/v1.7.0-prerelease-1 kanata.exe from assets. also i just tried it using kanata_gui.exe from the same assets and printscreen works now and i checked but it doesn't work on kanata.exe

debug logs:

15:02:00.0910 [INFO] Entered layer:

(deflayer one @cap PrintScreen del up left down rght ) 15:02:00.1638 [DEBUG] (1) kanata_state_machine::kanata::windows::llhook: event loop: KeyEvent { code: KEY_Y (89), value: Press } 15:02:00.1642 [DEBUG] (2) kanata_state_machine::kanata: process recv ev KeyEvent { code: KEY_Y (89), value: Press } 15:02:00.1644 [DEBUG] (2) kanata_state_machine::kanata: key press PScreen 15:02:00.2868 [DEBUG] (1) kanata_state_machine::kanata::windows::llhook: event loop: KeyEvent { code: KEY_Y (89), value: Release } 15:02:00.2870 [DEBUG] (2) kanata_state_machine::kanata: process recv ev KeyEvent { code: KEY_Y (89), value: Release } 15:02:00.2871 [DEBUG] (2) kanata_state_machine::kanata: key release PScreen 15:02:00.3858 [DEBUG] (1) kanata_state_machine::kanata::windows::llhook: event loop: KeyEvent { code: KEY_Y (89), value: Press } 15:02:00.3860 [DEBUG] (2) kanata_state_machine::kanata: process recv ev KeyEvent { code: KEY_Y (89), value: Press } 15:02:00.3862 [DEBUG] (2) kanata_state_machine::kanata: key press PScreen 15:02:00.5088 [DEBUG] (1) kanata_state_machine::kanata::windows::llhook: event loop: KeyEvent { code: KEY_Y (89), value: Release } 15:02:00.5098 [DEBUG] (2) kanata_state_machine::kanata: process recv ev KeyEvent { code: KEY_Y (89), value: Release } 15:02:00.5101 [DEBUG] (2) kanata_state_machine::kanata: key release PScreen 15:02:00.7058 [DEBUG] (1) kanata_state_machine::kanata::windows::llhook: event loop: KeyEvent { code: KEY_CAPSLOCK (20), value: Release } 15:02:00.7071 [DEBUG] (2) kanata_state_machine::kanata: process recv ev KeyEvent { code: KEY_CAPSLOCK (20), value: Release } 15:02:00.7073 [INFO] Entered layer:

(deflayer default @cap


)

rpnfan commented 4 months ago

For me on 1.7 pre-release 1 prtsc works fine on Windows.

jtroo commented 3 months ago

Hm maybe there's some window permission issue here. Kanata is sending all the right events.

lavishyay commented 3 months ago

yeah probably something from my side since only the kanata.exe doesn't work and the kanata_gui.exe works and 1.6 also works

jtroo commented 3 months ago

That's an interesting observation. All of these use different bits of Windows I/O:

KajanM commented 4 weeks ago

having same issue 1.7.0 release candidate

in my case both PrintScreen and NumpadEnter are ignored

no issues with kanata_gui.exe