如何使用autohotkey在Windows 10中模拟超级密钥
发布时间:2020-12-14 05:47:26 所属栏目:Windows 来源:网络整理
导读:我正在将我的mac工作流迁移到 Windows.我不能没有的一件事是超级键,它是Ctrl Option Shift Cmd的组合.我使用Karabiner应用程序将Capslock重新映射到此Hyper键.我听说Autohotkey是Windows的Karabiner替代品.你能帮助我在Windows中模仿这个功能吗? 我理想的结
我正在将我的mac工作流迁移到
Windows.我不能没有的一件事是超级键,它是Ctrl Option Shift Cmd的组合.我使用Karabiner应用程序将Capslock重新映射到此Hyper键.我听说Autohotkey是Windows的Karabiner替代品.你能帮助我在Windows中模仿这个功能吗?
我理想的结果是: >完全取消激活Capslock,因为我很少使用它 提前谢谢了! 以下是我用ahk脚本的尝试,但它根本不起作用:( ;----------------------------------------- ; hyper key for windows ;========================================= ; -------------------------------------------------------------- ; notes ; -------------------------------------------------------------- ; ! = alt ; ^ = ctrl ; + = shift ; # = lwin|rwin ; #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. #UseHook #InstallKeybdHook #SingleInstance force SendMode Input ;; deactivate capslock completely SetCapslockState,AlwaysOff ;; remap capslock to hyper Capslock:: SendInput {Blind}{Ctrl Down}{Alt Down}{Shift Down}{LWin Down} return Capslock up:: SendInput {Blind}{Ctrl Up}{Alt Up}{Shift Up}{LWin Up} return ;; vim navigation with hyper ^!+#h:: SendInput {Blind}{Left} ^!+#h up:: SendInput {Blind}{Left Up} ^!+#l:: SendInput {Blind}{Right} ^!+#k:: SendInput {Blind}{Up} ^!+#j:: SendInput {Blind}{Down} ;; popular hotkeys with hyper ^!+#c::^c ^!+#v::^v 解决方法
感谢任何想要帮助我的人,我自己想出了这个问题,并希望分享它以防万一有人遇到这个问题.
#NoEnv ; recommended for performance and compatibility with future autohotkey releases. #UseHook #InstallKeybdHook #SingleInstance force SendMode Input ;; deactivate capslock completely SetCapslockState,AlwaysOff ;; remap capslock to hyper ;; if capslock is toggled,remap it to esc ;; note: must use tidle prefix to fire hotkey once it is pressed ;; not until the hotkey is released ~Capslock:: ;; must use downtemp to emulate hyper key,you cannot use down in this case ;; according to https://autohotkey.com/docs/commands/Send.htm,downtemp is as same as down except for ctrl/alt/shift/win keys ;; in those cases,downtemp tells subsequent sends that the key is not permanently down,and may be ;; released whenever a keystroke calls for it. ;; for example,Send {Ctrl Downtemp} followed later by Send {Left} would produce a normal {Left} ;; keystroke,not a Ctrl{Left} keystroke Send {Ctrl DownTemp}{Shift DownTemp}{Alt DownTemp}{LWin DownTemp} KeyWait,Capslock Send {Ctrl Up}{Shift Up}{Alt Up}{LWin Up} if (A_PriorKey = "Capslock") { Send {Esc} } return ;; vim navigation with hyper ~Capslock & h:: Send {Left} ~Capslock & l:: Send {Right} ~Capslock & k:: Send {Up} ~Capslock & j:: Send {Down} ;; popular hotkeys with hyper ~Capslock & c:: Send ^{c} ~Capslock & v:: Send ^{v} (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 在Windows上运行远程命令,如linux上的ssh -c
- 权限 – 如何解决NTFS移动/复制设计缺陷?
- 使用Windows身份验证调用WCF服务时无法执行URL
- 在Windows服务上C#&NHibernate“无法编译映射文档”
- windows – 如何从第N个位置获取批处理文件参数?
- c语言编程三子棋(井字棋)
- windows – 虽然Web浏览器在同一台计算机上运行,??但Ping请
- windows – 为什么chkdsk在一个特定的索引上需要很长时间?
- windows-server-2003 – Windows Server 2003上的TCP拥塞窗
- 下一个Wannacry? Windows为新蠕虫漏洞发布补丁