public static boolean isCurrentShortcutOk(DataContext dataContext) {
    if (!PropertiesComponent.getInstance().isValueSet(ASK_ABOUT_SHORTCUT)) return true;

    Keymap keymap = getCurrentKeymap();
    if (keymap == null) return true;
    Keymap rootKeymap = getRootKeymap(keymap);
    if (!TARGET_KEYMAPS.contains(rootKeymap.getName())) return true;

    AWTEvent event = IdeEventQueue.getInstance().getTrueCurrentEvent();
    if (!isCtrlY(event)) return true;

    int savedCount = IdeEventQueue.getInstance().getEventCount();
    int choice = Messages.showDialog(KeyMapBundle.message("keymap.patch.dialog.message"), KeyMapBundle.message("keymap.patch.dialog.title"),
                                     new String[]{
                                       KeyMapBundle.message("keymap.patch.dialog.redo.option"),
                                       KeyMapBundle.message("keymap.patch.dialog.delete.line.option"),
                                       KeyMapBundle.message("keymap.patch.dialog.cancel.option")
                                     }, 2, Messages.getInformationIcon(), null);
    IdeEventQueue.getInstance().setEventCount(savedCount); // keep data context valid after showing modal dialog

    if (choice < 0 || choice > 1) return false;
    PropertiesComponent.getInstance().unsetValue(ASK_ABOUT_SHORTCUT);
    if (choice == 1) return true;
    patchKeymap(keymap);
    invokeRedo(dataContext);
    return false;
  }
public static boolean isCurrentShortcutOk(DataContext dataContext)