alt_focus_hack causes alt to stick with AutoHotkey #236

Closed
opened 2026-01-05 14:49:12 +01:00 by adam · 4 comments
Owner

Originally created by @skotom on GitHub (Aug 25, 2023).

Description
When using RAlt or AltGr as modifier key in AutoHotkey (possibly in whkd, didn't check that one) and alt_focus_hack option is set to true, Alt key will stick. I couldn't really figure out what the option does but it's included by default. When I set it to false everything works ok.

To Reproduce
Steps to reproduce the behavior:

  1. Use AutoHotkey v2
  2. Set for example RAlt & 1:: komorebic send-to-workspace 1 or <^>!1:: "komorebic send-to-workspace 1"
  3. Run komorebic with "alt_focus_hack": true, in komorebi.json
  4. When using command alt key sticks and you have to press alt to continue using keyboard normally.

Operating System

OS Name:                   Microsoft Windows 10 Pro
OS Version:                22H2 Build  19045.3324
Originally created by @skotom on GitHub (Aug 25, 2023). **Description** When using RAlt or AltGr as modifier key in AutoHotkey (possibly in whkd, didn't check that one) and alt_focus_hack option is set to true, Alt key will stick. I couldn't really figure out what the option does but it's included by default. When I set it to false everything works ok. **To Reproduce** Steps to reproduce the behavior: 1. Use AutoHotkey v2 2. Set for example `RAlt & 1:: komorebic send-to-workspace 1` or `<^>!1:: "komorebic send-to-workspace 1"` 4. Run komorebic with `"alt_focus_hack": true,` in komorebi.json 5. When using command alt key sticks and you have to press alt to continue using keyboard normally. **Operating System** ``` OS Name: Microsoft Windows 10 Pro OS Version: 22H2 Build 19045.3324 ```
adam added the bug label 2026-01-05 14:49:12 +01:00
adam closed this issue 2026-01-05 14:49:12 +01:00
Author
Owner

@joegoggin commented on GitHub (Aug 25, 2023):

I've had the same issue. If you hit left alt after it will unstick the right alt. A bit annoying but a good work around for getting it unstuck.

@joegoggin commented on GitHub (Aug 25, 2023): I've had the same issue. If you hit left alt after it will unstick the right alt. A bit annoying but a good work around for getting it unstuck.
Author
Owner

@skotom commented on GitHub (Aug 25, 2023):

I solved it by disabling alt_focus_hack.

@skotom commented on GitHub (Aug 25, 2023): I solved it by disabling alt_focus_hack.
Author
Owner

@silvarc141 commented on GitHub (Sep 3, 2023):

AFAIK this happens with any modifier other than alt, and with whkd as well
Repro:

  1. have komorebi and a few windows open, focus directions bound with whkd to ctrl hjkl
  2. hold ctrl and spam hjkl as much as possible
  3. sometimes it stops and refuses to change focus because alt is stuck as pressed (it can take a few tries, but after it gets stuck once, it gets stuck a lot more)
  4. press and release alt and it works again
@silvarc141 commented on GitHub (Sep 3, 2023): AFAIK this happens with any modifier other than alt, and with whkd as well Repro: 1. have komorebi and a few windows open, focus directions bound with whkd to ctrl hjkl 2. hold ctrl and spam hjkl as much as possible 3. sometimes it stops and refuses to change focus because alt is stuck as pressed (it can take a few tries, but after it gets stuck once, it gets stuck a lot more) 4. press and release alt and it works again
Author
Owner

@LGUG2Z commented on GitHub (May 12, 2024):

alt_focus_hack has been deprecated since a few versions ago

@LGUG2Z commented on GitHub (May 12, 2024): `alt_focus_hack` has been deprecated since a few versions ago
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#236