Hacking Your Keyboard’s App Keys via Windows Registry

Hacking Your Keyboard’s App Keys via Windows Registry
Photo by Ken Suarez / Unsplash

Or: How to Make That Useless Mail Button Open Something Useful

You’re an IT administrator, and your users keep asking:

"Why does this ‘Mail’ button on my keyboard open the Windows Mail App?"

"Can I make this Calculator button open Notepad++ instead?"

Of course, you can. And no, you don’t need to install third-party software. You just need a little Windows Registry magic.

The Registry Path to Keyboard Freedom

Windows stores keyboard app key mappings in the Registry, specifically under:

📂 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AppKey\

Each subkey (e.g., 7, 18, etc.) corresponds to a specific key on multimedia keyboards. Here’s a quick rundown:

  • 7 → Web Browser
  • 18 → Mail
  • 19 → Media Player
  • 15 → Search

Example: Remapping the Mail Button to Outlook Web

Instead of launching an unwanted app, let’s make the Mail button open Outlook Web App:

  • Open Registry Editor (regedit.exe).
  • Navigate to:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AppKey\18
  • Modify or create a String Value named ShellExecute.
  • Set its value to:
https://outlook.office.com 
  • Close Regedit and press the Mail button. Voilà! It now launches Outlook Web instead of a relic from the XP era.

Use Case: Remapping the Calculator Key to a Custom App

Some keyboards have a dedicated Calculator button. But what if you’re an IT admin who needs to launch PowerShell or a custom-built tool instead?

  • Head to:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AppKey\17
  • Add or modify the ShellExecute string value.
  • Set it to:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
  • Now, every time you hit that button, PowerShell opens instead of Calculator.

Bonus: Disabling an App Key Completely

If a user keeps accidentally pressing the wrong button (e.g., the Search button in Windows 11, which nobody asked for), you can disable it:

  • Find the relevant AppKey folder (e.g., 15 for Search).
  • Create a DWORD (32-bit) Value named AssociatedProgram.
  • Set its value to 0.

Final Thoughts

A couple of quick Registry edits, and you can reprogram those pesky keyboard buttons to actually do something useful. Whether you're optimizing workflows, preventing accidental presses, or just taking revenge on legacy shortcuts, this trick is a must-know for every Windows admin.

👨‍💻 Happy key hacking! 🚀