Hello list,

I'm wondering if someone can suggest a strategy for me to be able to listen
to one particular type of event on an OpenLayers map (e.g., ctrl+click),
regardless of the currently active tool.  I've come up with a means to do
this for the rightclick, which has involved capturing the 'oncontextmenu'
event, and directly triggering the rightclick event on the map.  In this
manner, no matter what the active tool is on the map, a right click will
trigger this event.  However (keeping potential Mac users in mind), I'd also
want to accomplish the same kind of thing using a modifier key with the
left-click event.  For example, I'd want the click+modifier key event to act
as if it was the right-click event when the alt or ctrl key is pressed...but
at the same time, I'd want this to prevent the normal click event from being
triggered for any other active controls on the map.  Can anyone recommend an
approach that would accomplish this in a relatively tidy way?

For reference, you can see an example of the code for the way I'm capturing
the right-click event here ( http://pastebin.com/NAxFdgJ4 ).

I look forward to any suggestions that may be offered.

Best regards,
Mike
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to