Skip to content

Instantly share code, notes, and snippets.

@dillonhafer
Created March 31, 2015 13:27
Show Gist options
  • Save dillonhafer/4d3c9d4a418278c9ef2a to your computer and use it in GitHub Desktop.
Save dillonhafer/4d3c9d4a418278c9ef2a to your computer and use it in GitHub Desktop.
Mac style command keys for windows
; 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.
; 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.
#InstallKeybdHook
#SingleInstance force
SetTitleMatchMode 2
; #Include Apple Wired Keyboard.ahk ; Required for Eject Button. See Source.
SendMode Input
; --------------------------------------------------------------
; NOTES
; --------------------------------------------------------------
; ! = ALT
; ^ = CTRL
; + = SHIFT
; # = WIN
; media/function keys all mapped to the right option key
F7::SendInput {Media_Prev}
F8::SendInput {Media_Play_Pause}
F9::SendInput {Media_Next}
F10::SendInput {Volume_Mute}
F11::SendInput {Volume_Down}
F12::SendInput {Volume_Up}
; CMD+q functionality in Windows
^q:: Send !{f4}
; swap left command/windows key with left alt
LWin::LCtrl
LCtrl::LWin ; add a semicolon in front of this line if you want to disable the windows key
; Eject Key
F20::SendInput {Insert}
; F13-15, standard windows mapping
F13::SendInput {PrintScreen}
F14::SendInput {ScrollLock}
F15::SendInput {Pause}
;F16-19 custom app launchers, see http://www.autohotkey.com/docs/Tutorial.htm for usage info
F16::Run Cygwin.exe
F17::Run calc.exe
F18::Run http://www.overclock.net
F19::Run cmd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment