Created
July 12, 2026 14:45
-
-
Save tomkinsc/d2a23232482ab89b31e31abd359a9029 to your computer and use it in GitHub Desktop.
This script instructs macOS to remap space characters from a given HID device VendorID and ProductID to a null character, thus ignoring space input. Intended to exclude space characters coming from non-keyboard HID devices that may insert them for some reason, such as the "iP54 OriginCal Absolute Digital Calipers with Smart Wireless Data Output,…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # This instructs macOS to remap space characters from a given HID device VendorID and ProductID to a null character, thus ignoring space input. | |
| # | |
| # Intended to exclude space characters coming from non-keyboard HID devices that may insert them for some reason, | |
| # such as the "iP54 OriginCal Absolute Digital Calipers with Smart Wireless Data Output." | |
| # Change these values as needed to suit a particular HID device. | |
| # Relevant values can be found via `system_profiler SPBluetoothDataType` | |
| # The values below are for the "iP54 OriginCal Absolute Digital Calipers with Smart Wireless Data Output" | |
| VENDOR_ID="0x1345" | |
| PRODUCT_ID="0x022C" | |
| sudo hidutil property \ | |
| --matching '{"VendorID":'$VENDOR_ID', "ProductID":'$PRODUCT_ID'}' \ | |
| --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x70000002C, "HIDKeyboardModifierMappingDst":0x700000000}]}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment