MacOS – Key re-mapping or how get HEX for button

keyboardmacos

i have new macbook air 13". There is "><" button under Esc. I want to rebind this button to semicolon ";". How? Or please tell me, how can I find Hex for this button, than I can change it by my self in defaultkeybinding.dict 🙂 Thanks

Best Answer

DefaultKeyBinding.dict wouldn't work in a lot of applications, and "<" = (insertText:, ";"); wouldn't change ⌘< to ⌘;.

You could try using KeyRemap4MacBook and saving this as private.xml:

<?xml version="1.0"?>
<root>
<item>
<name>test</name>
<identifier>private.test</identifier>
<autogen>--KeyToKey-- KeyCode::BACKQUOTE, KeyCode::COMMA, ModifierFlag::SHIFT_L</autogen>
</item>
</root>

KeyCode::BACKQUOTE is the same key code as < on ISO keyboards.

The test folder has an XML file with all the predefined remappings.

Another option would be to create a keylayout file with Ukelele.