Remapping laptop’s keys under Windows

For the time being, I will be using a ThinkPad laptop running Windows 10. No idea what exact model of Thinkpad it is beside it being labelled ‘X1 Carbon’. It probably is an older model seing the really poor TN screen it comes with, what a shame.

It has a much nicer keyboard, though. Except a few keys that I find oddly placed, and some others that are missing.

Missing keys: Play/Pause, Next and Previous. Too bad for me, I listen to music almost all the time.

Oddly placed keys: PgUp and a PgDn are placed next to the arrow keys. And they’re configured to go one page backward/forward in a browser. Sure, why not but is it really that useful? I’d rather have the End/Home keys there instead. Those are keys I use all the time to quickly reach the end/beginning of a line of text. And I don’t have to look at the keyboard to find them, they’re just next the arrow keys.

Said Home/End keys being stored far, far away from my fingers at the very top of the keyboard, alongside the smaller FN keys. Making it a real pain to press them without having to stop whatever I’m doing in order to look at that stupid rows of keys first. A pain.

One final and personal gripe I have with that otherwise very fine keyboard is that Lenovo, in a logic that trully escapes me, decided to squeeze the PrtSc button right between the right Alt and Ctrl keys.

Do people really need to take screenshots that often for them to have that key constantly under their fingers? I don’t.

To make it worse, that button is tied to one of Microsoft’s very own pre-installed malwa… utility, their screenshot app. An app I find:

  • Slow-ish to start, and cumbersome.
  • An app that asks me at every single launch (and I often hit that PrtSc key by mistake) if I want to store my screenhots in One Drive? Yes or Ask Later.

I don’t give a whale’s crap where my screenshots are being saved. I don’t want this key to take screenshots at all.

I could not find on Microsoft or Lenovo support pages any obvious way to change that behavior. And nothing to remap the other annoying keys, either.

But I quickly found about AutoHotKey.

It’s a tiny freeware that does just one thing: running scripts. It’s tiny and 100% free, but it’s also incredibly powerful. I had a look at the doc and was blown away. It would probably takes me months to learn all its features.

The good news is that in order to remap keys I don’t need all that power. In fact, I just had to use what is probably one of AutoHotKey most basic feature, a command that looks like this: “a::b”, and reads “if the a key is pressed, type b instead”.

Remapping PgUp/PgDn and other keys, adding Media controls

I opened the new empty script file AutoHotKey created for me after I installed it (hat script is a simple text file, you can open it in Notepad or in any other text editor) and I added those lines, one for each key I wanted to change (I added a short description of each instruction, right after the # tags):

PgUp::Home # PgUp becomes Home
PgDn::End # PgDn becomes End
$PrintScreen::RAlt  # That stupid PrtSc becomes (another) right Alt key

# And here my new Media contrtol keys
End::Media_Next
Home::Media_Prev
Ins::Media_Play_Pause

As soon has the script is running, the keys are remapped. Neat.

I told Windows to run said script every time I log into the computer and AutoHotKey makes sure my keys are remapped however I want them.

I love this app. It made this laptop’s keyboard much nicer to use.

Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.