gitui icon indicating copy to clipboard operation
gitui copied to clipboard

Shifted keys are not fully recognized when using AutoHotKey on Windows

Open fnuttens opened this issue 1 year ago • 0 comments

Describe the bug The SHIFT modifier is missing when an AHK script is running. Thus, shifted-keys commands do not work.

In the following logs, the first one was taken with AHK enabled (notice the uppercased char H and the blank modifier 0x0), the second one without:

14:20:30 [TRACE] (1) gitui::app: [src\app.rs:278] event: Input(Key(KeyEvent { code: Char('H'), modifiers: KeyModifiers(0x0), kind: Press, state: KeyEventState(0x0) }))
14:24:27 [TRACE] (1) gitui::app: [src\app.rs:278] event: Input(Key(KeyEvent { code: Char('H'), modifiers: KeyModifiers(SHIFT), kind: Press, state: KeyEventState(0x0) }))

To Reproduce

  1. Launch an AHK script that emulates a full keyboard layout
  2. Try to use any shifted-key command in GitUI
  3. Observe that it does not work

Expected behavior The SHIFT modifier is present when using AHK and the shifted-keys commands work. Or, GitUI could rely on the character case only, although I guess the modifier is picked up for a reason.

Context

  • Windows 10
  • GitUI 0.25.1
  • AutoHotKey 1.1.37.01

fnuttens avatar Mar 13 '24 15:03 fnuttens