Reputation: 423
Is it possible to find out if some key is pressed during dragging in vaadin? I would like if user could copy item by dragging with pressed Ctrl.
Upvotes: 0
Views: 209
Reputation: 423
In drop method just use this:
TreeTargetDetails treeTargetDetails =
((TreeTargetDetails) event.getTargetDetails());
MouseEventDetails mouseEventDetails =
MouseEventDetails.deSerialize((String) treeTargetDetails.getData("mouseEvent"));
if (mouseEventDetails.isCtrlKey())
{
...
}
Upvotes: 1