[OpenLayers-Users] Re: How to access mouse modifier during "featureselected"

hessyana florenta.poasca at gmail.com
Tue Jan 10 10:58:57 EST 2012


Hi, 

You can access the mouse modifier through /window.event/ object.

Example: 

myLayer.events.on({
  
  //...

  "featureselected": function(evt) {
     if (window.event.shiftKey)
        alert("shift pressed");
     if (window.event.altKey)
        alert("alt pressed");
     if (window.event.ctrlKey)
        alert("ctrl pressed");
  },

  //...
});

Good luck,
Florenta Poasca

-----

Florenta Poasca
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-access-mouse-modifier-during-featureselected-tp4475175p7172654.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120110/acc9bbc9/attachment.html


More information about the Users mailing list