add ctrl enter as shortcut for ok in load deck from clipboard (#5417)

This commit is contained in:
RickyRister 2025-01-05 14:41:03 -08:00 committed by GitHub
parent 93fab3d78f
commit b8cf3e2cab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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