Hi everyone,
I’m developing an addon that allows users to type in their cloze deletions, and I want to add a feature where hitting “Return” focuses on the text input field. However, this conflicts with Anki’s default “flip card” shortcut. I know about addons like “Customize Keyboard Shortcuts” that can disable this globally, but I only want to disable the Return shortcut when users are reviewing cards from one specific deck - not system-wide.
My understanding is that Anki shortcuts are typically initialized at launch, and addons like Customize Keyboard Shortcuts work by rebuilding Anki’s shortcuts object with custom values. Is there a way to modify shortcuts dynamically when a user enters a review session for a specific deck, and then restore the original shortcuts when they’re done?
Thanks!