Last active
September 16, 2017 10:11
-
-
Save MOOOWOOO/55f2f6524c54a32ab14467c0d3e1132b to your computer and use it in GitHub Desktop.
ahk bind map
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
GroupAdd OneNoteGroup, ahk_exe onenote.exe | |
GroupAdd Xshell, ahk_exe Xshell.exe | |
GroupAdd Firefox, ahk_exe firefox.exe | |
GroupAdd VSCode, ahk_exe Code.exe | |
GroupAdd gitbash, ahk_exe mintty.exe | |
;;上加一行 | |
$^+o:: | |
Send {Home}{Enter}{Up} | |
return | |
;;下加一行 | |
$^o:: | |
Send {End}{Enter} | |
return | |
;;移动光标 | |
;;光标左移 | |
$^b:: | |
Send {Left} | |
return | |
;;光标右移 | |
$^f:: | |
Send {Right} | |
return | |
;;光标上移 | |
;;OneNote中无法直接映射上下,改成^Up | |
$^p:: | |
if WinActive("ahk_group OneNoteGroup") { | |
Send ^{Up} | |
} else { | |
Send,{Up} | |
} | |
return | |
;;光标下移 | |
;;OneNote中无法直接映射上下,改成^D | |
$^n:: | |
if WinActive("ahk_group OneNoteGroup") { | |
Send ^{Down} | |
} else { | |
Send,{Down} | |
} | |
return | |
;;下翻一页 | |
$^#n:: | |
if WinActive("ahk_group Firefox") or WinActive("ahk_group VSCode") { | |
Send ^#n | |
} else { | |
Send {PgDn} | |
} | |
return | |
;;上翻一页 | |
$^#p:: | |
if WinActive("ahk_group Firefox") or WinActive("ahk_group VSCode") { | |
Send ^#p | |
} else { | |
Send {PgUp} | |
} | |
return | |
;;光标移动到下个单词 | |
$^#f:: | |
Send ^{Right} | |
return | |
;;光标移动到上个单词 | |
$^#b:: | |
Send ^{Left} | |
return | |
;;光标选中到下个单词 | |
$^+#f:: | |
Send ^+{Right} | |
return | |
;;光标选中到上个单词 | |
$^+#b:: | |
Send ^+{Left} | |
return | |
;;光标移动到行首 | |
;;针对 Xshell 解除绑定 | |
$^a:: | |
if WinActive("ahk_group Xshell") { | |
Send ^a | |
} else{ | |
Send {Home} | |
} | |
return | |
;;光标移动到行末 | |
;;针对 Xshell 解除绑定 | |
$^e:: | |
if WinActive("ahk_group Xshell") { | |
Send ^e | |
} else{ | |
Send {End} | |
} | |
return | |
;;针对 Xshell 和 gitbash 绑定复制 | |
$^x:: | |
if WinActive("ahk_group Xshell") or WinActive("ahk_group gitbash") { | |
Send ^{Ins} | |
} else { | |
Send ^x | |
} | |
return | |
;;针对 Xshell 和 gitbash 绑定粘贴 | |
$^v:: | |
if WinActive("ahk_group Xshell") or WinActive("ahk_group gitbash") { | |
Send +{Ins} | |
} else { | |
Send ^v | |
} | |
return | |
;;删除 | |
;;向左删除 | |
$^h:: | |
Send {Backspace} | |
return | |
;;向右删除 | |
$^d:: | |
Send {Del} | |
return | |
;;向左删除单词 | |
$^#h:: | |
Send ^{Backspace} | |
return | |
;;向右删除单词 | |
$^#d:: | |
Send ^{Del} | |
return | |
;;删除当前位置到行尾 | |
$^k:: | |
Send +{End} | |
Send {Del} | |
return | |
;;删除当前整行 | |
$^+k:: | |
Send {Home}{Home}+{Down}{Backspace} | |
return | |
;;重新利用被占用热键 | |
;;win+f代替C-f(查找) | |
$#f:: | |
Send ^{f} | |
return | |
;;win+n代替C-n(新建) | |
$#n:: | |
Send ^{n} | |
return | |
;;win+a代替C-a(全选) | |
$#a:: | |
Send ^{a} | |
return | |
;;win+h代替C-h(chrome查看历史记录) | |
$#h:: | |
Send ^{h} | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment