add ctrl enter as shortcut for ok in load deck from clipboard

This commit is contained in:
RickyRister 2025-01-05 01:47:58 -08:00
parent 38e99f2e87
commit af146904db
2 changed files with 13 additions and 0 deletions

View file

@ -71,3 +71,13 @@ void DlgLoadDeckFromClipboard::actOK()
delete deckLoader;
}
}
void DlgLoadDeckFromClipboard::keyPressEvent(QKeyEvent *event)
{
if (event->key() == Qt::Key_Return && event->modifiers() & Qt::ControlModifier) {
event->accept();
actOK();
return;
}
QDialog::keyPressEvent(event);
}

View file

@ -26,6 +26,9 @@ public:
{
return deckList;
}
protected:
void keyPressEvent(QKeyEvent *event) override;
};
#endif