Outra forma de remapear home e end é salvar uma lista de propriedades como ~ / Library / KeyBindings / DefaultKeyBinding.dict:
{
"\UF729" = moveToBeginningOfLine:;
"\UF72B" = moveToEndOfLine:;
"$\UF729" = moveToBeginningOfLineAndModifySelection:;
"$\UF72B" = moveToEndOfLineAndModifySelection:;
}
Não funciona em tantos lugares como o KeyRemap4MacBook, mas também há menos falsos positivos.
Se você usar uma das configurações predefinidas no KeyRemap4MacBook, poderá personalizá-la copiando-a de link para private.xml :
<?xml version="1.0"?>
<root>
<item>
<name>Use PC Style Home/End (except in Virtual Machine,RDC)</name>
<appendix>(Change Home to Command+Left)</appendix>
<appendix>(Change End to Command+Right)</appendix>
<appendix>(+ Change Home to Control+A in Emacs,Terminal,X11,Eclipse)</appendix>
<appendix>(+ Change End to Control+E in Emacs,Terminal,X11,Eclipse)</appendix>
<identifier>remap.pclikehomeend</identifier>
<block>
<only>DREAMWEAVER</only>
<autogen>__KeyToKey__ FROMKEYCODE_HOME, KeyCode::HOME, ModifierFlag::SHIFT_L</autogen>
<autogen>__KeyToKey__ FROMKEYCODE_END, KeyCode::END, ModifierFlag::SHIFT_L</autogen>
</block>
<block>
<only>BLUEFISH,WORD,EXCEL,POWERPOINT</only>
<autogen>__KeyToKey__ FROMKEYCODE_HOME, KeyCode::HOME</autogen>
<autogen>__KeyToKey__ FROMKEYCODE_END, KeyCode::END</autogen>
</block>
<block>
<not>EMACS, TERMINAL, VIRTUALMACHINE, REMOTEDESKTOPCONNECTION, X11, ECLIPSE</not>
<autogen>__KeyToKey__ FROMKEYCODE_HOME, VK_COMMAND, KeyCode::CURSOR_UP, ModifierFlag::COMMAND_L</autogen>
<autogen>__KeyToKey__ FROMKEYCODE_HOME, VK_CONTROL, KeyCode::CURSOR_UP, ModifierFlag::COMMAND_L</autogen>
<autogen>__KeyToKey__ FROMKEYCODE_END, VK_COMMAND, KeyCode::CURSOR_DOWN, ModifierFlag::COMMAND_L</autogen>
<autogen>__KeyToKey__ FROMKEYCODE_END, VK_CONTROL, KeyCode::CURSOR_DOWN, ModifierFlag::COMMAND_L</autogen>
<autogen>__KeyToKey__ FROMKEYCODE_HOME, KeyCode::CURSOR_LEFT, ModifierFlag::COMMAND_L</autogen>
<autogen>__KeyToKey__ FROMKEYCODE_END, KeyCode::CURSOR_RIGHT, ModifierFlag::COMMAND_L</autogen>
</block>
<block>
<only>EMACS, TERMINAL, X11, ECLIPSE</only>
<autogen>__KeyToKey__ FROMKEYCODE_HOME, KeyCode::A, ModifierFlag::CONTROL_L</autogen>
<autogen>__KeyToKey__ FROMKEYCODE_END, KeyCode::E, ModifierFlag::CONTROL_L</autogen>
</block>
</item>
</root>
Você pode usar um elemento appdef para especificar um novo aplicativo:
<appdef>
<appname>TEXTMATE</appname>
<equal>com.macromates.TextMate.preview</equal>
<equal>com.macromates.TextMate</equal>
</appdef>