From a0e736ef395189ddbd400777975dc9d9c3149418 Mon Sep 17 00:00:00 2001 From: "Soren I. Bjornstad" Date: Sun, 31 Aug 2014 14:41:08 -0500 Subject: [PATCH] accept Ctrl-Enter to close the edit current dialog Esc already works, but since the Add dialog accepts it it's nice to have as well. --- aqt/editcurrent.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aqt/editcurrent.py b/aqt/editcurrent.py index c029fc36e..d39a049aa 100644 --- a/aqt/editcurrent.py +++ b/aqt/editcurrent.py @@ -26,6 +26,8 @@ class EditCurrent(QDialog): self.connect(self, SIGNAL("rejected()"), self.onSave) + self.form.buttonBox.button(QDialogButtonBox.Close).setShortcut( + QKeySequence("Ctrl+Return")) self.editor = aqt.editor.Editor(self.mw, self.form.fieldsArea, self) self.editor.setNote(self.mw.reviewer.card.note()) restoreGeom(self, "editcurrent")