if (mouseEvent.getButton() == MouseButton.SECONDARY ||
(mouseEvent.getButton() == MouseButton.PRIMARY && mouseEvent.isControlDown())) {
event.consume();
}
}
return initial.dispatchEvent(event, tail);
}
});
// make the new context menu including the clear option
MenuItem copySelected = new MenuItem("Copy");