Skip to content

Instantly share code, notes, and snippets.

@lambdan
Created August 9, 2018 15:01
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 lambdan/2e0811c27ee3c180df1b945a84ea9a5b to your computer and use it in GitHub Desktop.
Save lambdan/2e0811c27ee3c180df1b945a84ea9a5b to your computer and use it in GitHub Desktop.
Apple Magic Keyboard with Numpad on Windows tweaks
; Autohotkey script for using Apple Magic Keyboard with Numpad on Windows
; I recommend you run the script as admin, otherwise you'll get weird issues with admin priviliged windows - see here for an example of weird issue: https://autohotkey.com/boards/viewtopic.php?f=5&t=53551
; I like to disable Caps Lock and replace it with esc
Capslock::Esc
; Swap left Command/Windows key with left Alt (so ALT-TAB muscle memory doesn't break)
LWin::LAlt
LAlt::LWin
; Swap < and §, you might not need this
§::<
<::§
; Media keys, modifier: Right Option key
RAlt & F7::sendinput, {Media_Prev}
RAlt & F8::sendinput, {Media_Play_Pause}
RAlt & F9::sendinput, {Media_Next}
; Volume keys, modifier: Right Option Key
RAlt & F10::sendinput, {Volume_Mute}
RAlt & F11::sendinput, {Volume_Down}
RAlt & F12::sendinput, {Volume_Up}
; OptionKey + Arrows = jump to top/bottom, left/right in document (like CMD+arrows in macOS)
;LAlt & Left::sendinput, {Home}
;LAlt & Right::sendinput, {End}
;LAlt & Up::sendinput, {PgUp}
;LAlt & Down::sendinput, {PgDn}
; win 10 expose = LCtrl F3
; LCtrl & F3::Send {LWin down}{Tab}{LWin up}
; Map F13, F14, F15, etc.
F13::PrintScreen
F14::ScrollLock
F15::^CtrlBreak ; pause/break according to https://autohotkey.com/docs/KeyList.htm#other
; Map F16-F19 (go nuts! put what you want!)
F19::DllCall("user32.dll\LockWorkStation") ; lock Computer (Microsoft Surface keyboards has this and it's nice)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment