void (JComponent source, String shortcut, EditorTextField target) { final AnAction action = new AnAction() { @Override public void actionPerformed(@NotNull AnActionEvent e) { IdeFocusManager.findInstance().requestFocus(target.getFocusTarget(), true); } }; action.registerCustomShortcutSet(CustomShortcutSet.fromString(shortcut), source); }