Created shortcut to switch between card types on clayout.py
editor window (F3 and F4) because it should be simple to use them single hand and together with Ctrl+1, 2 and 3 combos.
This commit is contained in:
parent
9c354f5e6b
commit
85c236a417
@ -185,6 +185,24 @@ class CardLayout(QDialog):
|
||||
self,
|
||||
activated=self.tform.style_button.click,
|
||||
)
|
||||
QShortcut( # type: ignore
|
||||
QKeySequence("F3"),
|
||||
self,
|
||||
activated=lambda: (
|
||||
self.update_current_ordinal_and_redraw(self.ord - 1)
|
||||
if self.ord - 1 > -1
|
||||
else None
|
||||
),
|
||||
)
|
||||
QShortcut( # type: ignore
|
||||
QKeySequence("F4"),
|
||||
self,
|
||||
activated=lambda: (
|
||||
self.update_current_ordinal_and_redraw(self.ord + 1)
|
||||
if self.ord + 1 < len(self.templates)
|
||||
else None
|
||||
),
|
||||
)
|
||||
for i in range(min(len(self.cloze_numbers), 9)):
|
||||
QShortcut( # type: ignore
|
||||
QKeySequence(f"Alt+{i+1}"),
|
||||
|
Loading…
Reference in New Issue
Block a user