Skip to content

Instantly share code, notes, and snippets.

@vernonk
Created November 20, 2015 08:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vernonk/9af6e3d0011746b1bf96 to your computer and use it in GitHub Desktop.
Save vernonk/9af6e3d0011746b1bf96 to your computer and use it in GitHub Desktop.
autohotkey base key maps
;custom shortcuts to move between mac & win more easily
SendMode input
#SingleInstance force
;#InstallKeybdHook
;---------------------------------------------------------------
; ! = ALT
; ^ = CTRL
; + = SHIFT
; # = WIN
;---------------------------------------------------------------
; --------------------------------------------------------------
; Swap alt and ctrll as well as alt+tab and ctrl+tab
; http://stackoverflow.com/questions/18454895/using-auto-hotkey-to-swap-ctrl-alt-and-implement-ctrl-tab
; --------------------------------------------------------------
*tab::
{
if(GetKeyState("LAlt", "P")){
Send {LControl up}{Alt down}{tab}
KeyWait, tab
} else if(GetKeyState("LShift", "P")){
Send {LShift down}{tab}
KeyWait, tab
}else
{ send {tab}
}
return
}
~LAlt Up::
{ send {lalt up}
return
}
LAlt::LCtrl
LCtrl::LAlt
; --------------------------------------------------------------
; Make the single click on the Pen open OneNote 2016
; https://www.reddit.com/r/Surface/comments/3qpj7a/how_to_make_clicking_the_pen_open_onenote_2016/cwhkwmq
; --------------------------------------------------------------
;#F19 == Double Click
;#F20 == Single Click
#IfWinNotExist ahk_exe ONENOTE.EXE
{
#F20::
{
run, "C:\Program Files (x86)\Microsoft Office\root\Office16\ONENOTE.exe"
Return
}
}
#IfWinExist ahk_exe ONENOTE.EXE
{
#IfWinActive ahk_exe ONENOTE.EXE
{
#F20::
{
WinMinimize ;Minimize OneNote Window
Return
}
}
#IfWinNotActive ahk_exe ONENOTE.EXE
{
#F20::
{
WinActivate, ahk_exe ONENOTE.exe ;Bring to Front
Return
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment