diff --git a/src/ol/interaction/condition.js b/src/ol/interaction/condition.js index 81a34c4f63..3644843ddc 100644 --- a/src/ol/interaction/condition.js +++ b/src/ol/interaction/condition.js @@ -20,6 +20,18 @@ ol.interaction.condition.altKeyOnly = function(browserEvent) { }; +/** + * @param {goog.events.BrowserEvent} browserEvent Browser event. + * @return {boolean} True if only the alt and shift keys are pressed. + */ +ol.interaction.condition.altShiftKeysOnly = function(browserEvent) { + return ( + browserEvent.altKey && + !browserEvent.platformModifierKey && + browserEvent.shiftKey); +}; + + /** * @param {goog.events.BrowserEvent} browserEvent Browser event. * @return {boolean} True if only the no modifier keys are pressed.