mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
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
1 changed files with 18 additions and 0 deletions
|
@ -185,6 +185,24 @@ class CardLayout(QDialog):
|
||||||
self,
|
self,
|
||||||
activated=self.tform.style_button.click,
|
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)):
|
for i in range(min(len(self.cloze_numbers), 9)):
|
||||||
QShortcut( # type: ignore
|
QShortcut( # type: ignore
|
||||||
QKeySequence(f"Alt+{i+1}"),
|
QKeySequence(f"Alt+{i+1}"),
|
||||||
|
|
Loading…
Reference in a new issue