Closed ELLIOTTCABLE closed 2 years ago
Hello, I just pushed out an update to fix this issue. It works for me on 2.1.50beta1 but if you are encountering any issues, let me know and I will look into it further.
Hm. I installed from the Anki Addon Store — there's no more crashes, but the addon doesn't seem to … have any effect. For instance, I've modified the following:
{
"reviewer choice 1": "a",
"reviewer choice 2": "r",
"reviewer choice 3": "s",
"reviewer choice 4": "t",
}
And only the second line, "reviewer choice 2": "r",
, is … working.
Worse, it does seem to unbind the existing keys (1, 2, 3, 4 don't work).
Ok, I think I managed to work this one out as well. I think based on how Anki checks for updates you might need to check for updates manually for this patch, but let me know if any issues persist or if there are other problems with 2.1.50.
Hm. I'm not sure what you meant by manually updating — I tried uninstalling and re-installing via the Anki code, but no luck: the above snippet still has no effect, except for the key "r"; it also still disables the 1, 2, 3, 4 keys.
Any debugging steps I could take? I'm a fairly competent programmer, although not one that uses Python …
The addon tab has a "Check for Updates" button on the top right which you usually never need to use since Anki checks for updates every 24 hours or so. The shortcut patch came out very soon after the initial fix, so Anki might not automatically tell you the patch existed at the time. The main cause of the shortcut issue is that A, S, and T are all shortcuts used on the main menu and on the reviewer, so what you were experiencing before was an annoying interaction between main shortcuts and reviewer shortcuts (which was my fault).
If you have two functions with the same shortcuts (e.g. you have the default "main add": "a"
and "reviewer choice 1": "a"
then both shortcuts stop functioning).
Actually, since you reinstalled the shortcuts, it possible that the main shortcuts got reset to the defaults (and weren't set to what you had before), which would cause an identical behavior to what was happening before.
Ah, that's frustrating!
For now, switching all the main-window bindings to be behind Alt fixed my issue — arst
now function as I need them to.
Okay, I checked for updates, and it insisted none were available — unless I misunderstand, then, the "main-and-reviewer" behaviour is unavoidable / intended, right now? Because it's definitely still occurring, even though "check for updates" yielded no further changes.
If it is unavoidable, a programmatic check-for-conflicts and an error-message to present to the user might be a great enhancement; but may not be worth the time if I was the only user stupid enough to miss that. 🤣
Yeah the issue with collisions is inherent to the way Anki is built, which does the weird non-functioning shortcut thing if you try to make a shortcut do more than one thing at once.
The conflict detection feature actually exists, but it happened to miss this because it normally catches shortcut collisions within a single context (and I actually didn't realize the main-reviewer interaction existed until you found it here). I'm going to see if I can add a warning for this, because it's definitely annoying to have shortcuts disappear on you.
Problem description
Dae's posted a QT6 beta of Anki. Most of my addons work fine, but unfortunately, that doesn't include Custom Shortcuts.
Information about your Anki set-up
Error message (if any)