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 637

Summary: Ctrl-click should send right mouse button event (instead of Cmd-click)
Product: SDL Reporter: alun.bestor
Component: eventsAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED WONTFIX QA Contact: Sam Lantinga <slouken>
Severity: enhancement    
Priority: P2 CC: max, sezeroz
Version: HG 1.2Keywords: target-1.2.14
Hardware: PowerPC   
OS: Mac OS X (All)   

Description alun.bestor 2008-10-20 03:40:46 UTC
The OS X convention (from the bad old days of one-button mice) is that ctrl-left-click performs the same function as a right-click. SDL does have similar behaviour already: it will send a right-button-click event if the user holds down the Cmd key while left-clicking. To be consistent with OS X though, this behaviour could be replaced or extended with a check for the Ctrl key rather than the Cmd key.

The relevant code is video/quartz/SQL_QuartzEvents.m, line 789. Judging from line 786, this behaviour is only meant to work if the user doesn't have a 3-button mouse: but it seems to function with 3-button mice regardless. In any case the ctrl-click behaviour works in OS X no matter what the features of the mouse you are using.
Comment 1 Ryan C. Gordon 2009-09-13 16:33:09 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 04:33:27 UTC
This is now switched to Ctrl-click, thanks!
Comment 3 Max Horn 2009-09-21 09:46:48 UTC
I am skeptical of this "solution". Yes, "Ctrl-Click" is now standard on OS X, and the "Cmd-Click" in SDL heralds back from the MacOS classic days. However, besides history, there were other reasons for retaining the "cmd-click" combo instead of switching to ctrl-click. 

In particular, this change will lead to regressions in portable software out there: It breaks 'ctrl click' in those applications -- many apps / games associate a custom meaning to ctrl-click, and if SDL hijacks ctrl-click, this breaks. The advantage of cmd-click is simply that nobody coming from Windows or Linux will even dream of remapping that to start with ;).

Of course code can be adopted, but I wonder if such a change is appropriate for 1.2.14 -- wouldn't this be better done in 1.3, letting SDL 1.2 rest at the old & well-established behavior?
Comment 4 Sam Lantinga 2009-09-21 19:26:39 UTC
Good point Max.  I reverted this change and marked it won't fix for SDL 1.2.