[GIS] openlayers how to make translate event only in shift click

openlayers

is there a way to make ol.interaction.Translate only fires only on shift + click it's really hard to edit a layer when you have Translate and Modify together.

this is my code

var selectInteraction = new ol.interaction.Select({
        condition: ol.events.condition.singleClick,
        //toggleCondition: ol.events.condition.shiftKeyOnly,
        layers: function (layer) {
            return layer.get('id') == 'redline';
        }
    });

    var modify = new ol.interaction.Modify({
        features: selectInteraction.getFeatures()
    });

    var Translate = new ol.interaction.Translate({
        features: selectInteraction.getFeatures()
    });

    map.getInteractions().extend([selectInteraction, modify, Translate]);

    selected_features = selectInteraction.getFeatures();

Best Answer

Just had the same problem while using translate and modify at the same time. I solved it with changing the order how the interactions are added to the map. Be sure to add the Translate first:

map.getInteractions().extend([selectInteraction, Translate, modify]);