[UserScript] WaniKani More Hotkeys

:warning: This is a third-party script/app and is not created by the WaniKani team. By using this, you understand that it can stop working at any time or be discontinued indefinitely.

Description

This adds some hotkeys to the lesson/review page:

  • Press Shift+W to “wrap up”.
  • Press S to add a synonym. (after answering)
  • Press M to edit the “meaning note” field.
  • Press R to edit the “reading note” field.
  • Press Shift+J to hear the other audio (Kyoko ↔️ Kenichi).
  • Press \ (backslash) to toggle Lightning Mode, if you have it installed.
  • Press ? to show all hotkeys.

Also, you can now submit meaning/reading notes with Ctrl+Enter⌘+Enter, or abort with Esc.

Install

Install Tampermonkey, then click here.

The source code is on GitHub.

15 Likes

Thanks for this! I’ve tested it and it just worked! What I have tested is F, S, M and Apple Enter. What I haven’t tested is W, R. I tested it on Firefox Catalina.

I’ve just added your userscript to The New And Improved List Of API and Third Party Apps under Reviews & Lessons.

3 Likes

Oh wow, this is perfect, thank you so much!
I always inwardly complained that to add a meaning note (or reading/synonym) you had to move your hand between mouse and keyboard a lot. (type, click, type, click).

Now you just type m, enter your note, and finish with ctrl+enter.
Perfect solution.
No need to touch the mouse ever again during reviews and lessons! :smiley:

(now, we could go crazy and add shortcuts for absolutely everything:) start session search Kenichi/Kyoko pronunciation (J only plays what you set as default, usually Kyoko)
Ignore Answer (if you have that script)
enter answer (yes, because the enter button is too far away. and i don't like auto answer)

etc. i’ll probably go and code this at some point, just because i love keyboard layouts (and efficiency, haha).

note for users: the fields you want to enter have to be visible. (edit: fixed in 1.10)

1 Like

the fields you want to enter have to be visible

Originally I made it check for the presence of the field, because I thought it might be jarring to have hotkeys for fields that aren’t on the page yet.

But after a bit of use I realized that it’s actually nicer to have S, M, R open as much of the UI as they need.

I released version 1.1.0, which fixes this. Grab it here.


shortcuts for absolutely everything:

  • start session

I think you can just use a bookmark, or Tab Tab (Tab) Enter from wanikani.com.

  • search

This one is a little hard. I don’t want to add any hotkeys that take you away from the session page, but there’s no search UI on that page, and I’m not interested in creating my own.

  • Kenichi/Kyoko pronunciation

I like your idea of a “play the other audio” shortcut — Shift+J would be pretty good for this.

  • Ignore Answer

That script’s Esc or ` hotkey should still work.

  • enter answer

I also get pinky strain from reaching to hit Enter

Maybe I’ll expand the ? hotkeys list to have a checkbox for making ; submit answers.

1 Like

great, thanks! yes, it’s more troublesome to click on Show All Information.

  • search

This one is a little hard. I don’t want to add any hotkeys that take you away from the session page, but there’s no search UI on that page, and I’m not interested in creating my own.

right, i forgot you focused on lesson/session only, but why do you actually? why not add this as a shortcut for the dashboard?

  • Kenichi/Kyoko pronunciation

I like your idea of a “play the other audio” shortcut — Shift+J would be pretty good for this.

Shift+J sounds great!

  • Ignore Answer

That script’s Esc or ` hotkey should still work.

right, i forgot that existed, haha.

  • enter answer

I also get pinky strain from reaching to hit Enter

yup, several people have said this, it’s not ideal to stretch your pinky so far every 2 seconds.

Actually i use the auto-commit script now, which automatically hits double enter when you’ve entered a correct response. But it’s not ideal, because it won’t trigger with typing errors, and it always hits enter twice, so you can’t review the card before going on (second enter press), for alternative meanings and so on.

Maybe I’ll expand the ? hotkeys list to have a checkbox for making ; submit answers.

Sounds good, but could you add “.” as another alternative?
“;” is not a top level key in the german standard layout (qwertz),
nor in my nerdy one (Neo2, which has (< or alt) + v for enter, decent alternative).

Of course it would be great if everyone could define his own keyboard shortcuts.
That may be difficult, but could you maybe at least put the variables for the keys all in one place somewhere, so that they are easy to see and change?

I released a new update that has Shift + J to play the other audio file.

1 Like

Anyone else notices that this script doesn’t work on lesson? It works well on Review though.
On lesson, I tried pressing “S” to add synonym, failed, I tried pressing “M” to edit the “meaning note” field, failed.

Just curious; did you implement checks for which reading was entered by the user?

Oops, it actually doesn’t work on the lesson screen at all. I’ll play around with making these hotkeys work on the lesson screen.

1 Like

Do you mean: if they get the reading wrong, they shouldn’t be able to press Shift + J to hear the audio?

I considered this case, and it’s easy to implement that check: I can just verify if the regular “play audio” icon button is enabled.

However, I realized that I don’t care if people use these hotkeys to give up and peek at answers. The same way you can press F to peek at a card you got wrong, I assume anyone who presses Shift + J on a card they got wrong knows what they’re doing. In fact, I even overrode the behavior of J to work on wrong answers.

Oh, sorry, I confused your feature with playing the other voice actor

I guess I don’t understand what you mean.

Yes, if you selected Kenichi in your settings, then J will play the Kenichi audio (even if you answered the flashcard wrong) and Shift+J will play the Kyoko audio (even if you answered the flashcard wrong).

Then if a user answers the item correctly and attempts to play the other VA’s audio, do you check which reading the users used?

I am really confused by what you are asking here. Do you mean that there are sometimes multiple audios, for multiple possible readings of a card? If that’s ever the case, then no: I believe my code would always play the first audio listed. I haven’t come across such a vocab item during my testing.

Good news! I released 1.3.0, which adds M and R and Shift + J hotkeys to the lesson and quiz screens. (cc @Oshin)

(It’s a little “out of scope” for this userscript, but it’d be nice if I could add the synonyms widget to the lessons screen. It has always bothered me that I can’t add synonyms during lessons. So in the next version, I’m going to see if I can make that a thing, in the name of “making S work on the lesson screen” :blush:)

2 Likes

Yes. Since the recent audio update there is often two voiced readings for vocab items. Natively WK checks which reading you have entered and plays that audio

It’s interesting to see @ejplugge 's Flaming Durtle can let me add synonyms during lessons. It’s a powerful and helpful feature indeed. I almost always use this feature on Android. Just like when I often use WK More Hotkeys userscript during reviews on computer.

@lake Feature request: Ability to add “Name Notes” while learning Radical Lessons. Something like “n”?

1 Like

I will add this next time there are radicals in my lessons so I can test :slight_smile: I won’t be level 26 for a while, though… I got back from an 8 month hiatus (or so) so I am dealing with a lot of cards right now.