Using an Apple Keyboard on Vista

37 Comments October 8, 2007

As you might have read in the past, I'm a very happy user of Vista x64 on a Mac Pro. I highly recommend the combo. Recently, I purchased an Apple aluminum keyboard.

   

   

Before you think I'm a total Apple hardware freak (ok, so I am), my motivation for getting the keyboard was twofold. The first is that I've had enough repetitive hand problems in the past that I'm always on the lookout for new keyboards that might help. One thing I've found has helped my poor wrists is to use laptop keyboards. There have been numerous times in the past where I've had to live on my laptop for several weeks just so I could grasp the dinner fork and martini glass at the end of the day. The Apple keyboard is really a laptop keyboard so I knew it would be kind to my hands. The second reason I wanted the Apple keyboard is because I really hate looking at all the crud that falls into a standard keyboard over time. If you've ever taken off a key or two on a standard keyboard, you can't tell me you haven't recoiled in horror. To continue in the grossology vein, studies indicate that a toilet is cleaner than your keyboard.

   

The Apple Keyboard works out of the box with Vista. However, this is a Macintosh keyboard after all so it's missing a few Windows specific keys such as print screen, multimedia control, and the control, alt/option, and windows/command keys are in different places. I lived with the default keyboard for a while, but didn't relish the prospect of manually figuring out the scan codes to put them in to the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout key Scancode Map value, which is a REG_BINARY field.

   

Fortunately, Randy Santi, came through with his great SharpKeys program that takes all the pain out of setting up all the scan codes. It's a tool that Microsoft should have included with Windows in the first place! In SharpKeys, click the Add button to bring up the SharpKeys: Add New Mapping dialog. There you can remap the key on the left side of the dialog to a new purpose on the right side. Even better, you can click the Type Key button and just press the key. In the following screen shot, I pressed the F16 key to see what scan code the keyboard produced:

 

 

What I did was map the following keys:

The key, Unknown 0x006A is F19, so I can capture these screen shots with Kenny Kerr's Window Clippings.

You're probably wondering why I didn't swap the Windows key and the alt keys around. Personally, I like the Windows (and Applications) keys next to the space bar. However, if you do want to map those keys, you won't be able to type the key in the SharpKeys' Type Key dialog as Windows intercepts that key. To get the alt keys mapped (Left Alt (00_38), Right Alt (E0_38)), you'll need to manually chose them in the SharpKeys: Add New Key Mapping dialog.

One small problem I did find is that the fn key on the Apple keyboard, which I wanted to map to Insert, does not have a scan code recognized by Windows. I guess I could write a quick keyboard filter driver to get the real fn key value and turn it into something else. However, I almost never use the Insert key so I'll leave the drive fun to someone else. On the good news side, though, the neat feature where the caps lock key does not turn on with very short-timed keystrokes, which is something done on the keyboard itself, obviously works in Vista. As a fairly poor typist, I really like that Apple put this trick in the keyboard.

Once you set up your keyboard settings with SharpKeys, log out so you can get them applied. If you were lusting after an Apple keyboard, you now have no excuse.


37 Comments

  • Gravatar Image
    GadgetGadget.info - Gadgets on the web » Using an Apple Keyboard on Vista October 8, 2007 9:23 PM

    PingBack from http://www.gadgetgadget.info/?p=125971

  • Gravatar Image
    Grigore October 8, 2007 10:30 PM

    John,

    I am lucky enough not to have any issues with my hands (yet), but I would have expected a "normal" keyboard to be better.

    Since you have problems yourself, you obviously know more about the subject.

    In your opinion, why would a laptop keyboard be kinder on your wrists?

    Regards,
    Grigore

  • Gravatar Image
    jrobbins October 9, 2007 1:33 AM

    Grigore,

    I guess I should have addressed this in the entry. Sorry. It's probably just me, but I seem to press the keys far harder than I should press them. With regular keyboards that means I'm pressing hard long past the point of the key being sent to the OS. I've had reasonable luck with mechanical keyboards, but they still don't work as well as a notebook keyboard. I guess with a notebook, I can't press any harder so I know the key is depressed with less throw. While I'm certainly no ergonomics expert, I feel the difference between a week on a laptop (or Apple keyboard) and a week on a regular keyboard.

    John.

  • Gravatar Image
    jonx October 9, 2007 5:41 PM

    Hello John,
    I fully agree with you, that keyboard rocks.
    I also have the same impression then you do. Much less pain in my fingers and in my wrists. the reasons for me lie in the fact that like you the key needs less power to be pressed, they need less distance to be depressed but also as the keyboard is very flat it nearly lies flat on the table. This makes that my wrist are much less bent (not sure about that verb) then they used to be with previous keyboards that have a bigger angle.

    About vista, can you confirm that you are really using Vista 64? I've heard from several users that the drivers do not install correctly. Ha ok, you are probably not using them...

    Now, about the fn key filter... how quick do you think it would take you to write it? because I'm highly interest in that. I'm not skilled enough to write it myself. Seriously, it would be terrific :)
    You see I'm using windows XP on a PC, not a mac and I have some 'problems' using that keyboard. I would like to be able to get ride of the Apple software. I got some posts on my blog about my story (www.happytocode.com). I did not yet talk about the driver but I have a small tool that is able to detect F7/rewind, F8/play, F9/forward and Eject... I'm unable to get the other 'special' keys...

    I guess you must be real busy but I take my chance. If you can't then... you can't ;)

    Reading keys from a USB HID is something I never did. What I have for now is here, a very simple and basic user mode app:
    http://www.happytocode.com/users/exchange/ASyncRead.rar

    What I would like is get the fn key and the special keys from F1 to F4, but also the keys from F10 to F12.

    I tried to play with the hclient sample from the ddk, but all I can make, is make it read the same 4 keys...

    Here is the post in the newsgroups where I request some help:
    http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/3bbeabfeed0e0fc4/c913eb0be7b8ff47?lnk=st&q=device+drivers+apple+keyboard&rnum=2#c913eb0be7b8ff47

    here is a topic in the libUsb forum where I request some help:
    http://www.picmicrochip.com/phpBB2/viewtopic.php?t=52

    I'm probably too verbose when I ask for help :)

    Maybe that if you don't have too much time you could point me to a new clue so that I can make more progress?

    so thanks for reading until here ;)

    One last thing, Microsoft has a tool a litle less intuitive then sharpkeys that can help you write a new keyboard layout, it's called microsoft keyboard layout creator 1.4

  • Gravatar Image
    jrobbins October 12, 2007 12:13 PM

    jonx,

    Yes, I'm using Vista x64. See the first link in the blog post. It runs like a dream. :)

    I haven't looked at driver code in five years, nor do I have the time to consider writing one. Sorry.

    John.

  • Gravatar Image
    jonx October 12, 2007 3:26 PM

    no, problem John,
    I'll find a way, hoppefully.
    thank you for your comment :)
    John.

  • Gravatar Image
    John Robbins' Blog October 15, 2007 4:02 AM

    As I posted the other day about the Apple Keyboard on Vista , I thought I've follow up with a note that

  • Gravatar Image
    galacticagent October 27, 2007 1:27 PM

    Just a word of warning: New Apple Aluminum KB does not work with IOgear KVM (or others for that matter). Works fine with direct connection, but absolutely doesn't work with my KVM. Cannot be found by the system. Discussions brewing on Apple Forums. Oi vey...

  • Gravatar Image
    jrobbins October 28, 2007 3:03 AM

    galacticagent,

    Interesting. I found that the Aluminum keyboard didn't let me boot from a DVD (http://www.wintellect.com/cs/blogs/jrobbins/archive/2007/10/15/spiffy-apple-keyboard-vs-booting-from-a-cd-dvd.aspx). If it's not working with KVM switches either, I wonder if it's got some sort of initialization problem? Either it's not initializing correctly or it's just slower than other USB keyboards.

    -John.

  • Gravatar Image
    Randy October 30, 2007 12:06 PM

    It's funny actually - I was using this very keyboard for a while and then stopped: the keys are a bit too quirky for me. I found that there's some dead zones on the keys - unless I press the key down in the dead center, I wouldn't get a key press. I was able to test out that theory by pressing a button on the corner... full press down, no keypress on the screen. Sad because it's a nice piece of hardware. Would have liked it better if it was split, but I was willing to go back to a straight keyboard if it worked better.

    Having said that it looks stylish as a USB keyboard on my Xbox 360!

    (and thanks for the link to SharpKeys! For the most part I've been telling people to grab the driver from BootCamp, since it adds support for the Fn key and the media functionality, but I don't know that they have an x64 version of it!)

  • Gravatar Image
    Brandon November 8, 2007 1:57 PM

    ok i have one question about this. i just recently bought the keyboard and i mapped all the keys correctly, but how would i do CNTRL+A so that i can select all, i can control c and control v to paste but how would i control A, does anyone possibly know.

  • Gravatar Image
    jrobbins November 11, 2007 11:17 PM

    Brandon,

    CTRL+A works great on all the places where I use it. It depends on the particular control that has focus as to if it supports CTRL+A. Start Notepad, type in a few things, and press CTRL+A to see the select all.

    Hope it helps!
    -John

  • Gravatar Image
    lopexo January 2, 2008 12:29 AM

    I am using this on a PC with vista and most keys work right out of the box with the exceptions of the number keys on the number pad.

    anyone have success with this? btw, sharpkeys recognized F16 as the numlock key but does not work

  • Gravatar Image
    Steff January 9, 2008 10:29 AM

    I got this keyboard recently and I'm using it with Vista, I found I had to change the layout to US (since I'm in the UK) and we do NOT have the @ as [shift]+2.

    Unfortunately the Apple keyboard has no # symbol, but using the US layout its actualy on the [shift]+3 key (As a coldfusion developer I use this symbol a lot!). Tho God only knows where the UK "Pound" sign is on the US layout.

    One "feature" I've found using this keyboard on Vista is that whenever I type a double quote " or a single quote ' it doesn't render it until after I press another key.

    Is anyone else having this problem? Or does anyone know a way to stop it?

  • Gravatar Image
    Jacko January 15, 2008 4:49 AM

    Steff... to stop the double quote problem above, change your keyboard to a "US" one, rather than "US International"

  • Gravatar Image
    SteveM January 23, 2008 6:33 PM

    Just grabbed my new apple keyboard & plugged into my Vista based X61 thinkpad, it worked without any trouble nor rebooting.

    Someone asked above about getting the key pad numbers working, try hitting the "clear" button just above the 7 key.

    My reason for getting the Apple keyboard was to reduce the amount of noise when i'm typing in the office, i'm a fast typer, but not very quiet. My co-workers are already pleased & all i've done so far is type this message.

    I'm not getting any issues with "dead-zones" in key presses.

    Top stup!

  • Gravatar Image
    Mufasa January 24, 2008 3:17 PM

    Thank you so much for posting this! I wanted something to switch the Command and Option keys to be in the correct locations for Windows and Alt and that SharpKeys program did the trick on my Vista x64 install. I just setup 4 rules to remap Left Alt, Right Alt, Left Windows and Right Windows, rebooted and it worked. Hardest part was finding those keys in the SharpKeys list. They are in the groups pre-fixed "Special:".

    Also, this fixed my Apple keys to be in the correct location (function as labeled) on my MacBook Pro that I'm controlling via a Synergy server on my Vista box. :)

  • Gravatar Image
    gary April 1, 2008 6:33 PM

    i am having a problem with random keys "sticking". never the same keys and never in the same application.

    is anyone else experiencing this? it happens the most in various chat software. the "stuck" key will continue to type the character indefinitely if i do not hit the either of the return/enter keys?

    i am not using any apple software, just the keyboard.

    any help you all can offer would be great. i love this keyboards and don't want to have to give it up.

    thanks, gary

  • Gravatar Image
    Tom May 12, 2008 12:08 AM

    Thanks for the good info. I am wondering if anyone has had any issues with the PC failing to post at all when they keyboard is plugged in... it won't get past the usb device detection.

  • Gravatar Image
    jrobbins May 12, 2008 11:45 AM

    Tom,

    If you're trying the Apple Keyboard on a non-Apple PC, I've got no idea how it'll work. Reading through the comments, it looks like we all are using Apple machines with the keyboard. Sorry.

    -John Robbins

  • Gravatar Image
    haysoos123 May 22, 2008 2:17 AM

    to Tom from above, I just got the aluminum keyboard and am using it on my pc (dual boot hackintosh leopard and Vista 64 if you must know). Try checking your bios setting and making sure that you set your 'USB keyboard Support' to 'enable' (also set it for mouse of course). Not sure what your motherboard is, but most have this option for both keyboards and mice.

    Also, there should be an bios option called 'halt on' errors. There maybe be a setting to halt on all errors except for keyboard... that would enable you to boot up to the OS so that it will see your keyboard.

    -H

  • Gravatar Image
    Zak September 7, 2008 3:45 PM

    I got the keyboard and it is driving me nuts that I have to use a Fn key at all(I got the full size one.) I hate having to hold Fn to use the F-keys, I use Japanese so F-keys are used a lot. I switched so F-keys were default but now I constantly have to use Fn to change my volume. I just want my media keys back to where they were, it pisses me off in winblows and Mac.

  • Gravatar Image
    munhow September 10, 2008 3:17 AM

    hey john!

    great one! thanks for the info. i wanted to swap the fn key with ctrl on my mackbook pro. But i couldn't find the fn's scancode. any idea how i can do it? i tried to use the Wake (or Fn) on the sharpKeys, but it just doesn't work. Appreciate if you can help :) thanks!

  • Gravatar Image
    netbooks, etc. September 17, 2008 2:49 AM

    A friend of mine just picked up one of these keyboards, and if you have access to a Leopard disc (or else the Boot Camp drivers), here's an alternative way to get things installed since the control panel sometimes fights:

    http://smallcomputing.net/2008/09/16/how-to-apple-aluminum-keyboard-in-windows/

    Cheers.

  • Gravatar Image
    Jon September 25, 2008 11:47 AM

    Does anyone know how to get teh number pad to work in excel when using vista? I cant quite figure it out :(

  • Gravatar Image
    bav September 29, 2008 9:19 AM

    how about the matching mouse? does it operate with windows vista ? or do you know about any other good keyboards and mouses?....

  • Gravatar Image
    Smarmy September 30, 2008 4:06 PM

    Hey John thanks for helping us PC users who are trying to use this keyboard. Oh wait, you don't help with that. Thanks for nothing.

  • Gravatar Image
    jrobbins September 30, 2008 4:19 PM

    Munhow: I took a look at trying to find the scan code for the FN key and without a custom keyboard driver, you can't get it from user mode. However, as "netbooks etc" points out, the Apple BootCamp x64 and Win32 drivers help immensely.

    Jon: I get the number keys by pressing Clear first. The Apple keyboard is the same as a Windows keyboard, except for the eject, fn, and different printing on the keys.

    Bav: I don't use the Apple mouse so I don't know.

    Smarmy: You're welcome. :) Sorry, I've been super busy.

    -John Robbins

  • Gravatar Image
    Alex October 8, 2008 6:45 AM

    Hi John
    Thanks for your post. It helped me work out what I should be doing with my keyboard and made me confident to purchase an Apple one for my new PC (I too much prefer laptop-style keypads, not to mention stylish ones).

    I tried your app, but had problems with the Print Screen button as others have mentioned.

    Anyway - I came across KeyTweak which seems to work fine (half teach method seems to work like yours).

    Hope that posting another app doesn't offend!
    Cheers
    Alex

  • Gravatar Image
    Krisen November 27, 2008 7:22 AM

    Thanks for the tip on getting the number pad to work! seems the clear button above the 7 toggles the keypad to work in Vista..I love internet forums!

    I have an old white apple keyboard plugged into the macbook pro with the lid closed. Also have a mouse plugged into the keyboard's usb slot. So finally a windows gaming rig that works great!

  • Gravatar Image
    Steve Carr December 3, 2008 9:53 AM

    I recently bought an Ultra thin Apple USB keyboard, plugged it in to my Advent Netbook running Windows XP and away I went. My netbook recognised the keyboard and mouse no problem. No need to map keys either.

    Steve


  • Gravatar Image
    David January 18, 2009 11:04 PM

    Has anyone figured out how to use the apple wireless keyboard's fn key on a PC?

  • Gravatar Image
    prochobo February 4, 2009 1:28 PM

    You could try using AutoHotKey. I found that this works great with Windows XP. Here's where I got some good information:

    http://www.isyougeekedup.com/apples-awesome-short-stroke-aluminum-keyboard-review/

  • Gravatar Image
    steve A July 7, 2009 4:26 PM

    i have an apple keyboard on vista and i am having problems with letters missing on the screen even though i have typed them also so bad lag i can type a few words and sometimes they take a while to appear i have tried ajusting the settings in the control panel and keyboard to no avail

    any suggestions would be welome as i love the feel of the keyboard and want to keep using it

  • Gravatar Image
    jrobbins July 7, 2009 10:50 PM

    Steve A,

    Weird! Are you plugging the keyboard into a USB hub? I'd try plugging it directly into the computer to see if that clears up the problem.

    John Robbins

  • Gravatar Image
    Tom S July 31, 2009 8:28 AM

    Thankyou!
    I had searched for a solution for this when I bought the keyboard until I finally gave up. I tried to return the keyboard but the store wouldn't take it back as it was lacking the plastic slip which the wire came wrapped in.

    Life without print screen during a project is a complete nightmare, I'm so happy you've shown me how to set-up this keyboard properly!

    Legend!

  • Gravatar Image
    jrobbins July 31, 2009 10:52 PM

    Tom,

    Glad to hear you got the wonderful Apple keyboard working. The more I use this keyboard, the more I love it!

    By the way, I'm using the Apple x64 drivers on my machine and am having no problems at all. F14 is the print screen key for those that are curious. :)

    - John Robbins

Have a Comment?

Archives

Blogs