Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: PrintScreen not triggering #1169

Open
1 task done
lavishyay opened this issue Jul 27, 2024 · 6 comments
Open
1 task done

Bug: PrintScreen not triggering #1169

lavishyay opened this issue Jul 27, 2024 · 6 comments
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@lavishyay
Copy link

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

@lavishyay lavishyay added the bug Something isn't working label Jul 27, 2024
@jtroo
Copy link
Owner

jtroo commented Jul 28, 2024

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

@lavishyay
Copy link
Author

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
Copy link

rpnfan commented Jul 28, 2024

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

@jtroo jtroo added the question Further information is requested label Aug 4, 2024
@jtroo
Copy link
Owner

jtroo commented Aug 4, 2024

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

@lavishyay
Copy link
Author

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
Copy link
Owner

jtroo commented Aug 4, 2024

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

  • kanata.exe 1.6 : no flags
  • kanata.exe 1.7 : win_sendinput_send_scancodes
  • kanata_gui.exe : win_sendinput_send_scancodes,win_llhook_read_scancodes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants