Monday, November 28, 2016

mac - Mapping Apple Keyboard Keys to Windows Keys



So I got myself an Apple "Ultra-Thin" USB keyboard (the one that has two USB hub ports).



Keyboard



However, I use PC, so some of the keys on the keyboard are not mapped to Windows keys. Specifically, I am worried about the loss of the print screen, scroll lock, and other keys, and how certain Mac keys don't have a function.



I read online that using Apple Boot Camp drivers for Windows would fix this problem. My question is:




Is using the Boot Camp drivers the right approach? If so, can I get them online anywhere (for free, as I don't have a Mac disk)? If not, what can fix my problems? I think I read somewhere (possibly on Coding Horror) that there's a program called SharpKey which does these modifications. An alternative solution that I've heard of is using AutoHotKey. So, what should I do?


Answer



I've tried using the Boot Camp drivers, but it was in the Mac .dmg format and I couldn't open the package. When I finally got around to opening it, all I could do was install the entire Boot Camp package -- which I didn't want to do considering it might overwrite drivers and make a royal mess. All I wanted was keyboard and the only thing I ended up with was a 32-bit package (couldn't find the 64-bit keyboard package) so I ended up using RandyRants' SharpKeys and AutoHotkey. I use them both anyway.



I have an Apple Pro Keyboard (graphite) and use it in Windows Vista -- I use Randyrants.com's SharpKeys to map:



F13 -> PrintScreen
F14 -> Scroll Lock
Left Alt -> Left Windows

Left Win -> Left Alt
Right Alt -> Right Windows
Right Win -> Left Alt


(since the Win key belongs between Alt and Ctrl)



The only thing SharpKeys can't do is Pause-Break, which appears to use a three-byte scancode which native Windows key-remapping can't handle (it'll just fire NumLock instead)



For Pause-Break, I added a definition to my AutoHotkey ahk file:




F15::
Send {Break}
return


The Eject key still doesn't work -- this seems to be a special key handled differently, as Eject can be used before an OS is even running.



ymmv, especially on newer Apple keyboards. As long as it produces a scancode, SharpKeys should be able to do it. The only troublesome key is Pause-Break.




SharpKeys is here : http://www.randyrants.com/2008/12/sharpkeys_30.html


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...