Change default rating button after answered question?

Hi, I just recently got into using Anki following this Skillshare course called Learn Anything With Flashcards. Have to give props, really good course.

And one of the things the dude in the course drills in right away is using keyboard shortcuts, which I love. Alright, I start using keyboard like a pro. And I start noticing that sometimes I accidentally press on a spacebar button too strong, and the question disappears, when I actually didn’t know the answer to the question this time (but I did the previous times).

It’s because after answering the question and pressing space on ‘‘Show Answer’’, it’s the ‘‘Good’’ rating button that is highlighted automatically.

Being that I press Spacebar on ‘‘Show Answer’’, it also acts as an ‘‘Accept’’ for the rating button that is highlighted at the moment. I like the 1,2,3,4 approach, but if I press spacebar just a tad bit too strong, I don’t get to use the 1,2,3,4 and can get my answer set to be brought up in the next day (as when you answer card correctly multiple times, it is then set to appear in the next day), when I’d benefit so much more if I accidentally pressed spacebar when ‘‘Again’’ would’ve been highlighted by default.

Could it be made so that after ‘‘Show Answer’’ the default active button would be ‘‘Again’’, like in the picture below? If I accidentally hold the Space button too long (or get happy spacebar finger), I don’t mind answering something I seem to know already and reinforcing the information an extra time rather than losing the chance to reinforce when it’s necessary.

The spacebar always chooses the Good button. There is no option in Anki to change this but
this can be done trivially with a simple add-on.

Copy the code below to a file named __init__.py and put the file in a new folder in your addons folder (accessible from Tools > Add-ons > View Files)

from aqt.reviewer import Reviewer

def my_defaultEase(self):
    # make Again the default button
    return 1

Reviewer._defaultEase=my_defaultEase
2 Likes

This did just the trick. Thank you very much. I managed to hold the button for too long after this already. It loads up so fast that I otherwise have to be too careful.

Thanks again.

Edit: Oh, and I love how the Discourse platform added solution to my first post question. Did not know i t can do that. I’ve learnt so many new and useful things today.

Could you please guide me on how to change the default button on android Anki? If you set Anki to show cards automatically, after the specified time, It usually chooses button 1 and goes to the next card, but I want button 2 to be selected by default.