We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 691

Summary: option and command keys affect left clicking
Product: SDL Reporter: Steven Noonan <steven>
Component: *don't know*Assignee: Ryan C. Gordon <icculus>
Status: RESOLVED WONTFIX QA Contact: Sam Lantinga <slouken>
Severity: major    
Priority: P2 CC: sezeroz, urkle
Version: HG 1.2Keywords: target-1.2.14
Hardware: PowerPC   
OS: Mac OS X (All)   

Description Steven Noonan 2009-02-05 05:56:52 UTC
See SDL_macevents.c, line 286 and 288.

SDL shouldn't be catching these modifiers and changing option+left click to mean middle click nor command+left click to mean right click.

In a game I'm working on, you hold the option key to bring up a menu, and while the key is still held, left click on an item in the menu. So this mouse click should register as being a left click, but SDL assumes I mean to be middle clicking.

Interpreting Option + Left Click and Command + Left Click should be done by the program using SDL, not by SDL itself.
Comment 1 Ryan C. Gordon 2009-09-13 16:33:40 UTC
Tagging this bug with "target-1.2.14" so we can try to resolve it for SDL 1.2.14.

Please note that we may choose to resolve it as WONTFIX. This tag is largely so we have a comprehensive wishlist of bugs to examine for 1.2.14 (and so we can close bugs that we'll never fix, rather than have them live forever in Bugzilla).

--ryan.
Comment 2 Sam Lantinga 2009-09-21 03:18:16 UTC
At this point the application behavior is locked down in SDL 1.2, but we've already eliminated this translation in SDL 1.3.

See ya!
Comment 3 Sam Lantinga 2009-09-21 04:44:24 UTC
Actually, due to another bug the right click emulation was switched to Control-click.  However Option-Click emulation will be left alone because there are some games that rely on that behavior.

You're always welcome to tweak that in the version of SDL you include with your game however!
Comment 4 Edward Rudd 2011-01-09 12:49:34 UTC
FYI in SDL 1.2.14 there is code also in SDL_QuartzEvents.m on lines 798-812. However there is a rather undocumented SDL_HAS3BUTTONMOUSE environment variable that completely disables the behavior.