Friday, December 6, 2013

How to switch PgUp/PgDn keys with Home/End without breaking keyboard

After adding a bluetooth adapter to my Toshiba laptop, I am fully enjoying the world of bluetooth accessories. In fact, I am getting spoiled by not using the USB ports for a keyboard or mouse. Wireless peripherals and especially bluetooth ones are so much cooler than pulling wires..

Finding a decent bluetooth keyboard was a bit of a hassle for me though. I have relatively big hands, and I am used to those curvy Microsoft keyboards such as Microsoft 2000. But the 2000 model is wired, which defies the whole purpose. It's also quite big. I like my desk tidy. And I don't use the calculator side of the keyboard at all.

The only one bluetooth keyboard I really liked is Microsoft 5000. Positioned as a keyboard for mobile devices, it's lightweight but solidly made, stylish, having large keys with great feedback. It does not come with the calculator keys (you can get the 6000 model for that), but otherwise it covers my needs for 100%.

For some reason, Microsoft does not make model 5000 keyboard anymore, and it's getting increasingly hard to get one new. I recently purchased another one on eBay, it came new in a box, sealed and unopened. Now I have one at home and one at work. They are exactly the same. I do carry my laptop back and forth, and when I turn it on, it would seamlessly connect to them, without any additional clicks or switches.

But... this article is not only about this awesome keyboard. It's about how to fix some of its keys.

Perhaps one of the reasons why Microsoft stopped making the model 5000 is because it was unpopular. It was unpopular probably because it had a few of its keys defined incorrectly. The PgUp and PgDn functions were sharing the same keys with Home and End. While PgUp and PgDn were made default keys, to use Home or End you have to push and hold the Fn (function) key each time to use Home or End.

I work with a lot of text on a daily basis (I am a programmer), but I don't use PgUp or PgDn as often as I use Home and End. In fact, I almost never use page up or page down. I use my mouse wheel to scroll between lines and pages of code.

But.. where there is a will there is a way. This problem didn't stand long against one's programmer's skills. I googled up a few things and came up with two registry files. They can help you too make your PgUp and PgDn keys work as Home and End, or undo those changes, respectively. The best thing is that the PgUp/PgDn don't go away, they can now be used with Fn key. In other words, the PgUp trades places with Home, and PgDn with End. In computer language this method is called changing scancode mappings. Btw, it worked for me on both Windows XP and Windows 7.

If you had the same problem I had, and if you want to switch your keys on your keyboard the same way, simply copy (verbatim!) the portions of text below into Notepad, separately, and save them as two separate .REG files. Take twice a day... I mean, run the first one to swap the keys, and the second one to reset the keys back to default layout.

Use this to switch PgUp/PgDn with Home/End:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,05,00,00,00,47,e0,49,e0,49,e0,47,e0,\
4f,e0,51,e0,51,e0,4f,e0,00,00,00,00

This will reset keys back to default:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,01,00,00,00,00,00,00,00

Disclaimer: the purpose of this article is to give a solution, not to force you to change anything in your computer be it hardware or software. Always wear gloves.. er.. I mean, always pay attention and utmost care when dealing with Windows registry. Back it up, etc. Improper actions or a misspelled command may result in unstable work or even unresponsive computer. I can only show you the way, you are the one to walk it, which means I don't guarantee this method to work on your particular computer, neither may I be held responsible for any problems caused by user actions.

Credits: Remapping Windows Keys by Preston Hunt

No comments:

Post a Comment