Skip to content

Instantly share code, notes, and snippets.

@mgdm
Last active August 5, 2024 13:35
Show Gist options
  • Save mgdm/dc94df9b407f38af4c819f9a4e5cd956 to your computer and use it in GitHub Desktop.
Save mgdm/dc94df9b407f38af4c819f9a4e5cd956 to your computer and use it in GitHub Desktop.
Custom modification for Karabiner to disable the cmd-m minimise shortcut
{
"title": "Prevent unintended command-m minimising",
"rules": [
{
"description": "Disable Cmd+m minimise",
"manipulators": [
{
"type": "basic",
"description": "",
"from": {
"key_code": "m",
"modifiers": {
"mandatory": [
"command"
]
}
}
}
]
}
]
}
@olejech
Copy link

olejech commented Jan 8, 2024

Here is new format of Karabiner shorcut:

{
    "description": "Prevent command-m minimize window",
    "manipulators": [
        {
            "from": {
                "key_code": "m",
                "modifiers": {
                    "mandatory": [
                        "command"
                    ]
                } 
            },
            "type": "basic"
        }
    ]
}

@Damian-LW
Copy link

BIG THANKS!

@ya-nsh
Copy link

ya-nsh commented Jun 20, 2024

THANK YOU !!

@notiv-nt
Copy link

notiv-nt commented Jul 1, 2024

The same, but only for certain apps

{
  "description": "disable cmd+m",
  "manipulators": [
    {
      "type": "basic",
      "from": { "key_code": "m", "modifiers": { "mandatory": ["command"] } },
      "conditions": [
        {
          "type": "frontmost_application_if",
          "bundle_identifiers": [
            "^com\\.apple\\.Terminal$",
            "^com\\.googlecode\\.iterm2$",
            "^co\\.zeit\\.hyperterm$",
            "^co\\.zeit\\.hyper$",
            "^com\\.google\\.Chrome\\.canary$",
            "^com\\.google\\.Chrome\\.dev$",
            "^com\\.google\\.Chrome$",
            "^com\\.microsoft\\.VSCode$"
          ]
        }
      ]
    }
  ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment