Hi,
There is a requirement in my project to use ctrl-shift-mousedown to capture the beginning of a line drawing. So, when mousedown happens, I'd like to identify whether ctrl-shift keys are pressed. If not, I'd like my map to pan as normal. I came up with the following algorithm but I can't propagate the mouse event to the map.
function OnMapCreated(map) {
// deactivate panning so that mousedown can be captured
var navigation = map.getControlsByClass("OpenLayers.Control.Navigation")[0];
navigation.dragPan.deactivate();
map.events.register('mousedown', map, function(evt){
if(evt && evnt.button == 2) {
// allow panning to continue
var navigation = map.getControlsByClass("OpenLayers.Control.Navigation")[0];
navigation.dragPan.activate();
// fireEvent - How to fire event to the map???
document.body.fireEvent('onmousedown', event);
}
});
}
Thanks,
Tracy