Come aggiungere tasti di scelta rapida per alternare F1, F2, ecc. come tasti funzione standard?

4

Ho visto un AppleScript su Github per automatizzare l'attivazione di F1, F2, ecc. come tasti funzione standard, ma non so come installarlo sul mio sistema e attivarlo tramite una scorciatoia da tastiera. Aiuto?

Sto utilizzando OS X Yosemite 10.10.1. Ecco lo script: link

    
posta Matthew Quiros 22.11.2014 - 16:24
fonte

2 risposte

5

Per assegnare una scorciatoia da tastiera a questo script, è possibile creare un servizio in Automator.

DevicambiareServicereceivesinnoinput.QuindiaggiungiExecuteAppleScripteincollaloscript.Salvalosu~/Library/Services.

Una volta salvato, devi andare a System Preferences → Keyboard → Shortcuts e puoi scoprirlo sotto Services → General . Assegna qui la tua scorciatoia preferita.

    
risposta data 22.11.2014 - 18:13
fonte
5

Utilizzando Karabiner , puoi salvare questo file come ~/Library/Application Support/Karabiner/private.xml :

<?xml version="1.0"?>
<root>
  <item>
    <name>fn+escape to toggle f-keys</name>
    <identifier>fnesc</identifier>
    <autogen>__KeyToKey__ KeyCode::ESCAPE, ModifierFlag::FN | ModifierFlag::NONE, KeyCode::VK_CONFIG_TOGGLE_fkeys</autogen>
  </item>
  <item>
    <name>fkeys</name>
    <identifier vk_config="true">fkeys</identifier>
    <autogen>__KeyToKey__ ConsumerKeyCode::BRIGHTNESS_DOWN, KeyCode::F1</autogen>
    <autogen>__KeyToKey__ ConsumerKeyCode::BRIGHTNESS_UP, KeyCode::F2</autogen>
    <autogen>__KeyToKey__ KeyCode::EXPOSE_ALL, KeyCode::F3</autogen>
    <autogen>__KeyToKey__ KeyCode::LAUNCHPAD, KeyCode::F4</autogen>
    <autogen>__KeyToKey__ ConsumerKeyCode::KEYBOARDLIGHT_LOW, KeyCode::F5</autogen>
    <autogen>__KeyToKey__ ConsumerKeyCode::KEYBOARDLIGHT_HIGH, KeyCode::F6</autogen>
    <autogen>__KeyToKey__ ConsumerKeyCode::MUSIC_PREV, KeyCode::F7</autogen>
    <autogen>__KeyToKey__ ConsumerKeyCode::MUSIC_PLAY, KeyCode::F8</autogen>
    <autogen>__KeyToKey__ ConsumerKeyCode::MUSIC_NEXT, KeyCode::F9</autogen>
    <autogen>__KeyToKey__ ConsumerKeyCode::VOLUME_MUTE, KeyCode::F10</autogen>
    <autogen>__KeyToKey__ ConsumerKeyCode::VOLUME_DOWN, KeyCode::F11</autogen>
    <autogen>__KeyToKey__ ConsumerKeyCode::VOLUME_UP, KeyCode::F12</autogen>
    <autogen>__KeyToKey__ KeyCode::F1, ConsumerKeyCode::BRIGHTNESS_DOWN</autogen>
    <autogen>__KeyToKey__ KeyCode::F2, ConsumerKeyCode::BRIGHTNESS_UP</autogen>
    <autogen>__KeyToKey__ KeyCode::F3, KeyCode::EXPOSE_ALL</autogen>
    <autogen>__KeyToKey__ KeyCode::F4, KeyCode::LAUNCHPAD</autogen>
    <autogen>__KeyToKey__ KeyCode::F5, ConsumerKeyCode::KEYBOARDLIGHT_LOW</autogen>
    <autogen>__KeyToKey__ KeyCode::F6, ConsumerKeyCode::KEYBOARDLIGHT_HIGH</autogen>
    <autogen>__KeyToKey__ KeyCode::F7, ConsumerKeyCode::MUSIC_PREV</autogen>
    <autogen>__KeyToKey__ KeyCode::F8, ConsumerKeyCode::MUSIC_PLAY</autogen>
    <autogen>__KeyToKey__ KeyCode::F9, ConsumerKeyCode::MUSIC_NEXT</autogen>
    <autogen>__KeyToKey__ KeyCode::F10, ConsumerKeyCode::VOLUME_MUTE</autogen>
    <autogen>__KeyToKey__ KeyCode::F11, ConsumerKeyCode::VOLUME_DOWN</autogen>
    <autogen>__KeyToKey__ KeyCode::F12, ConsumerKeyCode::VOLUME_UP</autogen>
  </item>
</root>

Quindi apri l'applicazione Karabiner, premi il pulsante ReloadXML e attiva l'impostazione.

    
risposta data 23.11.2014 - 13:32
fonte

Leggi altre domande sui tag