Hotkey-Studycards | implementation ideas?

I’d like to create study cards to help me remember hotkeys for different programs. For example, in Word:

  • Shift + F5: Jumps to the last place of the cursor
  • Ctrl + Alt + S: Splits the edit screen in two
  • Shift + Alt + S: Applies strikethrough

I could make “normal” cards and visualize the key combinations in my mind. However, I’d prefer to actually press the correct key combinations, and if I get it right, the card would be marked as correct.

The first challenge is already that this idea conflicts with Anki’s and the system’s shortcuts .

Does anyone have suggestions on how I can implement this? I would also appreciate critical feedback, even if it’s something like “forget it, too hard.”

1 Like

I don’t think you’d be able to do this using Anki unfortunately. I use an app called KeyCombiner that does exactly what you’re after.

3 Likes

love ya :heartbeat:

1 Like

I don’t think you can have same shortcuts working at the same time with both Anki interface and card scripts. But if you are learning shortcuts that are not a part of the default Anki set or fine with removing/remapping Anki shortcuts to make them available to card scripts (can be done in a separate Anki installation with the same user account to keep Anki shortcuts working when not reviewing the hotkey-studycards), this seems like a pretty straightforward thing.

I have an add-on that includes a removal of existing shortcuts function here (you are looking for the Clear_Shortcuts.py script). For remapping keys you can use this add-on instead.

After a shortcut is made available for the cards, it is a matter of simply parsing the required key combination stored in the Anki field and adding document.onkeydown function to your card, that will compare the event trigger with the questioned shortcut and check additional conditions for Alt/Ctrl/Shift modifiers.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.