Skip to content

Instantly share code, notes, and snippets.

@losh11
Last active June 27, 2021 17:42
Show Gist options
  • Select an option

  • Save losh11/ec191240909737c6d4dfa540035ecb56 to your computer and use it in GitHub Desktop.

Select an option

Save losh11/ec191240909737c6d4dfa540035ecb56 to your computer and use it in GitHub Desktop.
Remaps Windows keys to macOS style ISO-UK - (in progress)
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; Docs:
; https://autohotkey.com/docs/Hotkeys.htm
; https://autohotkey.com/docs/KeyList.htm
; Based on AutoHotKey script by @ascendbruce
; https://gist.github.com/ascendbruce/677c3169259c975259045f905cd889d6
; https://autohotkey.com/board/topic/60675-osx-style-command-keys-in-windows/
; You need to disable "Between input languages" shotcut from Control Panel\Clock, Language, and Region\Language\Advanced settings > Change lanugage bar hot keys
; Universal shotcuts
$!x::Send ^x
$!c::Send ^c
$!v::Send ^v
$!s::Send ^s
$!a::Send ^a
$!z::Send ^z
$!+z::Send ^y
$!w::Send ^w
$!f::Send ^f
$!n::Send ^n
$!q::Send !{f4}
$!r::Send ^{f5}
$!m::Send {LWin Down}{Down}{LWin Up}
$!`::Send {Alt Down}{Shift Down}{Tab}{Shift Up}
$!t::Send ^t
; Quick Switch Tab shotcuts
$!1::Send ^1
$!2::Send ^2
$!3::Send ^3
$!4::Send ^4
$!5::Send ^5
$!6::Send ^6
$!7::Send ^7
$!8::Send ^8
$!9::Send ^9
$!0::Send ^0
; input methods
; $+,::Send ^,
; $+.::Send ^.
; navigation, selection, delete a word/till end
$!Left::Send {Home}
$!Right::Send {End}
$!Up::Send {Lctrl down}{Home}{Lctrl up}
$!Down::Send {Lctrl down}{End}{Lctrl up}
$#Left::Send {ctrl down}{Left}{ctrl up}
$#Right::Send {ctrl down}{Right}{ctrl up}
$#+Left::Send {ctrl down}{shift down}{Left}{shift up}{ctrl up}
$#+Right::Send {ctrl down}{shift down}{Right}{shift up}{ctrl up}
$!+Left::Send {shift down}{Home}{shift up}
$!+Right::Send {shift down}{End}{shift up}
$!+Up::Send {Ctrl Down}{shift down}{Home}{shift up}{Ctrl Up}
$!+Down::Send {Ctrl Down}{shift down}{End}{shift up}{Ctrl Up}
!BS::Send {LShift down}{Home}{LShift Up}{Del}
#BS::Send {LCtrl down}{BS}{LCtrl up}
$#Space::Send {Ctrl Down}{LWin Down}{Space}{LWin Up}{Ctrl Up}
; macOS special keys
`::Send {ASC 0167}
\::`
|::~
#::\
~::|
@::"
"::@
;
; macOS modifiers
;
; Remap Control key to Windows key
LCtrl::LWin
RCtrl::RWin
; Remap Windows key to Alt/Option
LWin::LAlt
; Remap Alt key to Ctrl/Command (same position as macOS key)
LAlt::LCtrl
; Snipping Tool
;
; Incase of browser opening OfficeKey please enter below command into elevated cmd console
; REG ADD HKCU\Software\Classes\ms-officeapp\Shell\Open\Command /t REG_SZ /d rundll32
;
$!+4::Send #+S
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment