[kepler-dev] right-click on Mac
Stephen Andrew Neuendorffer
neuendor at eecs.berkeley.edu
Wed Apr 28 09:04:25 PDT 2004
If you are interested in experimenting, the code is in
ptolemy/vergil/actor/ActorEditorGraphController.java:
I think the command key is open-apple???
// Create listeners that creates new relations.
_relationCreator = new RelationCreator();
if (UIManager.getLookAndFeel().getName().startsWith("MacOS")) {
// On the Mac, do not override Control-Click, which is
// used to bring up the context menu
_relationCreator.setMouseFilter(_metaFilter);
} else {
_relationCreator.setMouseFilter(_controlFilter);
}
pane.getBackgroundEventLayer().addInteractor(_relationCreator);
// Note that shift-click is already bound to the dragSelection
// interactor when adding things to a selection.
// Create the interactor that drags new edges.
_linkCreator = new LinkCreator();
if (UIManager.getLookAndFeel().getName().startsWith("MacOS")) {
// On the Mac, do not override Control-Click, which is
// used to bring up the context menu
_linkCreator.setMouseFilter(_metaFilter);
} else {
_linkCreator.setMouseFilter(_controlFilter);
}
/** The filter for meta-click operations. Under Mac OS X,
* the command key is the meta key, or keycode 0x2318
* For details, see the Apple java archive
* http://lists.apple.com/archives/java-dev
* User: archives, passwd: archives
*/
private MouseFilter _metaFilter = new MouseFilter(
InputEvent.BUTTON1_MASK,
InputEvent.META_MASK);
At 08:59 AM 4/28/2004, Stephen Andrew Neuendorffer wrote:
>At 01:49 PM 4/27/2004, Xiaowen Xin wrote:
>>Hi Christopher,
>>
>>I see what you mean. Thanks for the explanation!
>>
>>I just noticed that shift-click works for creating a connection between
>>an external port and a relation. Have you tried it?
>
>We tried this in 3.0... it turns out to not work sell because shift-click is
>used for other things as well.
>
>
>>If it's identical in functionality to control-click, then we could have
>>control-click bring up the context menu on Macs.
>
>In 4.0, there is code in vergil to bind meta-click (open-apple, I believe) to
>create connections instead of control-click. This should work, but hasn't
>been
>heavily tested... It would be helpful if you could try this in practice
>and see if you
>run into difficulties.
>
>Steve
>
>
>_______________________________________________
>kepler-dev mailing list
>kepler-dev at ecoinformatics.org
>http://www.ecoinformatics.org/mailman/listinfo/kepler-dev
More information about the Kepler-dev
mailing list