Skip to content

Instantly share code, notes, and snippets.

@4np
Created July 12, 2016 21:15
Show Gist options
  • Save 4np/97894516508e5f96e9a5054b2b2d93fb to your computer and use it in GitHub Desktop.
Save 4np/97894516508e5f96e9a5054b2b2d93fb to your computer and use it in GitHub Desktop.
Karabiner configuration for fixing NumLock behaviour in macOS
<?xml version="1.0"?>
<root>
<!--
private.xml for Karabiner
download at https://pqrs.org/osx/karabiner
//-->
<devicevendordef>
<vendorname>BELKIN</vendorname>
<vendorid>0x05a4</vendorid>
</devicevendordef>
<!--
This item will map the numlock key of a Belkin USB
numpad to the native NumLock function in OS X. It
will make sure that key presses on the numpad register
as expected (for example in Team Fortress 2)
//-->
<item>
<name>Map Belkin NumPad NumLock key to OSX NumLock function</name>
<identifier>private.belkin_numpad_numlock_to_mac_numlock</identifier>
<device_only>
DeviceVendor::BELKIN,
DeviceProduct::ANY
</device_only>
<autogen>__KeyToKey__ KeyCode::KEYPAD_CLEAR, KeyCode::VK_IOHIKEYBOARD_TOGGLE_NUMLOCK</autogen>
</item>
<!--
The same as the one above, but now generic for any
numlock key presses (and hence not bound to belkin
only numpads).
//-->
<item>
<name>Map Any NumLock key to OSX NumLock function</name>
<identifier>private.pc_numlock_to_mac_numlock</identifier>
<autogen>__KeyToKey__ KeyCode::KEYPAD_CLEAR, KeyCode::VK_IOHIKEYBOARD_TOGGLE_NUMLOCK</autogen>
</item>
</root>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment