blez's : blog

code / design / music and more

Fixing the Apple keyboards layout under Windows

Leave a comment

This lovely piece of aluminum needs special configuration under Windows. The alt and win keys are reversed and it doesn’t have PrintScreen button or media buttons.
Here’s a script I used to remap the layout on Windows for this lovely keyboard. That’s my custom layout, you can remap it whatever you like.
It uses AutoHotkey. Just save it as .ahk file and run it. If you like it you can compile it with the AutoHotKey compiler.

#InstallKeybdHook
#SingleInstance force

; ! = ALT
; ^ = CTRL
; + = SHIFT
; # = WIN

F16::SendInput {PrintScreen}

; 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
RWin::RAlt
RAlt::RWin ; add a semicolon in front of this line if you want to disable the windows key

; standart remapping
+F7::SendInput {Media_Prev}
+F8::SendInput {Media_Play_Pause}
+F9::SendInput {Media_Next}
+F11::SendInput {Volume_Down}
+F10::SendInput {Volume_Mute}
+F12::SendInput {Volume_Up}

; custom remapping
F13::SendInput {Media_Prev}
F14::SendInput {Media_Play_Pause}
F15::SendInput {Media_Next}
F19::SendInput {Volume_Down}
F18::SendInput {Volume_Mute}
F17::SendInput {Volume_Up}

Or just download the executable

Download

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s