I have noticed some people use reviewStateShortcuts
to map keys in the add-ons they write. For example:
- glutanimate/anki-addons-misc Github repository: anki-addons-misc/src/reviewer_more_answer_buttons/more_answer_buttons/reviewer_more_answer_buttons_for_21.py at 7b981836e0a6637a1853f3e8d73d022ab95fed31 · glutanimate/anki-addons-misc · GitHub
- A comment in Reddit:
https://www.reddit.com/r/Anki/comments/a9xwth/comment/ecp873r
- A post in this forum:
https://forums.ankiweb.net/t/how-to-fallback-to-default-keystroke-handlers-for-shortcuts/23088
I wanted to see the definition of reviewStateShortcut
in the Anki source code. I used grep
to search reviewStateShortcuts
, but I found 0 matches. See code block below.
$ rm -rf /tmp/anki \
&& git clone --branch main --depth 1 'https://github.com/ankitects/anki' /tmp/anki \
&& grep -R 'reviewStateShortcuts' /tmp/anki | wc -l
0
$ cd /tmp/anki \
&& git log -S 'reviewStateShortcuts' | wc -l
0
My question is: Where can I find the definition of reviewStateShortcuts
?
While I appreciate that some of you might explain what reviewStateShortcuts
does, I’m more interested in finding its definition in the source code so that I can inspect it by myself and thus find out more information on how to properly use it.