Hi Sasha, thanks for your reply.
Doesn't that interfere with OpenLayers.Control.KeyboardDefaults which I also use? I means, if you hijack the document handler, OL is probably unable to handle other events, isn't it? Thanks! 2011/7/22 Sasha Milenkovic <[email protected]> > I am doing that on a classic JavaScript way: > > document.onkeyup=function(e) > { > ... ... > } > > Best Regards! > > On Thu, Jul 21, 2011 at 11:19 PM, Jan Wedel <[email protected]>wrote: > >> Nobody any idea how to react on keyboard events? >> >> Am 16.07.2011 um 23:03 schrieb Jan Wedel: >> >> > Hi! >> > >> > I'm trying to get the keyboard handler to work. I want to catch the >> keypress event, especially for the space key and hide/display the overlay >> layer of my map. >> > >> > 1.) How can I set up the handler to react on keypressed events? In the >> APi, it says the callbacks object should contain exactly one function that >> takes the position of the mouse pointer which is not what I want. >> > 2.) On my callback function, how can I find out what key was actually >> pressed? >> > 3.) How can I "install" this handler? There is no addHandler method in >> OpenLayers.Map class... >> > >> > I tried to find some information in the API documentation but it doesn't >> answer my question! >> > >> > Thanks a lot! >> > >> > //Jan >> >> _______________________________________________ >> Users mailing list >> [email protected] >> http://lists.osgeo.org/mailman/listinfo/openlayers-users >> > > > > -- > Macte animo! >
_______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
