pqrs-org / Karabiner-Elements

Karabiner-Elements is a powerful utility for keyboard customization on macOS Sierra (10.12) or later.
https://pqrs.org/osx/karabiner/
The Unlicense
18.56k stars 834 forks source link

Add Ctrl-click to Command-click mapping to default list #3887

Open elcreator opened 1 month ago

elcreator commented 1 month ago

It's useful for developers using both Windows and MacOS with the same keyboard. Ctrl-click is common "Go to definition" shortcut but in MacOS it also opens a context menu as MacOS treats it as secondary click. To avoid this I use the next basic modifier:

{
    "description": "ctrl+left click to command+left click",
    "manipulators": [
        {
            "from": {
                "modifiers": {
                    "mandatory": [
                        "control"
                    ]
                },
                "pointing_button": "button1"
            },
            "to": [
                {
                    "modifiers": [
                        "command"
                    ],
                    "pointing_button": "button1"
                }
            ],
            "type": "basic"
        }
    ]
}

and default IDE behaviour which recognises Command-Click.

raxigan commented 4 weeks ago

I assume this would work only on a non-Apple mouse (so not magic mouse and touchpad), since KE does not support Apple pointing devices.

elcreator commented 4 weeks ago

I use it with KVM switching my non-Apple mouse and keyboard between Windows and MacOS on KE installed on MacOS.