Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #InstallKeybdHook
- ;____________________________
- ;list of hotkeys
- ;____________________________
- ;# Win
- ;! Alt
- ;^ Control
- ;+ Shift
- ;____________________________
- ;include libraries
- toggle := 0
- $Shift::
- If GetKeyState("Shift", "P")
- {
- While GetKeyState("Shift", "P")
- Send {Shift Down}
- Send {Shift Up}
- }
- Else
- Send {Escape}
- return
- ;chrome
- !c::send {LWin Down}2{LWin Up}
- ;!c::send {LAlt Down}v{LAlt Up}
- ;____________________________
- ;winscp
- !f::send {LWin Down}6{LWin Up}
- ;____________________________
- !v::WinActivate, ahk_class Qt5QWindowIcon
- ;vscode
- !b::
- F14::
- send {LWin Down}4{LWin Up}
- Return
- ;____________________________
- ^F23::
- WinMinimize, A
- Return
- ;____________________________
- ;f or j or k or d
- ; send {BackSpace}
- ; send {LCtrl Down}{Tab}{ LCtrl Up}
- ; Return
- ;____________________________
- ;j keyf
- ;____________________________
- #if GetKeyState("j")
- q::
- send {BackSpace}
- send {LAlt Down}s{ LAlt Up}
- Return
- ;____________________________
- w::
- send {BackSpace}
- send {LCtrl Down}w{ LCtrl Up}
- Return
- ;____________________________
- r::
- send {BackSpace}
- send {LCtrl Down}r{ LCtrl Up}
- Return
- ;____________________________
- -::
- 1::
- send {BackSpace}
- send {LCtrl Down}{LShift Down}{Tab}{LShift Up}{LCtrl Up}
- return
- ;____________________________
- =::
- 2::
- send {BackSpace}
- send {LCtrl Down}{Tab}{ LCtrl Up}
- Return
- ;____________________________
- g::
- send {BackSpace}
- send {LAlt Down}h{ LAlt Up}
- Return
- #if
- ;end j key
- ;____________________________
- ;e key
- ;____________________________
- #if GetKeyState("e")
- ;____________________________
- 1::
- send {LAlt Down}{Left}{ LAlt Up}
- Return
- ;____________________________
- 2::
- send {LAlt Down}{Right}{ LAlt Up}
- Return
- ;____________________________
- Backspace::
- send {LCtrl Down}w{ LCtrl Up}
- Return
- #if
- ;end e key
- ;____________________________
- ;k key
- ;____________________________
- #if GetKeyState("k")
- ;____________________________
- z::
- send {BackSpace}
- send {LAlt Down}{F4}{ LAlt Up}
- Return
- ;____________________________
- q::
- send {BackSpace}
- send {LAlt Down}s{ LAlt Up}
- Return
- ;____________________________
- w::
- send {BackSpace}
- send {LAlt Down}{LShift Down}s{LShift Up}{ LAlt Up}
- Return
- ;____________________________
- Tab::
- SC027::
- send {BackSpace}
- send {LCtrl Down}w{ LCtrl Up}
- Return
- ;____________________________
- 3::
- send {BackSpace}
- send {LAlt Down}3{ LAlt Up}
- Return
- j::
- send {BackSpace}
- send {LAlt Down}{left}{ LAlt Up}
- Return
- ;____________________________
- l::
- send {BackSpace}
- send {LAlt Down}{right}{ LAlt Up}
- Return
- ;____________________________
- t::
- send {BackSpace}
- send {LCtrl Down}t{ LCtrl Up}
- Return
- ;____________________________
- f::
- send {BackSpace}
- send {LCtrl Down}{f}{ LCtrl Up}
- Return
- ;____________________________
- r::
- send {BackSpace}
- send {LCtrl Down}r{ LCtrl Up}
- Return
- ;____________________________
- g::
- send {BackSpace
- send {LAlt Down}h{ LAlt Up}
- Return
- ;____________________________
- d::
- send {BackSpace}
- send {LAlt Down}d{ LAlt Up}
- Return
- ;____________________________
- -::
- 1::
- send {BackSpace}
- send {LAlt Down}1{LAlt Up}
- return
- ;____________________________
- =::
- 2::
- send {BackSpace}
- send {LAlt Down}2{LAlt Up}
- return
- ;____________________________
- BackSpace::
- send {BackSpace}
- send {LCtrl Down}{BackSpace}{ LCtrl Up}
- Return
- ;____________________________
- c::
- send {BackSpace}
- send {LCtrl Down}{LShift Down}j{LShift Up}{LCtrl Up}
- return
- ;____________________________
- i::
- n::
- send {BackSpace}
- send {LCtrl Down}{LShift Down}c{LShift Up}{LCtrl Up}
- return
- ;____________________________
- b::
- send {BackSpace}
- send {LWin Down}4{LWin Up}
- return
- ;____________________________
- m::
- send {BackSpace}
- WinMinimize, A
- Return
- ;____________________________
- #if
- ;end k key
- ^+F23::
- WinGet, win_state, MinMax,A
- If(win_state == 1)
- WinRestore, A
- Else If(win_state == 0)
- WinMaximize, A
- return
- ;____________________________
- F13::
- !BackSpace::
- CMD()
- Return
- ;____________________________
- !e::Explorer()
- F15::
- toggle := !toggle
- if (toggle = 1){
- TrayTip Layer 1, KEYBOARD LAYER # 1
- sleep 1000
- HideTrayTip()
- } else {
- TrayTip Layer 0, MOUSE LAYER # 0
- sleep 1000
- HideTrayTip()
- }
- return
- ;____________________________
- HideTrayTip() {
- TrayTip ; Attempt to hide it the normal way.
- if SubStr(A_OSVersion,1,3) = "10." {
- Menu Tray, NoIcon
- Sleep 200 ; It may be necessary to adjust this sleep.
- Menu Tray, Icon
- }
- }
- ;____________________________
- ;if chrome window active
- ;____________________________
- #IfWinActive ahk_class Chrome_WidgetWin_1
- ^+c::
- ^+i::
- Return
- #If
- ;____________________________
- ;if picture preview window active
- ;____________________________
- #IfWinActive ahk_class Photo_Lightweight_Viewer
- l::Right
- ;____________________________
- j::Left
- #If
- ;____________________________
- ;if winscp window active
- ;____________________________
- #IfWinActive, ahk_class TScpExplorerForm
- k & r::
- send {LCtrl Down}o{ LCtrl Up}
- Return
- #If
- ;____________________________
- ;if git bash shell active
- ;____________________________
- #IfWinActive, ahk_class mintty
- ^v::
- send {LShift Down}{Ins}{LShift Up}
- Return
- #If
- ;____________________________
- #x::Reload
- ;____________________________
- ;Toggle Window
- ;____________________________
- ToggleWindow(TheWindowTitle)
- {
- SetTitleMatchMode,2
- DetectHiddenWindows, Off
- IfWinActive, %TheWindowTitle%
- {
- Return
- }
- Else
- {
- IfWinExist, %TheWindowTitle%
- {
- WinActivate
- Return true
- }
- Else
- {
- DetectHiddenWindows, On
- {
- IfWinExist, %TheWindowTitle%
- WinShow
- WinActivate
- }
- Return false
- }
- }
- }
- ;____________________________
- CMD()
- {
- IfWinActive, ahk_class mintty
- WinMinimize, A
- Else
- WinActivate, ahk_class mintty
- Return
- }
- ;____________________________
- Explorer()
- {
- IfWinExist, ahk_class CabinetWClass
- WinActivate
- Else
- Run, Explorer
- Return
- }
- ;____________________________
- ;if explorer window active
- ;____________________________
- #IfWinActive ahk_class CabinetWClass
- l & 2::
- ;____________________________
- ; rename
- send {F2}
- return
- ;____________________________
- ; search
- l & 3::
- send {F3}
- return
- ;____________________________
- l::send {l}
- #IfWinActive
- ;RButton::Ctrl
- ;!RButton::MouseClick, Right
- !s::WinActivate, ahk_class OWL.DocumentWindow
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement