14

I'm used to navigating through my code using Ctrl+Click. In OS X this function still works in my IDE, but it opens a context menu as well, which is very annoying!

I've done lots of Googling and didn't manage to find any answers that would let me disable Ctrl+Click system-wide in OS X 10.6.7. All the answers that I was able to find refer to Fusion and VMware.

I have a proper mouse with two buttons, I never used Ctrl+Click and cannot see the use case for it. Could someone please tell me how to disable it?

  • 2
    I don't think you can disable Control-Clicks. Can you maybe configure your editor/code browser to use Command-Clicks? – nohillside Jun 10 '12 at 13:49
  • 3
    Yes, I could, but I don't want to. I think there should be a way to do it (sudo edit some prefs or something). – Artur Jun 10 '12 at 13:55
  • You can remap the Ctrl key but this is system-wide then. – nohillside Jun 10 '12 at 14:05
  • 2
    Again a possibility, but I'd rather have the Ctrl key behave as a Ctrl key. I cannot believe disabling this "feature" is so difficult! – Artur Jun 10 '12 at 14:11
5

You can map control+click to command+click globally with KeyRemap4Macbook. Put the following in your private.xml:

<root>
    <item>
        <name>Control+LeftClick Command+LeftClick</name>
        <appendix>Control+LeftClick Command+LeftClick</appendix>
        <identifier>control_click_to_command_click</identifier>
        <autogen>--PointingButtonToPointingButton-- PointingButton::LEFT, ModifierFlag::CONTROL_L, PointingButton::LEFT, ModifierFlag::COMMAND_L</autogen>
    </item>
</root>

This will cause any ctrl-click you type to be seen by the system as -click. That will prevent the contextual menu (since you won't actually be producing a ctrl). You'll still need to change your IDE settings, but this way you can keep the muscle-memory for the shortcut.

|improve this answer|||||
  • This one worked great. I think the app is called Karabiner now. There's a button to open private.xml in its Misc & Uninstall tab. After editing the file reload it (Reload XML button on Change Key tab) and enable remapping (same tab) – Oleg Mikheev May 12 '15 at 19:17
  • Thank you @OlegMikheev, but this disables the short cut when another app wants to use it – Nicolas Thery Mar 2 '16 at 11:47
4

It's not possible to disable Ctrl+Click at a system-wide level. You have two options: use Command+Click which is the de facto standard in all the Mac IDEs (which would be my suggestion, since going against such a well-established OS convention brings more headaches than it's worth), or configure your IDE to disable the shortcut: as you have noticed, remote desktop and virtualization environments offer the possibility.

|improve this answer|||||
  • I agree that using cmd+Click is the best potential solution. I just wanted to know if it's possible to disable it altogether and it seems a shame it isn't. The reason why I wanted to use Ctrl+Click instead is because most of the time I work on Windows and only every so often work on a Mac. With Windows keyboard plugged in I want the transition between OSs to be as seamless as possible. – Artur Jun 10 '12 at 14:17
  • @Artur what do you do about copy/paste as you have the same cmd control key issue? – user151019 Jun 10 '12 at 15:04
  • @Mark I'm using IntelliJ IDEA and it remaps these keys for you as well. – Artur Jun 10 '12 at 15:30

You must log in to answer this question.

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