How to Add a Numpad to a Keyboard on Windows 10

To add a numeric keypad to a compact keyboard on Windows 10, use AutoHotkey v2 to remap the number row to virtual Numpad keys. The script below makes the top-row digits act as keypad digits while Caps Lock is on and restores their normal behavior when it is off. It works only in apps that accept AutoHotkey's simulated key events.

How the numpad mapping works

Windows and applications can distinguish a digit typed from the top row from the same digit sent by a numeric keypad. AutoHotkey can intercept a key and send a different one in its place. Here, 1 through 0 send Numpad1 through Numpad0; the #HotIf condition limits the remapping to the period when Caps Lock is toggled on. AutoHotkey documents these context-sensitive hotkeys and key names in its #HotIf reference, GetKeyState reference, and remapping guide.

Set up a numpad with AutoHotkey v2

  1. Install AutoHotkey v2

    Download the current stable AutoHotkey v2 release from the official AutoHotkey download page, then run the installer and keep the standard options unless you have a reason to change them. Use version 2 for the script below; older AutoHotkey v1 scripts use different conditional-hotkey syntax. The official installation guide explains the setup choices.

    Illustration of the AutoHotkey v2 download page open in a Windows 10 browser.
    Illustration of the official AutoHotkey download page; its appearance may change.
  2. Create the remapping script

    Open Notepad, paste the complete script below, and save it somewhere easy to find as numpad.ahk. In Notepad's Save As dialog, set Save as type to All files so Windows does not append .txt to the filename.

    #Requires AutoHotkey v2.0
    #SingleInstance Force
    
    #HotIf GetKeyState("CapsLock", "T")
    1::Numpad1
    2::Numpad2
    3::Numpad3
    4::Numpad4
    5::Numpad5
    6::Numpad6
    7::Numpad7
    8::Numpad8
    9::Numpad9
    0::Numpad0
    #HotIf

    The first line asks for AutoHotkey v2, and #SingleInstance Force prevents duplicate copies of this script from running. The conditional block applies the remaps only while Caps Lock is on; the final #HotIf clears that condition for any hotkeys that might be added later. This script intentionally maps only the ten digits. See AutoHotkey's key list if you want to add keypad operators or other keys.

    Notepad illustration showing the AutoHotkey v2 directive and the first three number-row-to-numpad mappings.
    The illustration shows the start of the script; copy all ten digit mappings from the code block.
  3. Run the script and switch modes

    Double-click numpad.ahk. AutoHotkey should appear in the notification area near the Windows clock; if the icon is hidden, select the small up arrow to view tray icons. Press Caps Lock to turn the remapping on, then type a number-row digit in the app you want to use. Press Caps Lock again to return to ordinary number-row input.

    Caps Lock still controls letter case. While it is on, letters you type are uppercase, so switch it off when you return to normal typing. To stop the mapping entirely, right-click the AutoHotkey tray icon and choose Exit.

    Keyboard illustration with Caps Lock and the number-row 2 highlighted for the temporary numpad mode.
    Caps Lock enables the temporary mode; the highlighted top-row digit is then sent as a keypad key.
  4. Test it in the target app

    Use a harmless shortcut or input setting that specifically expects a keypad key. With Caps Lock on, press the matching digit on the top row; turn Caps Lock off and repeat to confirm the mapping stops. A text editor alone cannot distinguish the two inputs because both normally display the same numeral. If the app has a key-binding screen, bind a temporary action to a keypad-only key and test it there.

    Diagram showing the physical top-row 2 key mapped to a Numpad 2 key event.
    The mapping sends a Numpad 2 event when you press the top-row 2 key.

Limits and quick fixes

  • Operators are not included. The script maps digits only, not keypad plus, minus, multiply, divide, decimal, or Enter. Those require additional remaps and suitable source keys; some source keys may produce different characters on non-US keyboard layouts.
  • An app may ignore simulated input. Some games, remote sessions, or apps with specialized input handling may not accept remapped events. Check the app's documentation and rules, especially before using keyboard remapping in an online game. If it works in one app but not another, the target app may be the limitation.
  • Check the script file and version. If double-clicking opens the file in Notepad, confirm it ends in .ahk, not .ahk.txt, and that AutoHotkey v2 is installed. An older v1 interpreter cannot run this v2 script as written.
  • Check the target app's permission level. If the app is running with elevated permissions, a script running normally may not send input to it. Only if you trust the app and understand the effect, try running both at the same permission level and test again.

If you only need an on-screen keypad for occasional mouse or touch entry, Windows includes the On-Screen Keyboard. Press Windows key + Ctrl + O, select Options, and turn on Turn on numeric keypad. This displays keypad buttons; it does not turn the physical number row into a numpad. Microsoft's On-Screen Keyboard guide covers the option.

Leave a Comment

How to Move Minecraft to Another Drive in Windows 10

How to Move Minecraft to Another Drive in Windows 10

Move Minecraft for Windows to another drive with the built-in Settings option, protect your worlds, and see what to do if Move is unavailable.

How to Fix a Missing Run Anyway Option in Windows 10 SmartScreen

How to Fix a Missing Run Anyway Option in Windows 10 SmartScreen

Find out why Windows 10 hides SmartScreen’s Run anyway button, how to review the warning, and how to allow a bypass while keeping SmartScreen on.

How to Enable Mono Audio on Windows 10

How to Enable Mono Audio on Windows 10

Combine left and right channels so you can hear the full mix through one earbud. Follow the Windows 10 Settings path and learn how to restore stereo when you want it.

How to Create a Custom Grid for Your Display in Windows 10

How to Create a Custom Grid for Your Display in Windows 10

Learn how to build a custom grid for your display in Windows 10 with PowerToys FancyZones, adjust zones, choose each monitor, and snap apps into place.

How to Enable Auto Logon on Windows 10

How to Enable Auto Logon on Windows 10

Set Windows 10 to sign in automatically at startup with Microsoft Sysinternals Autologon, then learn how to disable it and understand the security tradeoffs.

How to Enable the Ultimate Performance Power Plan in Windows 10

How to Enable the Ultimate Performance Power Plan in Windows 10

Add the Ultimate Performance power plan in Windows 10 with an elevated command, select it in Power Options, and check compatibility and power-use limits.

How to Refresh Bookmark Favicons in Microsoft Edge on Windows 10

How to Refresh Bookmark Favicons in Microsoft Edge on Windows 10

Refresh missing or incorrect bookmark icons in Edge by reopening the saved page, clearing cached images, or rebuilding the favicon cache safely.

How to Add a Numpad to a Keyboard on Windows 10

How to Add a Numpad to a Keyboard on Windows 10

Turn the number row into virtual numpad keys on Windows 10 with AutoHotkey v2. Set up a Caps Lock toggle, test it in your app, and see what the script cannot remap.

How to Disable an Ethernet Connection in Windows 10

How to Disable an Ethernet Connection in Windows 10

Turn off a wired Ethernet adapter in Windows 10, confirm you selected the right device, restore it later, or use PowerShell.

How to Connect Bluetooth Headphones to Windows 10

How to Connect Bluetooth Headphones to Windows 10

Pair Bluetooth headphones with Windows 10, choose them as your audio output, and fix common discovery or sound problems.