Obrigado a muitos exemplos de arquivos de configuração Karabiner (anteriormente conhecido como KeyRemap4MacBook
), consegui criar o seguinte e adicioná-lo ao meu private.xml
arquivo para obter o comportamento desejado, tanto em um teclado externo quanto no teclado integrado em um MacBook:
<root>
<item>
<name>F5 to Show Desktop (Fn+F5 is still F5)</name>
<appendix>Enables F5 (Shift+F5 on laptops) as a Show Desktop shortcut</appendix>
<identifier>private.f5_to_show_desktop</identifier>
<autogen>--KeyToKey-- KeyCode::F5, ModifierFlag::FN, KeyCode::F5</autogen>
<autogen>--KeyToKey-- ConsumerKeyCode::KEYBOARDLIGHT_LOW, ModifierFlag::FN, KeyCode::F5</autogen>
<autogen>--KeyToKey-- KeyCode::F5, KeyCode::MISSION_CONTROL, ModifierFlag::COMMAND_L, Option::NOREPEAT</autogen>
<autogen>--KeyToKey-- ConsumerKeyCode::KEYBOARDLIGHT_LOW, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_SHIFT, KeyCode::MISSION_CONTROL, ModifierFlag::COMMAND_L, Option::NOREPEAT</autogen>
</item>
<item>
<name>F6 to Show Dashboard (Fn+F6 is still F6)</name>
<appendix>Enables F6 (Shift+F6 on laptops) as a Show Dashboard shortcut</appendix>
<identifier>private.f6_to_show_dashboard</identifier>
<autogen>--KeyToKey-- KeyCode::F6, ModifierFlag::FN, KeyCode::F6</autogen>
<autogen>--KeyToKey-- ConsumerKeyCode::KEYBOARDLIGHT_HIGH, ModifierFlag::FN, KeyCode::F6</autogen>
<autogen>--KeyToKey-- KeyCode::F6, KeyCode::DASHBOARD, Option::NOREPEAT</autogen>
<autogen>--KeyToKey-- ConsumerKeyCode::KEYBOARDLIGHT_HIGH, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_SHIFT, KeyCode::DASHBOARD, Option::NOREPEAT</autogen>
</item>
</root>
Observe que o arquivo private.xml
está acessível rapidamente na guia "Misc & Desinstalar" da janela do Karabiner, e há um botão ReloadXML
na guia "Alterar chave".