Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 341893

Summary: Current tool does not remain active (locked) if the user is pressing the ctrl key on Mac OS
Product: [Modeling] GMF-Runtime Reporter: Andreas Muelder <Andreas.Muelder>
Component: GeneralAssignee: Aurelien Pupier <apupier>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: apupier
Version: unspecifiedFlags: apupier: kepler+
Target Milestone: 1.7.0   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
patch none

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