Создайте службу Automator, которая запускает такой скрипт:
if output muted of (get volume settings) then
set volume without output muted
else
set volume with output muted
end if
Это не показывает никакой обратной связи, хотя. Перед запуском сервисов Automator происходит небольшая задержка. Также есть ошибки в 10.7 и 10.8, когда ярлыки для служб Automator не всегда работают, пока меню служб не отображается в строке меню.
Если кому-то еще нет дела до использования дополнительных приложений, попробуйте FunctionFlip:
или KeyRemap4MacBook:
Вы можете изменить отдельные ключи, добавив такие записи в private.xml:
<autogen>--KeyToKey-- KeyCode::F1, KeyCode::BRIGHTNESS_DOWN</autogen>
<autogen>--KeyToKey-- KeyCode::F2, KeyCode::BRIGHTNESS_UP</autogen>
<autogen>--KeyToKey-- KeyCode::F3, KeyCode::MISSION_CONTROL</autogen>
<autogen>--KeyToKey-- KeyCode::F4, KeyCode::LAUNCHPAD</autogen>
<autogen>--KeyToConsumer-- KeyCode::F5, ConsumerKeyCode::KEYBOARDLIGHT_LOW</autogen>
<autogen>--KeyToConsumer-- KeyCode::F6, ConsumerKeyCode::KEYBOARDLIGHT_HIGH</autogen>
<autogen>--KeyToConsumer-- KeyCode::F7, ConsumerKeyCode::MUSIC_PREV</autogen>
<autogen>--KeyToConsumer-- KeyCode::F8, ConsumerKeyCode::MUSIC_PLAY</autogen>
<autogen>--KeyToConsumer-- KeyCode::F9, ConsumerKeyCode::MUSIC_NEXT</autogen>
<autogen>--KeyToConsumer-- KeyCode::F10, ConsumerKeyCode::VOLUME_MUTE</autogen>
<autogen>--KeyToConsumer-- KeyCode::F11, ConsumerKeyCode::VOLUME_DOWN</autogen>
<autogen>--KeyToConsumer-- KeyCode::F12, ConsumerKeyCode::VOLUME_UP</autogen>
<autogen>--KeyToKey-- KeyCode::BRIGHTNESS_DOWN, ModifierFlag::FN, KeyCode::F1</autogen>
<autogen>--KeyToKey-- KeyCode::BRIGHTNESS_UP, ModifierFlag::FN, KeyCode::F2</autogen>
<autogen>--KeyToKey-- KeyCode::EXPOSE_ALL, ModifierFlag::FN, KeyCode::F3</autogen>
<autogen>--KeyToKey-- KeyCode::LAUNCHPAD, ModifierFlag::FN, KeyCode::F4</autogen>
<autogen>--KeyToKey-- KeyCode::VK_CONSUMERKEY_KEYBOARDLIGHT_LOW, ModifierFlag::FN, KeyCode::F5</autogen>
<autogen>--KeyToKey-- KeyCode::VK_CONSUMERKEY_KEYBOARDLIGHT_HIGH, ModifierFlag::FN, KeyCode::F6</autogen>
<autogen>--KeyToKey-- KeyCode::VK_CONSUMERKEY_MUSIC_PREV, ModifierFlag::FN, KeyCode::F7</autogen>
<autogen>--KeyToKey-- KeyCode::VK_CONSUMERKEY_MUSIC_PLAY, ModifierFlag::FN, KeyCode::F8</autogen>
<autogen>--KeyToKey-- KeyCode::VK_CONSUMERKEY_MUSIC_NEXT, ModifierFlag::FN, KeyCode::F9</autogen>
<autogen>--KeyToKey-- KeyCode::VK_CONSUMERKEY_VOLUME_MUTE, ModifierFlag::FN, KeyCode::F10</autogen>
<autogen>--KeyToKey-- KeyCode::VK_CONSUMERKEY_VOLUME_DOWN, ModifierFlag::FN, KeyCode::F11</autogen>
<autogen>--KeyToKey-- KeyCode::VK_CONSUMERKEY_VOLUME_UP, ModifierFlag::FN, KeyCode::F12</autogen>