Last active
May 6, 2026 07:27
-
-
Save cztchoice/1cd51303b0eb85c3820b37c09217af05 to your computer and use it in GitHub Desktop.
windows下我当前的快捷键修改方案
This file contains hidden or 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
| ; 参考 https://github.com/Vonng/Capslock/blob/master/win/CapsLock.ahk | |
| ; 转化为使用autohotkey V2 | |
| ; 示例:自动创建启动快捷方式 (AHK v2) | |
| #Requires AutoHotkey v2.0 | |
| StartupShortcut := A_Startup "\CapslockModifierV2.ahk.lnk" | |
| if !FileExist(StartupShortcut) { | |
| try { | |
| FileCreateShortcut(A_ScriptFullPath, StartupShortcut) | |
| MsgBox("已成功将脚本添加到开机启动项。") | |
| } catch { | |
| MsgBox("添加启动项失败,请尝试手动操作。") | |
| } | |
| } | |
| 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