Skip to content

Instantly share code, notes, and snippets.

@john-d-pelingo
Created May 21, 2016 13:30
Show Gist options
  • Select an option

  • Save john-d-pelingo/817ab4db502452fff80f562e970a5c69 to your computer and use it in GitHub Desktop.

Select an option

Save john-d-pelingo/817ab4db502452fff80f562e970a5c69 to your computer and use it in GitHub Desktop.
Autohotkey for command prompt. Working keys are close command window (ctrl + w), scroll up/down (ctrl + up / down), paste (ctrl +v).
; Redefine only when the active window is a console window
#IfWinActive ahk_class ConsoleWindowClass
; Close Command Window with Ctrl+w
$^w::
WinGetTitle sTitle
If (InStr(sTitle, "-")=0) {
Send EXIT{Enter}
} else {
Send ^w
}
return
; Ctrl+up / Down to scroll command window back and forward
^Up::
Send {WheelUp}
return
^Down::
Send {WheelDown}
return
; Paste in command window
^V::
Send !+{Space}ep
return
#IfWinActive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment