Skip to main content
PR accepted, Added link to the live version of the script
Source Link
ptim
  • 1.1k
  • 2
  • 12
  • 26

I have the opposite problem.. was lacking a stock option to disable this shortcut!

I've remapped Cmd,F1 to display_brightness_decrement using Karabiner Elements - no need to interfere with other shortcuts!

I've got a PR open to add this to the available downloadable rules, and will update this answer when it's merged.You can install the key mapping from here: disable_cmd_f1_screen_mirroring by following instructions here: configuration-complex-modifications.

In the meantimeAlternatively, to achieve this manually: you can place the following file in ~/.config/karabiner/assets/complex_modifications/disable_cmd_f1_screen_mirroring.json then activate it via Karabiner Elements:

  • Navigate to Karabiner Elements > Preferences > Complex Modifications > Rules
  • Add Rule
  • Enable your new rule
{
    "title": "Disable Cmd+F1 Toggle Screen Mirroring",
    "rules": [
        {
            "description": "Disable Cmd+F1 Toggle Screen Mirroring Shortcut (map to display_brightness_decrement), see https://discussions.apple.com/thread/2793101",
            "manipulators": [
                {
                    "type": "basic",
                    "description": "",
                    "from": {
                        "key_code": "f1",
                        "modifiers": {
                            "mandatory": [
                                "command"
                            ]
                        }
                    },
                    "to": [
                        {
                            "key_code": "display_brightness_decrement"
                        }
                    ]
                }
            ]
        }
    ]
}

add rule to Karabiner

I have the opposite problem.. was lacking a stock option to disable this shortcut!

I've remapped Cmd,F1 to display_brightness_decrement using Karabiner Elements - no need to interfere with other shortcuts!

I've got a PR open to add this to the available downloadable rules, and will update this answer when it's merged.

In the meantime, you can place the following file in ~/.config/karabiner/assets/complex_modifications/disable_cmd_f1_screen_mirroring.json then activate it via Karabiner Elements:

  • Navigate to Karabiner Elements > Preferences > Complex Modifications > Rules
  • Add Rule
  • Enable your new rule
{
    "title": "Disable Cmd+F1 Toggle Screen Mirroring",
    "rules": [
        {
            "description": "Disable Cmd+F1 Toggle Screen Mirroring Shortcut (map to display_brightness_decrement), see https://discussions.apple.com/thread/2793101",
            "manipulators": [
                {
                    "type": "basic",
                    "description": "",
                    "from": {
                        "key_code": "f1",
                        "modifiers": {
                            "mandatory": [
                                "command"
                            ]
                        }
                    },
                    "to": [
                        {
                            "key_code": "display_brightness_decrement"
                        }
                    ]
                }
            ]
        }
    ]
}

add rule to Karabiner

I have the opposite problem.. was lacking a stock option to disable this shortcut!

I've remapped Cmd,F1 to display_brightness_decrement using Karabiner Elements - no need to interfere with other shortcuts!

You can install the key mapping from here: disable_cmd_f1_screen_mirroring by following instructions here: configuration-complex-modifications.

Alternatively, to achieve this manually: you can place the following file in ~/.config/karabiner/assets/complex_modifications/disable_cmd_f1_screen_mirroring.json then activate it via Karabiner Elements:

  • Navigate to Karabiner Elements > Preferences > Complex Modifications > Rules
  • Add Rule
  • Enable your new rule
{
    "title": "Disable Cmd+F1 Toggle Screen Mirroring",
    "rules": [
        {
            "description": "Disable Cmd+F1 Toggle Screen Mirroring Shortcut (map to display_brightness_decrement), see https://discussions.apple.com/thread/2793101",
            "manipulators": [
                {
                    "type": "basic",
                    "description": "",
                    "from": {
                        "key_code": "f1",
                        "modifiers": {
                            "mandatory": [
                                "command"
                            ]
                        }
                    },
                    "to": [
                        {
                            "key_code": "display_brightness_decrement"
                        }
                    ]
                }
            ]
        }
    ]
}

add rule to Karabiner

Source Link
ptim
  • 1.1k
  • 2
  • 12
  • 26

I have the opposite problem.. was lacking a stock option to disable this shortcut!

I've remapped Cmd,F1 to display_brightness_decrement using Karabiner Elements - no need to interfere with other shortcuts!

I've got a PR open to add this to the available downloadable rules, and will update this answer when it's merged.

In the meantime, you can place the following file in ~/.config/karabiner/assets/complex_modifications/disable_cmd_f1_screen_mirroring.json then activate it via Karabiner Elements:

  • Navigate to Karabiner Elements > Preferences > Complex Modifications > Rules
  • Add Rule
  • Enable your new rule
{
    "title": "Disable Cmd+F1 Toggle Screen Mirroring",
    "rules": [
        {
            "description": "Disable Cmd+F1 Toggle Screen Mirroring Shortcut (map to display_brightness_decrement), see https://discussions.apple.com/thread/2793101",
            "manipulators": [
                {
                    "type": "basic",
                    "description": "",
                    "from": {
                        "key_code": "f1",
                        "modifiers": {
                            "mandatory": [
                                "command"
                            ]
                        }
                    },
                    "to": [
                        {
                            "key_code": "display_brightness_decrement"
                        }
                    ]
                }
            ]
        }
    ]
}

add rule to Karabiner