1

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
1

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"?>
<root>
    <item>
        <name>Toggle Numbers/Arrows</name>
        <identifier>private.toggle_numbers_arrows</identifier>
        <autogen>
            __KeyToKey__ KeyCode::KEYPAD_CLEAR, 
            KeyCode::VK_CONFIG_TOGGLE_remap_keypadnumlock, 
            KeyCode::VK_IOHIKEYBOARD_TOGGLE_NUMLOCK,
            KeyCode::VK_IOHIKEYBOARD_TOGGLE_NUMLOCK,
            KeyCode::VK_IOHIKEYBOARD_TOGGLE_NUMLOCK
        </autogen>
    </item>
</root>

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!

3

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
3

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

2

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.

It should be possible to create a complex mapping for K-E.

  • 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

You must log in to answer this question.

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