Handy Answer Keys Shortcuts<10kB. Updated 2013-07-06. Only supports Anki 2.0.x.
As add-ons are programs downloaded from the internet, they are potentially malicious. You should only download add-ons you trust.
To download this add-on, please copy and paste the following code into the desktop program:
If you were linked to this page from the internet, please open Anki on your computer, go to the Tools menu and then Add-ons>Browse & Install to paste in the code.
Other Anki 2.0.x Add-Ons Ask a Question
You can easily change the assignation of keys by modifying the code. Yet if you desire to use special characters, just as said in a previous comment, you have to add the following three lines at the beginning of the script :
And then you will be able to use é, ö and others.
def keyHandler(self, evt, _old):
key = unicode(evt.text())
if key == "-":
try:# throws an error on undo -> do -> undo pattern, otherwise works fine
elif key == "+":
elif key == "5":
elif key == "2":
elif key in ["7", "8", "9", "4",]:
cnt = mw.col.sched.answerButtons(mw.reviewer.card) # Get button count
isq = self.state == "question"
if key == "7":
elif key == "8":
elif key == "9":
self._answerCard(3 if cnt >= 3 else cnt)
elif key == "4":
return _old(self, evt)
return _old(self, evt)
Reviewer._keyHandler = wrap(Reviewer._keyHandler, keyHandler, "around")
Daniel Léo Simpson
'invalid code, or add-on not available for your version of Anki'
Ne fonctionne pas avec le clavier japonais Google. Does not work if Google Japanese Input is used. :-(
How could I assign other keys with will not result in a character input, like F1 to F4?
For left-handed users, or for people who want to use flashcards with the left hand while writing with their right hand, it's possible to replace the default shortcut keys with custom keys. For example:
Tools > Add-ons > Handy_Answer_Keys_Shortcuts > Edit...
Copy the text into a text editor such as Notepad++, replace 'j' with 'r', replace "j" with "r", etc. to make the following changes:
j ==> r
k ==> e
l ==> w
; ==> q
Where 'q' is easiest and 'r' is most difficult. The commented text in the script contradicts itself, but "l" and ";" (or after the change, "w" and "q") set the question to "easy" when there are only three options.
This deck makes my life so much easier, instead of pressing enter then 4 . . . I just press the ";" key. Being a hardcore Anki user, I can't imagine myself without this add-on.
My only recommendation would be to bind the 'z' to the 'i' key for undo, since having ctrl+z binded to 'z' defeats the purpose of having to use just the right hand.
(Altho it's easy enuff for the user ot make this change, just saying : )
could anyone let me know how configure this to NOT bypass "show answer" when I hit the key(s)?
Since Anki doesn't ship with customizable keyboard shortcuts this add-on comes in very handy, indeed.
For those of you having trouble configuring Unicode shortcuts: You have to set the encoding of the python script to UTF8. To do this add the following three lines at the beginning of the script (right after the last #-commented line):
You should now be able to assign any Unicode key you want, Umlauts (e.g. 'ö' included).
This seems to be a pretty good addon. For some reason I can't get ö to work as the 4th key with Finnish keyboard.
Would be nice if there was a small delay on the add, like 0.2s or so, that you can't go through your question. Sometimes 2-3 questions go by since the little, accidental, holding of the key goes through questions so fast.
The 'ö'-trick mentioned in other post for german keyboard didnt work. I tried all kind of codes, UTF-8, binary and whatever I could find. Nothing seemed to work for the ö-bind.
Great work otherwise, though.
I can't live without it
This plugin works great and you can customize it easily!
As a new user it can be good to use the show answer - select difficulty steps. When you are more familiar with how studying in Anki works, this addon is a nice feature which allow you to focus on the stuying, by fewer keypresses and not getting distracted by the card's due times.
If anyone else has a german keyboard layout and wants to use 'ö' as the 4th key, you have to replace the 4th key (forgot what it was on the english layout) with u'\xf6'.
So then you have the lines
elif key in ["j", "k", "l", u'\xf6']:
elif key == u'\xf6':
This add on is amazing! I'm wondering: does anyone know how to map the "1" (or "j" in this addon) key to a mouse-click?
*Very* handy – thanks for sharing this!
And if I may add: it would be great if you could incorporate an option to assign "Mark Note" and "Suspend Note" to a single key (as opposed to Shift + sth.).
Good and if you want to customize more functionalities just look at source code of Anki on github here: https://github.com/dae/anki ,and modifiy the plugin according to your wish.
This is what I was looking for!