Skip to content

Instantly share code, notes, and snippets.

@cztchoice
Last active May 21, 2025 06:51
Show Gist options
  • Save cztchoice/1cd51303b0eb85c3820b37c09217af05 to your computer and use it in GitHub Desktop.
Save cztchoice/1cd51303b0eb85c3820b37c09217af05 to your computer and use it in GitHub Desktop.
windows下我当前的快捷键修改方案
; 参考 https://github.com/Vonng/Capslock/blob/master/win/CapsLock.ahk
; 转化为使用autohotkey V2
SetCapsLockState("AlwaysOff")
#HotIf GetKeyState("CapsLock", "P")
h::Left
j::Down
k::Up
l::Right
a::Home
e::End
`::SetCapsLockState(!GetKeyState("CapsLock", "T")) ; 使用 CapsLock+` 来完成可能的大小写全局切换
#HotIf
*CapsLock::
{
global ; V1toV2: Made function global
KeyWait("CapsLock")
if (A_ThisHotkey = "*CapsLock")
Send("^{Space}") ; 使用capslock模拟 ctrl+space来完成中英文切换
Return
}
; 禁用Ctrl+滚轮缩放的快捷键
^WheelDown::return
^WheelUp::return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment