In google maps API V3, I would like to add a marker to the map if the user control-clicked the map. For that, I've added a listener to the map, as follows -
google.maps.event.addListener(map, 'click', function(e){
if (event.ctrlKey)
add_marker(e.position);
});
The e parameter, passed by the listener, contains some data, but mostly regarding the position of the click, while I want to be able to ask if the control button was pressed during the time the usser clicked on the map.
I found that chrome had an object event, which is the default Javascript's eventObject, that contained the data I needed (ctrlKey) and this indeed works in chrome.
However, when I tried the same code in FF, it couldn't find an object called 'event', and I can't find a way to retrieve it.
I would appreciate your help in finding a solution that will work on IE too.
Thank, DanC