Is there a keyboard shortcut for toggling between Function and classic F keys?


Depending on what you're trying to do, you may be able to cut out the keyboard shortcuts altogether and completely automate this. KeyRemap4MacBook allows you to set key re-mappings based on what application you're currently using.

I am using a setting that switches F1 through F12 to standard Function keys whenever I'm using RDC (Windows Remote Desktop). Any other time they operate like their icons (brightness, volume, play, etc).

| improve this answer | |
  • 1
    This was just want I was looking for. – GreenKiwi Sep 7 '11 at 16:29
  • how can you make these settings application depending? I can enable it only global. – Pfitz Dec 5 '12 at 10:45
  • Doesn't work on Sierra – David Jan 8 '17 at 18:41
  • Note, KeyRemap4MacBook is called Karabiner for Maverics (MacOS X 10.9) and the following, and Karabiner Elements from El Captain (macOS 10.11) on. All of them can be downloaded from the Karabiner Download page. – luckydonald Jul 12 '18 at 9:49

There is now an app for this: https://github.com/Pyroh/Fluor

It lets you specify the fn key behaviour depending on a rules engine, and also switches between one behaviour and the other when you press the fn key.

| improve this answer | |
  • This is perfect 👍 – spjpgrd Jan 30 '19 at 18:27

You can create application specific shortcuts by creating a custom setting in your private.xml file. Check out the reference documentation for details, or my example below where I'm rebinding the Consumer keys back to Function keys when in PhpStorm (to use the debugger).

<?xml version="1.0"?>
    <!-- PhpStorm & EAP Version -->
    <!-- ============================================================ -->
        <name>Switch to normal function keys when in PhpStorm</name>
        <appendix>Change consumer keys to function keys in PhpStorm</appendix>
        <autogen>__KeyToKey__ KeyCode::BRIGHTNESS_DOWN, KeyCode::F1</autogen>
        <autogen>__KeyToKey__ KeyCode::BRIGHTNESS_UP, KeyCode::F2</autogen>
        <autogen>__KeyToKey__ KeyCode::EXPOSE_ALL, KeyCode::F3</autogen>
        <autogen>__KeyToKey__ KeyCode::LAUNCHPAD, KeyCode::F4</autogen>
        <autogen>__KeyToKey__ KeyCode::VK_CONSUMERKEY_KEYBOARDLIGHT_LOW, KeyCode::F5</autogen>
        <autogen>__KeyToKey__ KeyCode::VK_CONSUMERKEY_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>
    <!-- I want to use these while in PhpStorm
        <autogen>__KeyToKey__ ConsumerKeyCode::VOLUME_MUTE, KeyCode::F10</autogen>
        <autogen>__KeyToKey__ ConsumerKeyCode::VOLUME_DOWN, KeyCode::F11</autogen>
        <autogen>__KeyToKey__ ConsumerKeyCode::VOLUME_UP, KeyCode::F12</autogen>
| improve this answer | |
  • Super awesome, very helpful, thanks! I did have to make a few changes on my system: F1 is ConsumerKeyCode::BRIGHTNESS_DOWN, F2 is ConsumerKeyCode::BRIGHTNESS_UP, F5 is ConsumerKeyCode::KEYBOARDLIGHT_LOW, and F6 is ConsumerKeyCode::KEYBOARDLIGHT_HIGH. All discovered using Karabiner's event viewer. – jbyler Feb 24 '16 at 10:04
  • This is just great! – roNn23 Nov 3 '16 at 9:57

There might be an easier way, but the following comes to mind:

  • Turn on Universal Access.
  • Create an AppleScript or Automator App that toggles this via the UI.
  • Bind that app to a key combo.
| improve this answer | |

I believe you can use the FN key in combination with your desired F1 through F12 keys, to use the standard F key functionality.

| improve this answer | |

just download FNSwitch, it does exactly that. http://www.techmasterdesign.com/fnswitch/

| improve this answer | |
  • Can you extend the answer to explain how this application can be used to solve the problem described in the question? – nohillside May 21 at 20:02
  • It's already been noted about your affiliation to the software in other questions, but I advise caution when posting the exact same answer on multiple questions without some context of how this addresses the OP's issue. This could be considered spamming. – Allan May 21 at 20:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .