How to get Keyboard Qualifiers during drag-n-drop operation

I am trying to implement a different operation depending on some condition, i.e. holding down ctrl might give Copy otherwise it is a Move. How do I get keyboard status from within the onDragIn, onDrag, onDrop etc events?

You can set onkeydown and onkeyup event listeners:

var isCtrl = false;
dhtmlxEvent(document.body,“keydown”,function(e){
isCtrl = ((e||event).ctrlKey)
});
dhtmlxEvent(document.body,“keyup”,function(e){
isCtrl = ((e||event).ctrlKey)
});
tree.attachEvent(“onDrop”,function(){
if(isCtrl){ //your code}
else { // your code}
})

Thanks, works like a charm :slight_smile: