Unexpected behavior when exiting the 'browse' window

Unexpected behavior when exiting the ‘browse’ window

In Anki 2.1.37 on Mac, I want to copy into the clipboard the first field of the note of the card current showing. Since the field is in the note but NOT in the card, I need to open the ‘Browse’ window.

Also, I want to do it using the keyboard only.

I type the following keys in a sequence:

B opens the browser
tab moves to the first card in the card browser
tab moves to the second card in the card browser
tab moves to the first field of the note
cmd-A selects the first field
cmd-C copies the first field
esc closes the browser and returns to the main window

This sequence does copy the proper field, as I want. However, after hitting ‘esc’ and closing the browser, one of two things seems to happen randomly.

  1. The card in the main window has not changed. This is the normal behavior that I expect and that I want.

  2. The card in the main window switches to another card from another note. This behavior is unexpected and unwanted. Even more strangely, if I type ‘cmd-Z’ I do not return to the previous card, but to the one before that. It is as if the previous card disappeared from the queue.

I did not notice any pattern allowing to predict when the anomalous behaviour will take place.

Am I wrong in expecting behavior (1) to be the norm? If so, why? If not, what am I doing that causes behavior (2) and how can I avoid it?

My end goal is to create a Keyboard Maestro macro that will copy the field from Anki and paste into another application for further automated manipulations. The problem occurs only when I close the browser window. I did try four different ways to close it (esc; cmd-W; mouse click; window action from Keyboard Maestro) but none led to any improvement.

Thank you for reading this rather long post. Your help will be greatly appreciated.


Anki needs to refresh the list of due cards after edits are made, as the scheduling may have changed, or cards may have been removed. In the future it would be nice if it preserved the current card if it was still available, but currently it not do this, so it may change.

Thank you very much for your reply Damien.

However, I did find the solution to my problem:
instead of pressing ‘B’ to browse the cards, I just press ‘E’ to edit the current one.
Doing so, the list of due cards seems to remain the same.

Thanks again.

1 Like

Good thinking; glad to hear you’ve found a solution.