AnActionEvent (final @NotNull ActionEvent e) { Object source = e.getSource(); InputEvent inputEvent = null; if (source instanceof InputEvent) { inputEvent = (InputEvent)source; } return createAnEvent(inputEvent, e.getModifiers()); }