I have a Genius USB "partial" keyboard - a numpad like this one.

It types digits and +-/*, but doesn't switch to cursor mode with NumLock off, and Home/End/PgUp/PgDn keys were the reason I purchased it.

How do I make Home/End/other cursor keys work?

  • Sometimes USB keyboards don't work if Mouse Keys in Mouse Settings is on. Mine is off.
  • Sometimes hitting Clear key on the keyboard helps. I don't have it.
  • Ukelele doesn't have the numpad keys to edit.
  • Karabiner (ex KeyRemap4MacBook) doesn't have a ready feature for this.

The solution according to this answer seems to be Karabiner. Though, it looks pretty advanced and I didn't find it in half an hour.

  • Mac doesn't have a Numlock at all, not even on an extended keyboard, so it's unlikely it can recognise when you're hitting it. You could try Key Codes & see what key is being recognised – Tetsujin Dec 18 '15 at 11:28
  • Thanks, will try that. I'd be happy if the keypad worked purely as cursor keys. – Victor Sergienko Dec 18 '15 at 11:29

Here's what I put in my private.xml file (using Karabiner.app), and it allows the following functionality:

Use a generic external numerical keypad with Mac OS X, and Num Lock on/off toggles number vs arrow/Home/End/PgUp/PgDn functionality. Num Lock light turns on/off as appropriate as well :-)

<?xml version="1.0"?>
        <name>Toggle Numbers/Arrows</name>
            __KeyToKey__ KeyCode::KEYPAD_CLEAR, 

As you can see, I needed to include the "...TOGGLE_NUMLOCK" three times to get the Num Lock LED status to appropriately indicate the state (otherwise it was backwards, whereas it would be lit for arrow functions and dark for numbers). Maybe there's a simple way to fix it, but the hack works perfectly for me. Hopefully someone else finds this useful!


OS X does not understand 'Num lock'. There's no on-off state for Num lock in OS X and as such can be thought to be always on.

The Num lock button itself on a Windows keyboard is interpreted as Clear in OS X. You are able to bind this to actions in Keyboard Maestro, but a 'state switch' would essentially require saving a variable in Keyboard Maestro to be checked when a button is pressed, then intercepting the action and providing its own key press.

  • The device driver portions of macOS definitely do understand num lock - kHIDUsage_LED_NumLock is defined and works. github.com/damieng/setledsmac would not be able to set/unset/toggle the numlock key if it didn't. – DamienG Jul 18 '18 at 2:00

I had a similar issue and made my complex_modifications for Karabiner Elements available in a pull request here: https://github.com/pqrs-org/KE-complex_modifications/pull/509


After a better look, I found it in Karabiner: "For PC users" - "Use KeyPad as Arrow" - "Enable KeyPad as Arrow".

I'll leave the question here, it might be useful for someone else.

Update: Karabiner-Elements, which is the only Karabiner for Sierra+, is a new product. In Karabiner-Elements, I just added a mapping from every numpad key to its function, for external keyboard.

  • Where can I find this option? I'm unable to find "For PC users" in the 12.1.0 version. – Sanjiv Jivan Dec 27 '18 at 19:33
  • Karabiner-Elements is a new product. There, I had to remap all the numpad keys to their functions. Let me check if there is a ready "Complex modification" rule in their repository. – Victor Sergienko Dec 27 '18 at 23:38

Following the idea explained in How do I remap a key in macOS Sierra, e.g., Right Alt to Right Control?, I enable the numlock cursor keys using the following script:

# Uses the keyboard usage IDs documented in https://developer.apple.com/library/archive/technotes/tn2450/_index.html.
# The lines below, respectively, map:
#   Keypad 2 and Down Arrow -> Keyboard Down Arrow
#   Keypad 4 and Left Arrow -> Keyboard Left Arrow
#   Keypad 6 and Right Arrow -> Keyboard Right Arrow
#   Keypad 8 and Up Arrow -> Keyboard Up Arrow
#   Keypad 1 and End -> Keyboard End
#   Keypad 3 and Page Down -> Keyboard Page Down
#   Keypad 7 and Home -> Keyboard Home
#   Keypad 9 and Page Up -> Keyboard Page Up

hidutil property --set '{"UserKeyMapping": [

  • Nice! Now how to make this toggle back and forth to number keys using a key on the keyboard (from what I've read elsewhere it sounded like the 'clear' key was supposed to do this)? – pbouf77 Feb 6 at 1:44

See the excellent answer from @icanhasjonas:


Can confirm it works on macOS Big Sur 11.2.2, with the separate number pad of a Microsoft Sculpt Keyboard For Business (5KV-00001). Can enable in Karabiner-Elements right away using the "Import" button of the first search result in the official repository of rules: Keypad as Arrows (windows style) https://ke-complex-modifications.pqrs.org/?q=Keypad%20as%20Arrows%20(windows%20style)%20enable%20num%20lock%20toggle%20numumpad%20keys

(I don't have the reputation to comment on the original answer so I'm adding an answer of my own.)

New contributor
Arbo is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .