Tuesday, August 19, 2014

AutoHotKey current script

My current script for AHK. Basically it’s a HJKL as directional and YUIO as page operators.


; IMPORTANT INFO ABOUT GETTING STARTED: Lines that start with a
; semicolon, such as this one, are comments.  They are not executed.

; This script has a special filename and path because it is automatically
; launched when you run the program directly.  Also, any text file whose
; name ends in .ahk is associated with the program, which means that it
; can be launched simply by double-clicking it.  You can have as many .ahk
; files as you want, located in any folder.  You can also run more than
; one .ahk file simultaneously and each will get its own tray icon.

; SAMPLE HOTKEYS: Below are two sample hotkeys.  The first is Win+Z and it
; launches a web site in the default browser.  The second is Control+Alt+N
; and it launches a new Notepad window (or activates an existing one).  To
; try out these hotkeys, run AutoHotkey again, which will load this file.


Capslock::
   Gui, 93:+Owner ; prevent display of taskbar button
   Gui, 93:Show, y-99999 NA, Enable nav-hotkeys: hjkl
   Send {LCtrl Down}
   KeyWait, Capslock ; wait until the Capslock button is released
   Gui, 93:Cancel
   Send, {LCtrl Up}
Return





#IfWinExist, Enable nav-hotkeys: hjkl

   *h::Send {Blind}{LCtrl Up}{Left}{LCtrl Down}
   *j::Send {Blind}{LCtrl Up}{Down}{LCtrl Down}
   *k::Send {Blind}{LCtrl Up}{Up}{LCtrl Down}
   *l::Send {Blind}{LCtrl Up}{Right}{LCtrl Down}
   *y::Send {Blind}{LCtrl Up}{Home}{LCtrl Down}
   *o::Send {Blind}{LCtrl Up}{End}{LCtrl Down}
   *u::Send {Blind}{LCtrl Up}{PgDn}{LCtrl Down}
   *i::Send {Blind}{LCtrl Up}{PgUp}{LCtrl Down}





#IfWinExist, ; end context-sensitive block





#IfWinActive ahk_class CabinetWClass ; File Explorer
    ^Backspace::




#IfWinActive ahk_class Notepad
    ^Backspace::
    Send ^+{Left}{Backspace}




#IfWinActive

~Shift & Space::Send {Space}


; Note: From now on whenever you run AutoHotkey directly, this script
; will be loaded.  So feel free to customize it to suit your needs.

; Please read the QUICK-START TUTORIAL near the top of the help file.
; It explains how to perform common automation tasks such as sending
; keystrokes and mouse clicks.  It also explains more about hotkeys.

Written with StackEdit.