Last active
October 30, 2022 16:06
-
-
Save ZaWertun/583669cb00a8f394db9a79eb2e6df18e to your computer and use it in GitHub Desktop.
AutoHotKey script to switch layouts with CapsLock key on Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#NoEnv | |
#SingleInstance force | |
SendMode Input | |
CapsLock::SwitchNextLayout() | |
+CapsLock::SetCapsLockState % !GetKeyState("CapsLock", "T") | |
;SetCapsLockState, AlwaysOff | |
SwitchNextLayout() | |
{ | |
ControlGetFocus, ctl, A | |
SendMessage, 0x50, 2, 0, %ctl%, A ; WM_INPUTLANGCHANGEREQUEST, INPUTLANGCHANGE_FORWARD (0x2) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment