Hint Hotkeys not working with built in TTS


My issue is I use this code on the
Front: {{tts en_US voices=Apple_Samantha speed=1.4:cloze:Text}}
Back: {{tts en_US voices=Apple_Samantha speed=1.4:cloze-only:Text}}
when the built in tts is turned on like this then the hint hot keys “h” will only replay the audio and wont show the hint.

Note: I tried to change the hotkey to “m” but then when I restarted anki pressing “m” just replayed the audio and “h” did nothing. When I disable hot keys “h” does nothing.

2.1.30 beta1, also had the same issue on 2.1.29 and 2.1.30

Mac catalina

@dae I think I found the reason this recently started causing problems

The code displayed when including a replay sound button is:

a class=“replay-button soundLink” href="#" onclick=“pycmd(‘play:a:0’); return false;”

The hint hotkeys add-on looks for href="#" to make the hints display. Is there a reason href="#" is needed for the audio or is there a way around this?

Hint hotkeys line 75:

if (l.href.charAt(l.href.length-1) === ‘#’)

Short term solution to this overlap for the time being is to uncheck including the buttons in preferences.

what happens if you modify the add-on hint hotkeys like this

modify this line https://github.com/glutanimate/anki-addons-misc/blob/f1e6693b0fd02184d60458a465d0902ca1cda147/src/reviewer_hint_hotkeys/reviewer_hint_hotkeys.py#L74


    if (l.href.charAt(l.href.length-1) === '#') {


    if (l.className != "hint"){
    if (l.href.charAt(l.href.length-1) === '#') {
1 Like

Works like a charm. Thanks as always.

@glutanimate want one of us to make a PR for you?