Skip to content

Instantly share code, notes, and snippets.

@CCCBBBAAAHIGHSCORE
Last active May 8, 2017 10:31
Show Gist options
  • Save CCCBBBAAAHIGHSCORE/885ce379fbef41d1fd2a753c29b79bd1 to your computer and use it in GitHub Desktop.
Save CCCBBBAAAHIGHSCORE/885ce379fbef41d1fd2a753c29b79bd1 to your computer and use it in GitHub Desktop.
this script remember the key name in autohotkey and helps you to code faster, exemple press Numlock and Tab will send : tab ; press Numlock and almost anykey will send the key name
; hello, this script is made by u/pkip , and the help of tidbit for the last but useful line of code
; It allow you to forget the real key name or to code it faster
; press Numlock & F1 will send F1
; More usefull for unusual key like AppsKey or Launch_App1
; it also work with the Mouse button and the numpad.
; the first 4 lines are there to work around the L or R control thing, don't worry about it, they work like this :
; ctrl Space --> Ctrl
; since sometime you dont want to differentiate the LCtrl and RCtrl.
^space:: Send, {^}{space} ; Ctrl it gives " ^ " so when you press ctrl the symbol is written
!space:: Send, {!} ; Alt
+space:: Send, {+} ; Maj
#space:: send, {#} ; Windows key
;exemple : Numlock & key :: send, key
NumLock::NumLock ; keep a normal behavior for the numlock key, i guess.
; Numpad :
NumLock & NumPad0::
NumLock & NumPad1::
NumLock & NumPad2::
NumLock & NumPad3::
NumLock & NumPad4::
NumLock & NumPad5::
NumLock & NumPad6::
NumLock & NumPad7::
NumLock & NumPad8::
NumLock & NumPad9::
NumLock & NumpadDot::
NumLock & NumpadDiv::
NumLock & NumpadMult::
NumLock & NumpadAdd::
NumLock & NumpadSub::
NumLock & NumpadEnter::
;Fkeys :
NumLock & F1::
NumLock & F2::
NumLock & F3::
NumLock & F4::
NumLock & F5::
NumLock & F6::
NumLock & F7::
NumLock & F8::
NumLock & F9::
NumLock & F10::
NumLock & F11::
NumLock & F12::
; other keys :
NumLock & CapsLock::
NumLock & Space::
NumLock & Tab::
NumLock & Enter::
NumLock & Escape::
NumLock & Backspace::
NumLock & ScrollLock::
NumLock & Delete::
NumLock & Insert::
NumLock & Home::
NumLock & End::
NumLock & PgUp::
NumLock & PgDn::
NumLock & Up::
NumLock & Down::
NumLock & Left::
NumLock & Right::
; modifier key :
; sometime you dont need the difference between Lkey and Rkey, so you might disable this and refer to the beginning of the script
NumLock & LWin::
NumLock & RWin::
NumLock & Control::
NumLock & Alt::
NumLock & Shift::
NumLock & LControl::
NumLock & RControl::
NumLock & LShift::
NumLock & RShift::
NumLock & LAlt::
NumLock & RAlt::
; other keys :
NumLock & Browser_Back::
NumLock & Browser_Forward::
NumLock & Browser_Refresh::
NumLock & Browser_Stop::
NumLock & Browser_Search::
NumLock & Browser_Favorites::
NumLock & Browser_Home::
NumLock & Volume_Mute::
NumLock & Volume_Down::
NumLock & Volume_Up::
NumLock & Media_Next::
NumLock & Media_Prev::
NumLock & Media_Stop::
NumLock & Media_Play_Pause::
NumLock & Launch_Mail::
NumLock & Launch_Media::
NumLock & Launch_App1::
NumLock & Launch_App2::
; special keys :
NumLock & AppsKey::
NumLock & PrintScreen::
NumLock & CtrlBreak::
NumLock & Pause::
NumLock & Break::
NumLock & Help::
NumLock & Sleep::
; mouse buttons :
NumLock & LButton::
NumLock & RButton::
NumLock & MButton::
NumLock & XButton1::
NumLock & XButton2::
NumLock & WheelDown::
NumLock & WheelUp::
send, % substr(a_thishotkey, 11) ; Thanks to tidbit in autohotkey IRC for this line of code, which saved me a lot of time
/*
if you want a tooltip or a msgbox instead of a send :
msgbox, % substr(a_thishotkey, 11) ; tidbit IRC
or
ToolTip, % substr(a_thishotkey, 11) ; tidbit IRC
SetTimer, RemoveToolTip, 1000
return
RemoveToolTip:
SetTimer, RemoveToolTip, Off
ToolTip
return
*/
; if you want to add joystick controls, go for it, dont forget to send them so i can update the script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment