[ka-Map-users] Help to register new event!

Paul Spencer pspencer at dmsolutions.ca
Tue Sep 6 14:44:08 EDT 2005


that looks like it should work.  I've had problems with key events being 
handled differently between browsers though.

One problem may be that theInsideLayer is not getting the 'input focus'. 
  I would suggest that you 'hook' the key events to the document object 
while the mouse is over the map, i.e. in the onmouseover handler for 
theInsideLayer, use:

this.oldonkeyup = document.onkeyup;
document.onkeyup = kaMap_onkeyup;

and then in the onmouseout do

document.onkeyup = this.oldonkeyup;

Cheers

Paul

Andrea Cappugi wrote:
> Hi all,
> I'm trying to register a new key event on theInsideLayer
> but it doesn't work.
> 
> code lines
> 
> ....
> this.theInsideLayer.onkeyup = kaMap_onkeyup;
> ....
> 
> 
> 
> function kaMap_onkeyup( e )
> {
> 
>     if (this.kaMap.currentTool)
>         this.kaMap.currentTool.onkeyup( e );
> }
> 
> 
> any suggestions?
> 
> thanks
> Andrea
> 
> _______________________________________________
> ka-Map-users mailing list
> ka-Map-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/ka-map-users
> 

-- 
+-----------------------------------------------------------------+
|Paul Spencer                           pspencer at dmsolutions.ca   |
+-----------------------------------------------------------------+
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
+-----------------------------------------------------------------+


More information about the ka-Map-users mailing list