Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 341893 - Current tool does not remain active (locked) if the user is pressing the ctrl key on Mac OS
Summary: Current tool does not remain active (locked) if the user is pressing the ctrl...
Status: RESOLVED FIXED
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal
Target Milestone: 1.7.0   Edit
Assignee: Aurelien Pupier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-05 08:11 EDT by Andreas Muelder CLA
Modified: 2012-11-22 14:55 EST (History)
1 user (show)

See Also:
apupier: kepler+


Attachments
patch (1.05 KB, text/plain)
2012-11-21 15:11 EST, Andreas Muelder CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Muelder CLA 2011-04-05 08:11:23 EDT
Build Identifier: 20110218-0911

The ctrl+click is reserved for the context menu on Mac.
The handleFinished method in the CreationTool class should look like this 
to work properly on MacOs X. 

protected void handleFinished() {
		if (!getCurrentInput().isModKeyDown(SWT.MOD1)) {
			super.handleFinished();
		} else {
			reactivate();
		}
	}

Reproducible: Always
Comment 1 Aurelien Pupier CLA 2011-04-18 08:43:53 EDT
Using SWT.MOD1 will cause both platforms to Ctrl key? Or is it another key on Mac? In this case, it will require to also modify the tooltip.

(In reply to comment #0)
> Build Identifier: 20110218-0911
> 
> The ctrl+click is reserved for the context menu on Mac.
> The handleFinished method in the CreationTool class should look like this 
> to work properly on MacOs X. 
> 
> protected void handleFinished() {
>         if (!getCurrentInput().isModKeyDown(SWT.MOD1)) {
>             super.handleFinished();
>         } else {
>             reactivate();
>         }
>     }
> 
> Reproducible: Always
Comment 2 Andreas Muelder CLA 2012-11-21 15:02:41 EST
Hi Aurelien,

SWT.MOD1 is CMD on Mac, CTRL on Windows/Linux.

Regards,

Andreas
Comment 3 Andreas Muelder CLA 2012-11-21 15:11:43 EST
Created attachment 223828 [details]
patch

patch attached
Comment 4 Aurelien Pupier CLA 2012-11-22 14:55:44 EST
patch applied on HEAD