SharpKeys 2.1

SharpKeys is a Registry hack that is used to make certain keys on a keyboard act like other keys. For example, if you accidentally hit Caps Lock often, you could use this utility to map Caps Lock to a Shift key or even turn it off completely. The official release includes support for up to 104 mappings, an extensive list of available keys, and a “Type Key” option to help when managing mappings. As it relies on internal support within Windows NT, Windows 2000, Windows XP, Windows Server 2003, or Windows Vista you must be running one of these OS’s for this Registry hack to work.

Version 2.1 addresses what I would call a complete and total boneheaded omission on the “Type Key” form. Version 2.0 included a newly design UI and was recompiled to use the 2.0 release of the .NET Framework.

Download SharpKeys 2.1: EXE | MSI | ZIP

Download: .NET Framework version 2.0

Read: SharpKeys FAQ

Screenshots: 1 | 2 | 3

SharpKeys 1.1 is also still available, using the 1.1 version of the .NET Framework – read this post for more information.


52 thoughts on “SharpKeys 2.1”

  1. Hi. I thought your key mapper could help but I’m not so sure.

    The problem is that the @ symbol on my keyboard SHOULD be accessed by pressing shift and comma and the ” symbol SHOULD be accessed by pressing shift and 2. This was how the the keyboard worked on my old system (Pentium 2, Windows 98) but on my new system (AMD Athlon 64, Windows XP) it has transposed it. Even in putting my email address in for this comment I originally put tr”yner.me.uk and had to go back and correct it.

    I downloaded version 1.1 of your mapper but found that it only seems to do whole key remaps which would mean that I’d be ok for typing e-mail addresses but I’d have to hit the , key every time I wanted to type 2. The same applied when I downloaded version 2.1.

    Don’t suppose you know any way round this do you?

    If this was a Linux problem I’d have found the answer online in seconds (I might not be able to understand it, however ;) )

  2. @Tim – try AutoHotKeys – they do more custom mapping… I don’t even do the remapping in this, I just expose the Windows registry key.

  3. Well it turns out that the Language settings WERE the problem. I’d set it to English (UK) but it seems that whoever programmed the language selection bit of Windows seemed to think it was a good idea that when someone selects a new language for the set up to reset it to English (US) and just add the language to the list of languages possible on that computer without giving any hints that this is what will happen. To make things further complicated it still keeps US as default so that when I thought I had the problem licked I ended up with the same problems next time I restarted the computer. You need to actually go into the menu and select ‘use this language as default’. I did that and went one further by forcibly removing English (US) from my computer.

    If only I could do that in real life!

    It’s colour with a ‘u’, Biscuit not cookie, Nappy not diaper, Rubbish not trash and you only call it a bathroom if it’s actually got a bath in it!

    Oh and our pints are bigger than yours. Nyah nyah!

    (Sorry, in a slightly xenophobic mood due to Bill Gates being an American helped along by sites which use .com but only sell to America – and the even more annoying ones which say they sell to ‘the rest of the world’ by which they mean Canada)

    (I’m sure you have .co.us or .com.us or something and I’m a bit of a domain name Hitler. I also hate people using .co.uk etc. and .com when they are NOT companies, using .net for personal stuff and businesses when I feel it should be limited to large online organisations and servers, or possibly webzines and the like, .org when they are not an organisation or webzine and .biz under any circumstances because it is an abomination before God and such tackiness should never have been allowed by the internet registry organisations)

    Thanks for the help and advice. (Also to the other guy who appears to have his posts deleted – just good housekeeping to preserve server space I guess) I’ll keep the keymappers just in case I ever have need to use them for something else.

  4. Ah, cool. As to the other posts, correct it’s a bit of housekeeping. I see no reason to start another pro-Linux comment trail on yet another post – especially a post that has to do with software *I* write for Windows… there’s lots more posts that that argument can be ammended to :)

  5. “Unknown: 0x0056 (00_56)

    It’s a second \ or | key on this coolermaster USB keyboard (model EAK-USI), between left-alt and space…

    Posted on: April 18, 2006 at 08:56 PM by Randy

    Well, the trick with this one is whether or not it’s the “same” key. … Couldn’t tell you what the coolermaster keyboard is doing: best you could do is try it :)”

    ——————————

    The \ key next to the space bar is 00_56, and the one above the enter key (which can be remapped just fine) is 00_2B, So they are different keys!

    cheers,

    sm

  6. any tips on how? sharpkeys won’t let me, and my head spins when I read about manually setting the registry keys for key remapping (which led me here in the first place!)

    // sm

  7. Hi Great work Sharpkeys. Do you have a list of codes that keys on Apple’s Macbook Pro generate? I am trying to map certain keys to work in Wndows XP but don’t know the code each of the redundant keys generate. Is there any application that can assist in determining this?

  8. Cool little application this is! However, I’m trying to map the volume up/down/off keys of a first generation Apple Pro USB keyboard and SharpKeys tells me it doesn’t know the keys pressed.

    Did you do any research into this keyboard?

    Cheers!

  9. Further to my earlier post I have now discovered the ‘Type Key’ function, so please ignore my earlier query.

    The Fn key on Mac keyboard remains a mystery. Shouldn’t the scancode generated by other keys change if you keep the Fn key pressed? Doesn’t happen on this one!

  10. Sadly, no…

    I had the opportunity to play with SharpKeys on a macBook Pro with XP installed: I found a similar experience: Fn does nothing. Nor does the Eject key. That means that these keys don’t get passed to Windows as standard keyboard input. Keys like volume up/down on my ThinkPad do the same thing: a special driver is in there somewhere, grabbing the input. In the case of the MacBook, there’s a driver that comes with BootCamp for Eject to work properly…

    So, pretty much, what we have is what we have. Sorry I couldn’t be of more help with it though!

  11. Hey.

    I can´t seem to get it to work with print screen.

    I have an apple usb-keyboard, and I would like it to work on my Windows XP.

    I have tried both 1.1 version and 2.1, but it still doesn´t work.

    I have a swedish layout, could this be a problem?

  12. Well, Print Screen is difficult as is it. Much like Pause/Break, it’s a triple byte key value so it’s already hard to map – if it’s coming from an Apple keyboard with a Swedish layout…? No idea what that would do. One thing that I do know is that if the “Type Key” window doesn’t see it then there’s a good chance that Windows doesn’t see it either.

  13. Not that I know of – there’s no “eject” button on most media keyboards and on notebooks it’s usually a hard coded hardware thing (meaning that Windows doesn’t handle it)… sorry!

  14. Yeah, that seems to be the consensus. My keyboard has the web keys and volume keys on it, and with only a few lines of code an exe can be made that will eject the tray. I hope to modify the Web:Stop key listed in SharpKeys as “E0_6A” to launch this exe instead, hence be my Eject button. Any ideas on where I can find this registry entry E0_6A? Furthermore (and not really related to your brilliant proggie) any idea on what the key should look like to lauch an exe instead of issuing the Web:Stop command?

  15. Hi,

    I’ll be getting a ThinkPad next week and would like to know if it’s possible to map Fn+Cursor to media buttons (play, skip etc.), like on the new T60 (I’m getting a T42p).

    Which ThinkPad do you have, Randy, and which limitation does it have regarding Sharpkeys?

    Thanks for the great tool (currently using it to remap Capslock to Ctrl on my desktop).

  16. I can see that there is a key defined as LaunchApplication1 (aka F20) using ScancodeMapper.exe. If I could define the application as an exe that ejects the CD tray I would be all set… anyone know how I define what Application1 is?

  17. I found ScancodeMapper in a thread here which you discussed:

    Quote “Ya, that’s Chris Sells’ version, which came out about a year before mine”

    Anyway, I’ll keep looking for a way to perform this action without a TSR. If I ever find the solution I’ll post it here.

  18. Oh. Hah – I had forgotten about that.

    Well, what I can tell you is that MacBooks have an eject key and they had to do the same thing: they leave a service running to pop the disc out when running under Windows.

  19. When I write to the registry in vista beta two. I get this.

    See the end of this message for details on invoking

    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************

    System.UnauthorizedAccessException: Access to the registry key ‘HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Keyboard Layout’ is denied.

    at Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)

    at Microsoft.Win32.RegistryKey.CreateSubKey(String subkey, RegistryKeyPermissionCheck permissionCheck, RegistrySecurity registrySecurity)

    at Microsoft.Win32.RegistryKey.CreateSubKey(String subkey)

    at SharpKeys.Dialog_Main.SaveMappingsToRegistry()

    at SharpKeys.Dialog_Main.btnSave_Click(Object sender, EventArgs e)

    at System.Windows.Forms.Control.OnClick(EventArgs e)

    at System.Windows.Forms.Button.OnClick(EventArgs e)

    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)

    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)

    at System.Windows.Forms.Control.WndProc(Message& m)

    at System.Windows.Forms.ButtonBase.WndProc(Message& m)

    at System.Windows.Forms.Button.WndProc(Message& m)

    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    ************** Loaded Assemblies **************

    mscorlib

    Assembly Version: 2.0.0.0

    Win32 Version: 2.0.50727.88 (rtmLHS.050727-8800)

    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll

    —————————————-

    SharpKeys

    Assembly Version: 2.1.0.0

    Win32 Version: 2.1.0.0

    CodeBase: file:///C:/Program%20Files/RandyRants.com/SharpKeys/SharpKeys.exe

    —————————————-

    System.Windows.Forms

    Assembly Version: 2.0.0.0

    Win32 Version: 2.0.50727.88 (rtmLHS.050727-8800)

    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

    —————————————-

    System

    Assembly Version: 2.0.0.0

    Win32 Version: 2.0.50727.88 (rtmLHS.050727-8800)

    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll

    —————————————-

    System.Drawing

    Assembly Version: 2.0.0.0

    Win32 Version: 2.0.50727.88 (rtmLHS.050727-8800)

    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

    —————————————-

    Accessibility

    Assembly Version: 2.0.0.0

    Win32 Version: 2.0.50727.88 (rtmLHS.050727-8800)

    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll

    —————————————-

    ************** JIT Debugging **************

    To enable just-in-time (JIT) debugging, the .config file for this

    application or computer (machine.config) must have the

    jitDebugging value set in the system.windows.forms section.

    The application must also be compiled with debugging

    enabled.

    For example:

    When JIT debugging is enabled, any unhandled exception

    will be sent to the JIT debugger registered on the computer

    rather than be handled by this dialog box.

  20. Oops. Looks like a permissions problem… one of two things: When it asked you “this is trying to elevate blah blah blah” did you say yes? If you didn’t please do.

    If you did, right click on the shortcut and run it as an Administrator… this will give you access to that registry key. That will work but you’d have to do that every time you run SharpKeys (which thankfully isn’t often!)

  21. It never asked me this is trying to elevate blah blah blah, I am on the build number 5384. Right clicking on a link did not have run it as administrator is an option, however going to the executable under program files by right clicking gave me the option. That worked.

  22. Ya, the “elevate” option is different between builds and depending on the shortcut/link/EXE file being accessed.

    I can’t tell yet if it’s throwing the exception b/c I need to ASK for permissions or because I’m asking and won’t ever get them… we’ll see what happens once it gets to RC1 :)

  23. I am also trying to get the print screen functionality working under bootcamp on a mac book pro without any success.

    any hints?

  24. Well, SharpKeys does work on a MB and MBP running XP using BootCamp, but Print Screen is a very irksome and special key… it’s a triple byte key and it’s only partially supported via SharpKeys. Your best bet it to try something like AutoHotKey or Microsoft’s keyboard layout tool: they better support strange keys like PrnScn.

  25. Hi,

    Thanks very much for Sharpkeys. I installed it a few weeks ago and used it to swap the ctrl & windows keys on my windows xp64 box. I’m using a macintosh keyboard from macally, so this makes the control key the “windows” key and the command key the ctrl key

    About an hour ago, all of a sudden both the ctrl & command(windows) key started acting like the windows key. Nothing else unusual appeared to happen at this time. I reran sharp keys and wrote to registry, rebooted, but still…I have two windows keys and no control key. :(

    Any idea what could cause this?

  26. Hm. Differernt user log in perhaps? You could try removing the keys, rebooting, putting them back and rebooting… I mean SharpKeys doesn’t remap them: Windows does… I wonder if something got munged some how?

  27. I Used SharpKeys to remap the keyboard on a MacBook Pro after installing Boot Camp / WinXP

    some hints:

    Use SharpKeys to remap DEL to F12 (“Function:F12 00_58” to “Special:Delete E0_53”) BEFORE adding the MacBook Pro to a Windows Domain (then you´ve got access to CTRL-ALT-DEL in order to login)

    On a German (also other non-US keybaords) map “Special:RightWindow (E0_5C)” to “Special:RightAlt (“E0_38)” This gies you the AltGr key to access characters like “\” and “@” in their normal windows positions

    And lastly, on a German keybaord, you´ll have to swap two keys ”

  28. I have installed SharkKeys and also tried RemapKey. Both work on my internal keyboard, but neither will remap the Caps Lock key (I want it to be Ctrl) on a PS/2 keyboard plugged into a RadioShack PS/2 to USB adapter. Any ideas? Tried two different keyboards, wireless and wired. THe other keys I remap work fine (Alt, and Caps Lock), but Ctrl won’t function when assigned to Caps Lock.

    Any ideas?

    Thanks!

  29. Sounds like the keys are getting lost on the PS/2 to USB conversion… lemme ask ya this: does Caps Lock work on that keyboard?

  30. Any chance that there will be profiles within SharpKeys so users (expecially those with laptops and external keyboards) could switch between home and work? Its a bit annoying having to delete settings and recreate them for different keyboards.

    Cheers,

    -matt

  31. Actually my problem (swapping between an Apple and a Microsoft keyboard; swapping LWin and LAlt or not respectively) was resolved using an AutoHotKey script:

    LAlt::LWin

    LWin::LAlt

    *Tab::Send {Blind}{Tab}

    so I just run the script depending on the keyboard.

    I still use SharpKeys to map Apple’s F14 to PrintScreen though!

    -matt

  32. Hm. Differernt user log in perhaps? You could try removing the keys, rebooting, putting them back and rebooting… I mean SharpKeys doesn’t remap them: Windows does… I wonder if something got munged some how?

    I tried removing the keys, rebooting, putting them back, and rebooting and it worked. A week later it has happened again. Both times the first time I noticed the problem were trying to use the t shortcut in Firefox.

  33. Shouldn’t matter: the keys are being stored in HKEY_LOCAL_MACHINE. I was just looking into that the other night, because writing things to that Hive is what requires you to “Run as Administrator” under Vista… there is no cooresponding key/path under HKEY_CURRENT_USER, so it couldn’t go there if I wanted it to. Gotta be under Local Machine which also means it should be impacted by a different user.

    Of course, if the keys are getting snagged by another application… like WinAMP has a “Global Hot Key” thing. Something like that could definitely screw up other stuff… not a clue as to what could be doing that though.

  34. So, what’s the deal with Apple keyboards on the PC? I recently bought an Apple wireless bluetooth keyboard (given that they’re the prettiest keyboards that still have the correct amount of keys and are wireless–I can’t stand those ugly keyboards with 324 extra hotkeys and a bulky design) and I’m quite satisfied. I knew from all the research I’d done on the keyboard before buying it that there’d be problems with the volume and eject keys, but I figured there would be some work around. I managed my way here and used your app for changing the f13-16 keys, and I’m quite satisfied. I ventured even farther and downloaded autohotkey, but after hours of searching forums, I gave up trying to figure out how to get my 4 remaining keys working. The biggest problem I’m having is figuring out what the keys should be, in respect to a scancode or whatnot. So here’s my main question: Does windows completely disregard these keys, and is it possible for me to map the at all, or are they impossible to map? If there’s even a remote possibility to get these things working, I’m sure I’d take the time and do it, but I’ve looked everywhere and I can’t find anything helpful. Anyone here have a suggestion? Can I map these keys or not?

    Thanks!

  35. If AutoHotKeys can’t do it I would imagine that Windows can’t remap them.

    Over all it depends on what the keyboard is doing. If it sends the keys to Windows, Windows can remap them. If they aren’t then it’s a moot issue.

  36. Well that’s no good. Is there a verifiable way I can determine if the keys are doing anything when I push them? I tried the “Type key” function in SharpKeys, which did nothing for just those 4 keys. Any other way I could find out? I mean, this keyboard would be so much more badass if those keys worked right.

  37. Not that I know of – there probably needs to be a driver loaded for the extra keys… sucks but I don’t what else to do with it :(

  38. Impressed by Sharpkeys. Do you know of a way to swap the = + which are on the same key on my laptop, so that I dont need to use shift to get the +. It annoys me. Thanks

  39. i want to change or remap the keys of “@” (shift+2) and ” “” ” (shift+’).

    when I pressed shift+2 the result is the double quotation mark “.

    my OS is windows Vista. toshiba A200 Satellite model notebook.

    thanks.

  40. Sure ya do: SharpKeys remaps whole keys and not “half” a key… take a look at the FAQ or the comments here for more info.

  41. thanks for your great tool- one question.

    i have a mac pro running 64-bit vista under bootcamp. the keyboard works pretty well, but the alt (option for mac) key and the windows (command for mac) keys are position swapped on the keyboard. both function properly within windows (that is, they provide alt & windows key function within windows). when i tried to logically change them using your tool the alt key wasnt recognized by the “type key” input, but the windows key was.

    any thoughts on this?

    thanks in advance…

  42. Might want to try selecting the key by hand – if I remember correctly, the Alt key gets eaten by the menu and doesn’t make it to the type any key…

Comments are closed.