Skip to content
Permalink
Fetching contributors…
Cannot retrieve contributors at this time
170 lines (166 sloc) 2.55 KB
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; LAlt::RCtrl
; LWin::RAlt
; LShift::RCtrl
; LCtrl::RShift
; 类似windows的win+d
; !d::send #d
; 重写,想法参考:http://blog.csdn.net/william_lv/article/details/53320072
; ! Alt
; ^ Control
; + Shift
; # Win
LAlt & 0::send,^0
LAlt & 1::
SetTitleMatchMode 2
If WinActive("PuTTY") {
send,!1
}
else {
send,^1
}
return
LAlt & 2::
SetTitleMatchMode 2
If WinActive("PuTTY") {
send,!2
}
else {
send,^2
}
return
LAlt & 3::
SetTitleMatchMode 2
If WinActive("PuTTY") {
send,!3
}
else {
send,^3
}
return
LAlt & 4::
SetTitleMatchMode 2
If WinActive("PuTTY") {
send,!4
}
else {
send,^4
}
return
LAlt & 5::
SetTitleMatchMode 2
If WinActive("PuTTY") {
send,!5
}
else {
send,^5
}
return
LAlt & 6::
SetTitleMatchMode 2
If WinActive("PuTTY") {
send,!6
}
else {
send,^6
}
return
LAlt & 7::
SetTitleMatchMode 2
If WinActive("PuTTY") {
send,!7
}
else {
send,^7
}
return
LAlt & 8::
SetTitleMatchMode 2
If WinActive("PuTTY") {
send,!8
}
else {
send,^8
}
return
LAlt & 9::
SetTitleMatchMode 2
If WinActive("PuTTY") {
send,!9
}
else {
send,^9
}
return
LAlt & a::send,^a
LAlt & b::send,^b
; 参考: https://github.com/mahengyang/code/blob/master/puffin/AutoHotkey.ahk
LAlt & c::
SetTitleMatchMode 2
If WinActive("Xshell") {
send,^+c
}
else {
If WinActive("PuTTY") {
send, ^{Insert}
}
else {
If WinActive("FinalShell") {
send,^+b
}
else {
send,^c
}
}
}
return
LAlt & d::send,^d
LAlt & e::send,^e
LAlt & f::send,^f
LAlt & g::send,^g
LAlt & h::send,^h
LAlt & i::send,^i
LAlt & j::send,^j
LAlt & k::send,^k
LAlt & l::send,^l
LAlt & m::send,^m
LAlt & n::send,^n
LAlt & o::send,^o
LAlt & p::send,^p
LAlt & q::send,^q
LAlt & r::send,^r
LAlt & s::send,^s
LAlt & t::send,^t
LAlt & u::send,^u
LAlt & v::
SetTitleMatchMode 2
If WinActive("Xshell") {
send,^+v
}
else {
If WinActive("PuTTY") {
send, +{Insert}
}
else {
If WinActive("FinalShell") {
send,^+v
}
else {
send,^v
}
}
}
return
LAlt & w::send,^w
LAlt & x::send,^x
LAlt & y::send,^y
LAlt & z::send,^z
LAlt & /::send,^/
LAlt & Up::send, ^{Up}
LAlt & Down::send, ^{Down}
LAlt:: return
; 禁用单独的windows建
LWin::return
You can’t perform that action at this time.