Re-mapping Lenovo Thinkpad Yoga Keyboard – [end] and [insert] keys

Written by Troy on February 2, 2015 Categories: Uncategorized Tags: , , , ,

I recently purchased a new Lenovo Thinkpad Yoga. I bought it to be a workhorse and chose a Lenovo due to the good quality keyboards (sorry, Surface Pro). Like many modern machines, the function keys double up to control screen brightness, volume etc, and this is the default behaviour. To access the actual function keys (e.g. [F5] – run!) you need to use the [Fn] key. Helpfully ‘FnLk’ is enabled full time by pressing [Fn]+[Esc]. The dilemma as a programmer is that [end] and [insert] share a key, and by enabling function lock, you lose the [end] key and have the cursed [insert] key by default. Productivity killer!

Lenovo laptop keyboard

The layout of a compact Lenovo keyboard, as used on the Thinkpad Yoga. Note the repurposed function keys.

The home, end, delete and backspace keys, and their unloved cousin, insert.

The home, end, delete and backspace keys, and their unloved cousin, insert.

I found information on the Windows registry key that allows you to re-map keys (search for ‘Scan code mapper for keyboards’). That’s well and good… what on earth are the hexadecimal key values for [insert] and [end]? Some page on Geocities? :)

Using this information, here is the key mapping block I want:

00000000 <-- header version
00000000 <-- header flags
00000003 <-- number of entries (3, including null terminator)
e04fe052 <-- map [end] to [insert]
e052e04f <-- map [insert] to [end]
00000000 <-- null terminator

Or, as exported from the registry (the values are little-endian):

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,03,00,00,00,52,e0,4f,e0,4f,e0,52,e0,\
00,00,00,00

Now the mapping is reversed, I can keep function lock enabled to access the function keys, and keep [end] at hand for getting to line/document endings. Happily, I typed this post with a handy [end] key. Hurrah!

You can download the registry file here. Remove the .txt extension and you can merge it into your registry.

6 Comments

6 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>