Background My macbook keyboard got some problem, the up arrow sometime cannot function properly, i found that the right shift button is not usually used and it is just right above the up arrive, so i decided to remap the apple keypad from right shift to up arrow. Conclusion You may find the detail explanation here with the key code table for the HEX number assignment: https://developer.apple.com/library/archive/technotes/tn2450/_index.html Command hidutil property --set '{"UserKeyMapping": [{"HIDKeyboardModifierMappingSrc":0x7000000e5, "HIDKeyboardModifierMappingDst":0x700000052}] }' Reference https://apple.stackexchange.com/questions/283252/how-do-i-remap-a-key-in-macos-sierra-e-g-right-alt-to-right-control