Jump to content

[FIXED] Mac - Right click not working


Recommended Posts

Well I'm using the regular touchpad that comes on every portable mac.

The weird thing is that it used to work perfectly on the other versions, now nothing seems to work to move the units (except having them build something). But I don't feel like getting a special mouse juste for the game.

Thanks for your answer!

Link to comment
Share on other sites

There has been a switch to the SDL 2 version middleware, from a SDL1.x before. Could be related here.

That might be right. I see from the SDL wiki that the SDL 2.0.2 release contained "a hint SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK to control whether Ctrl+click should be treated as a right click on Mac OS X. This is off by default." Does that imply that Cmd+click is not treated as a right click by default either? I've failed to find anywhere in System Preferences where I could change anything to regulate this.

Link to comment
Share on other sites

So, just so I understand: Is this going be to treated as a bug or as a change requiring a hardware update on the part of the user?

As a workaround, try setting the "SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK" environment variable from the terminal, like this:

export SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK=1open path/to/0ad.app
changing the path to wherever 0ad.app is. Kind of yucky for OS X, I know, but it's only a workaround after all :P

My thinking is to add an "emulatemacrightclick" option to the game's config, defaulting to true, Mac users can disable it if they have a two button mouse.

Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...

Committed a fix for this in r16380. To enable SDL's right-click emulation on Macs, add this line to your local.cfg file:

macmouse = true
Then you will need to reassign other hotkeys that use Ctrl+Click, I would suggest using the Command key (Super):

[hotkey.selection]remove = Super[hotkey.session]attackmove = Supergarrison = Superautorallypoint = Superdeselectgroup = Super
But of course, you can use whatever you prefer.
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...