Categories: Miscellaneous

How To Remap Keyboard Keys In Windows (Such as the with Apple Keyboard)

I use the Apple bluetooth wireless keyboard, but I use it with my Windows computer, not a Mac. I love it though, and I think it’s the best bluetooth keyboard around – the problem is, while most keys generally work fine, certain keys are missing.

For instance, on the Apple keyboard, the command key is the Windows key by default, so that’s convenient. However, I don’t have the Home and End keys, which make text-editing cumbersome. Furthermore, I have no Delete key. That sucks, because you can’t even delete a file in Explorer with the keyboard this way. In addition, the keyboard has the left Alt key and the left Windows key completely opposite from my notebook (a Lenovo Thinkpad T410s).

So I went about looking for a solution, and found it in the form of AutoHotKey. It’s a free, open-source utility for Windows that enables you to create scripts for automating keystrokes and mouse clicks. What’s important though, is that it allows you to remap keys as well.

I chose this solution over SharpKeys (another key re-mapping utility) primarily because AutoHotKey allows for “profiles”, which is useful because sometimes I use my notebook alone without my external keyboard, and I want the default key mappings to be restored. With AutoHotKey, I just run a script that remaps the keys that I want, and whenever I’m outside with just my notebook, I disable the script and I’m back to my default key settings.

I had to use a script that was generously given to the community, and modify it to suit my needs. If you’re interested, here it is: AutoHotKey script for Apple Keyboard.

Instructions:

  1. You’ll first need to install AutoHotKey.
  2. Then, download my zip archive (AutoHotKey script for Apple Keyboard), and extract it to wherever you want.
  3. Now, just run the file “Keyboard Media Keys.ahk”.
  4. All set!

Explanation:

What this script does is to remap the eject key on the keyboard to be a Delete key. I’ve also modified some of the Apple keyboard keys to suit me though, and you can change it in the file “Keyboard Media Keys.ahk”. Look for them from line 46-49, and they’ll look like this:

LAlt::LWin
LWin::LAlt
RAlt::End
RWin::Home

So what that means is that I’ve swapped the positions of the left Alt key and the left Windows key. I’ve also set the right Alt key to be End and the right Windows key to be Home.

Hope you find this useful and let me know if you need further help with it!

Alvin Poh

I've over 17 years of entrepreneurship experience, having built a tech company to be the top in the country, which was subsequently acquired for an 8-figure sum. As CEO, I led the company through robust growth to 150 employees across 4 countries. After the acquisition, I embraced minimalism, sold off my personal possessions, and started living around the world. Read more about my story here.

View Comments

  • Hi, Can't seem to get remap of Mac Eject to Windows Backspace and Mac Delete to Windows Delete to work with the native keyboard of teh Macbook Pro 17' latest model. any thoughts? Thanks,.

  • Mine's an external keyboard but it's strange because theoretically the key codes should be the same (I don't have a MBP to test though). Are you trying with AutoHotKey?

  • Yes, used AutoHotKey and the following your instructions above for installation and scripts. one would think it would be the same.
    Seems to work for serttings: Keyboard Media Keys.ahk
    But not for: Keyboard Media Keys Actions.ahk
    Perhaps it is checking the wrong code
    Trying to Remap Apple's Eject ==> Windows Delete and Apple's Delete ==> Windows Backspace.
    thanks for your help

  • Ahh...check the instructions.txt file in the package. You probably need to run "Keyboard Media Keys - detect keys.ahk" for your keyboard. See if it says that the Eject key gives you a value of 4854. If it doesn't, you'll need to edit Keyboard Media Keys Actions.ahk with the right value number.

  • Yes it's a special key, and the original author of the guide put in the DLL just to detect keys like that. I'm not sure why it doesn't appear for MBP keyboards though, and I apologise that I can't test it because I don't have a MBP. However, if it's helpful, I'm using it with the external Apple keyboard, and that works well.

  • OK Thanks for all your help and will find another solution. or deal with it... When i run AutoHotkeyRemoteControlDLL.ahk and it lists a bunch of HID, MICE and Keyboards (2 e.g. when i have 1). and when i click on either in the list, i get an error and it crashes. Perhaps the DLL is old and not Win 7 compatible. anyway. thansk so much for your kind attention. And for letting me know it works for you. I will try with a wireless apple keyboard.

  • No problem! :) Actually I'm using Win 7 64bit too, so it's strange - the only thing I can think of is that the MBP keyboard is somehow giving different values, or that the autohotkey program cannot interface it through the Mac...*shrug* Well, hope you find out why...these things can be annoying sometimes!

  • Awesome script! This is exactly what I needed! I'm encountering an issue when trying to move through the Alt+Tab menu though. The Alt+Tab menu comes up, but once I tab to the application I want to bring up, the Alt+Tab pop-up stays there. Have you had this issue?

  • Yep same here. Unfortunately it turns out to be a specific Alt-Tab behaviour in Windows that doesn't seem to have a solution from what I've searched (it doesn't affect other hot-key combinations). So what I do is Alt-Tab, Enter (to choose the app), and Alt once (to toggle Alt off, because it somehow stays on)

Recent Posts

Best Protein Bar Review: Which Is The Healthiest Of Them All?

Protein bars have become the go-to snack for fitness enthusiasts, busy professionals, and health-conscious snackers…

1 day ago

What Salary Raise To Give Your Philippines Team

A salary raise can significantly enhance the motivation and loyalty of your Philippines team members.…

2 weeks ago

3 Myths About Venture Capital and Entrepreneurship

The narrative of young entrepreneurs securing vast sums from venture capitalists for their startups, particularly…

3 weeks ago

Ultimate List of Top 80 Sites to Submit Your Startup to Promote It in 2024

Launching a startup is challenging. Despite many founders having innovative ideas, only a handful successfully…

3 weeks ago

Why Retirement Isn’t What It’s Cut Out To Be

What is retirement after all? A better way of looking at retirement is that it’s…

4 weeks ago

Fix ElementsKit Mega Menu On Mobile Problems

ElementsKit has a very simple and easy-to-use Mega Menu for Elementor, but it has a…

7 months ago