How to set Number Keypad as Function Keys {Windows, Linux, Mac}

, , …,

This page is shows you how-to set the numberpad keys as function keys, for {Windows, Linux, Mac}. For example, set a key to switch to browser, close tab, next/prev tab.

Microsoft Windows

For Microsoft Windows, the best tool is AutoHotkey. I've been using AutoHotkey for many years.

pc keyboard
the numeric keypad of a standard PC keyboard

First, you need to install AutoHotkey. See: AutoHotkey Tutorial ⌨

Create the followig file.

;; Mozilla Firefox

#IfWinActive ahk_class MozillaWindowClass

NumpadDiv::Send ^{PgUp} ; previous tab
NumpadMult::Send ^{PgDn} ; next tab
NumpadSub::Send ^w ; close window

Now, double click the file to run it. It will run in the background, and now you can press the / * to switch to pre/next tab, and - to close tab.

For more examples, see:

Linux

For Linux, there are 2 things you need to do.

  1. Set a key to run a shell command.
  2. The shell command does action. It can send key combination such as 【Ctrl+c】, or {switch, close, launch, …} {windows, apps, tabs, …}.

For popular Linux desktops such as Gnome, KDE, Ubuntu Unity, Xfce , there's a GUI that lets you easily set a key to run a shell command. Look for it in your system control panel.

xfce keyboard setting panel 2013-06-01
Xfce keyboard setting panel

I recommend using the desktop GUI to set a key. Otherwise, you can use xbindkeys. See Linux: Xbindkeys Tutorial ⌨

For {switch, open, close} windows, see Linux: Add Keyboard Shortcuts to Switch App (wmctrl Tutorial) ⌨

For sending key combinations such as 【Ctrl+c】, 【Ctrl+w】, 【Alt+Tab ↹】, use xvkbd. See: Linux: Set F2 F3 F4 to Cut Copy Paste ⌨

Mac

Apple iMac Keyboard A1243-numpad
Numpad on Apple Keyboard. Apple keyboard image source

For Mac, by default, it's impossible to make the number pad do anything other than inputting numbers, because Mac does remapping at some low level.

You need tool to set keys on numberpad, see: Mac OS X Keyboard Layout, Keymapping, Keybinding, Tools.

Emacs

If you use emacs, you are in luck! Because emacs has the most robust and extensive ways to make keys do what you want. And you can use it across {Microsoft Windows, Mac, Linux}.

See: Emacs: Using Number Pad Keys

Cheap Numerical Keypad

If your keyboard doesn't have number pad, you can buy them, cheap.

g-cord wireless numeric keypad
g-cord wireless numeric keypad. (seems to be mechanical keys) amazon
perixx peripad number keypad 67024
perixx peripad number keypad amazon

Programable Keypads

Alternatively, you can get keypad that are programable by itself. see: List of Programable Keypads.