Shortcuts to preview clozes in card layout screen

Assign Alt+{number} to select cloze cards.
This commit is contained in:
abdo 2021-02-19 10:40:30 +03:00
parent ea07642c16
commit 39f3b6ce93

View File

@ -187,6 +187,12 @@ class CardLayout(QDialog):
self,
activated=self.tform.style_button.click,
)
for i in range(min(len(self.cloze_numbers), 9)):
QShortcut( # type: ignore
QKeySequence(f"Alt+{i+1}"),
self,
activated=lambda n=i: self.pform.cloze_number_combo.setCurrentIndex(n),
)
# Main area setup
##########################################################################