|
;----------------------------------------- |
|
; Mac keyboard to Windows Key Mappings |
|
;========================================= |
|
|
|
; TODO: For any Command+L shortcuts to work (like browser url bar focus), the "DisableWorkstationLock" param must be set to 0x1 in regedit: |
|
;RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Policies\System, DisableLockWorkstation, 1 |
|
|
|
; -------------------------------------------------------------- |
|
; NOTES |
|
; -------------------------------------------------------------- |
|
; ! = ALT |
|
; ^ = CTRL |
|
; + = SHIFT |
|
; # = WIN |
|
; |
|
; Debug action snippet: MsgBox You pressed Control-A while Notepad is active. |
|
|
|
#InstallKeybdHook |
|
#SingleInstance force |
|
SetTitleMatchMode 2 |
|
SendMode Input |
|
|
|
; -------------------------------------------------------------- |
|
; Mac-like screenshots in Windows (requires Windows 10 Snip & Sketch) |
|
; -------------------------------------------------------------- |
|
|
|
; Capture entire screen with CMD/WIN + SHIFT + 3 |
|
#+3::send #{PrintScreen} |
|
|
|
; Capture portion of the screen with CMD/WIN + SHIFT + 4 |
|
#+4::#+s |
|
|
|
; -------------------------------------------------------------- |
|
; media/function keys all mapped to the right option key |
|
; -------------------------------------------------------------- |
|
|
|
RAlt & F7::SendInput {Media_Prev} |
|
RAlt & F8::SendInput {Media_Play_Pause} |
|
RAlt & F9::SendInput {Media_Next} |
|
F10::SendInput {Volume_Mute} |
|
F11::SendInput {Volume_Down} |
|
F12::SendInput {Volume_Up} |
|
|
|
; Swap left command/windows key with left alt |
|
;LWin::LAlt |
|
;LAlt::LWin ; add a semicolon in front of this line if you want to disable the windows key |
|
|
|
; Swap Windows key to Spotlight shortcut |
|
LWin::return |
|
RWin::return |
|
#space::Send, {LWin} |
|
|
|
; Zoom |
|
;#+=::Send, ^+= |
|
;#+-::Send, ^+- |
|
#=::Send, ^= |
|
#-::Send, ^- |
|
|
|
; F13-15, standard windows mapping |
|
F13::SendInput {PrintScreen} |
|
F14::SendInput {ScrollLock} |
|
F15::SendInput {Pause} |
|
|
|
; -------------------------------------------------------------- |
|
; Tab Navigation |
|
; -------------------------------------------------------------- |
|
#+[::Send, ^{PgUp} |
|
#+]::Send, ^+{PgDn} |
|
|
|
; -------------------------------------------------------------- |
|
; OS X system shortcuts |
|
; -------------------------------------------------------------- |
|
|
|
; Make Ctrl + S work with cmd (windows) key |
|
#s::Send, ^s |
|
|
|
; Selecting |
|
#a::Send, ^a |
|
|
|
; Copying |
|
#c::Send, ^c |
|
|
|
; Pasting |
|
#v::Send, ^v |
|
|
|
; Cutting |
|
#x::Send, ^x |
|
|
|
; Opening |
|
#o::Send ^o |
|
|
|
; Finding |
|
#f::Send ^f |
|
|
|
; Undo |
|
#z::Send ^z |
|
|
|
; Redo |
|
#y::Send ^y |
|
|
|
; New tab |
|
#t::Send ^t |
|
|
|
; close tab |
|
#w::Send ^w |
|
|
|
; Close windows (cmd + q to Alt + F4) |
|
#q::Send !{F4} |
|
|
|
; Remap Windows + Tab to Alt + Tab. |
|
Lwin & Tab::AltTab |
|
|
|
; "hide" current window |
|
#h::WinMinimize, A |
|
|
|
|
|
; -------------------------------------------------------------- |
|
; Google Chrome |
|
; -------------------------------------------------------------- |
|
#IfWinActive, ahk_class Chrome_WidgetWin_1 |
|
; Cmd+Click to open link in new tab |
|
#LButton::Send, ^{LButton} |
|
|
|
; Focus on url bar (this requires workstation locking to be disabled via regedit, see above) |
|
#l::SendInput ^l |
|
|
|
; New window |
|
#n::Send, ^n |
|
|
|
; New private window |
|
#+p::Send, ^+p |
|
#IfWinActive |
|
|
|
; -------------------------------------------------------------- |
|
; Firefox |
|
; -------------------------------------------------------------- |
|
#IfWinActive ahk_class MozillaWindowClass |
|
; Cmd+Click to open link in new tab |
|
#LButton::Send, ^{LButton} |
|
|
|
; Focus on url bar (this requires workstation locking to be disabled via regedit, see above) |
|
#l::SendInput ^l |
|
|
|
; New window |
|
#n::Send, ^n |
|
|
|
; New private window |
|
#+p::Send, ^+p |
|
#IfWinActive |
|
|
|
; -------------------------------------------------------------- |
|
; Visual Studio |
|
; -------------------------------------------------------------- |
|
#IfWinActive ahk_class HwndWrapper[DefaultDomain;;1f78a8d9-6c25-4f26-92bc-43695c3f485c] |
|
; Cmd+click to follow references |
|
;{LWin down}::SendInput ^ |
|
;TODO fix this ^^^ |
|
|
|
; Cmd+click to follow references |
|
;{LWin}:: |
|
; Send {LCtrl down} |
|
; KeyWait, {LWin} |
|
; Send {LCtrl up} |
|
; return |
|
|
|
#IfWinActive |