Skip to content

Instantly share code, notes, and snippets.

@dahoba
Last active April 29, 2026 04:30
Show Gist options
  • Select an option

  • Save dahoba/941584e2c3bc95acac3c0ae8db57a9a2 to your computer and use it in GitHub Desktop.

Select an option

Save dahoba/941584e2c3bc95acac3c0ae8db57a9a2 to your computer and use it in GitHub Desktop.
AutoHotkey 2, switch keyboard layout with caplock and natural scroll wheel
#Requires AutoHotkey v2.0
; switch keyboard layout with caplock
Capslock::
{
Send "{LShift down}{LAlt down}{LShift Up}{LAlt Up}"
; Send, {Shift Down}{Alt Down}{Alt Up}{Shift Up}
; SoundBeep 999, 1
}
; natural scroll wheel
WheelUp::Send "{WheelDown}"
WheelDown::Send "{WheelUp}"
; use window sniptools
PrintScreen::Send "#+s"
;Active Window resize
^+2::
{
WinGetPos &x, &y,,, "A" ; get current position of active window
WinMove x, y, 1024, 768, "A"
}
^+3::
{
WinGetPos &x, &y,,, "A" ; get current position of active window
WinMove x, y, 1440, 900, "A"
}
^+4::
{
WinGetPos &x, &y,,, "A" ; get current position of active window
WinMove x, y, 1920, 1080, "A"
}
^+5::
{
WinGetPos &x, &y,,, "A" ; get current position of active window
WinMove x, y, 2560, 1440, "A"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment