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 9ee68c974b
commit f137c21d02

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
##########################################################################