Refining Arrow Key Behavior in Anki’s Sidebar Tree

:compass: Suggestion: Improve Arrow Key Navigation in the Anki Browser Sidebar

Thank you for your valuable work on developing and improving Anki.

Currently, in the Anki Browse sidebar, using the up/down arrow keys (↑ ↓) navigates through all expanded items, regardless of their depth or level in the tree structure. This behavior can make it difficult and time-consuming to move through large, deeply nested trees — especially when a user simply wants to move between items on the same level.

Take a look at the image:

Suppose a user wants to navigate using only the arrow keys from Saved Searches to Basic (which is a sub-item under Note Types). In the current behavior, the user must traverse all visible branches and sub-branches in between.
This is because the up/down arrows move linearly through all visible entries, rather than staying within a single column or hierarchy level.
However, moving between a parent and its children (or vice versa) should be handled by the right/left arrow keys (→ ←), not up/down.

:pushpin: The related screenshot will be added later.

:wrench: Proposed Behavior:
We suggest adjusting the navigation behavior so that:

  • The up/down arrow keys only move between items on the same level.
  • Moving into or out of sub-levels (i.e., expanding into children or collapsing to a parent) should be handled only via the right/left arrow keys.

:white_check_mark: Benefits of This Change:

  • Navigation between items will become simpler, faster, and more intuitive.
  • User experience will improve significantly when working with complex hierarchical structures.
  • The interface will feel more natural and predictable, as the up/down keys would move vertically within the same level, rather than diagonally or across tree depths.

Linking to the add-on:

https://ankiweb.net/shared/info/1467361433

1 Like

What problem does this proposal solve?

And please don’t use AI to answer. I’ve read the “Benefits of This Change” paragraph, but I still don’t understand.

Look at the picture. In the ideal case, to move from “Saved Searches” to “Basic” (under the Note Types ), you would only need to press the down arrow key 5 times.

However, with Anki’s current behavior, since the down arrow doesn’t move strictly between siblings but instead dives into all expanded branches, you have to press the down arrow more than 20 times to reach “Basic” from “Saved Searches.”

But isn’t that normal behavior? I’d be quite confused if it behaved the way you propose.

You can press the button without releasing it until you reach the desired point. Or collapse the sections using the left arrow.

2 Likes

It’s confusing because you’re used to the current behavior.
The suggested functionality is also implemented in the powerful Freeplane software. It’s the same in other tree-structured display software as far as I know.

See this comment. Idea: Change the behavior of the up and down arrow keys without losing any functionality with many benefits. · freeplane/freeplane · Discussion #2169 · GitHub

There was a lot of discussion on that page.
In the end, the current proposal I put forward was implemented.
Of course, the discussions are very complicated.

Every software (that includes tree views) I ever used uses the following:
: Jump to parent and hide children.
: Expand children or sub-children.
and : Navigate between the elements.

I actually do have freeplane installed, though I rarely use it. I couldn’t find a classical tree view in freeplane though.

(In case you’re talking about the navigation in the mindmap: that’s not really a tree view like the actual tree view ui element. So them behaving differently is expected)

I gave the following example:
“Suppose a user wants to navigate using only the arrow keys from« Saved Searches to Basic (which is a sub-item under Note Types). In the current behavior, the user must traverse all visible branches and sub-branches in between.”
Suppose the user does not want to collapse any of the sections

Folding is just one of the examples that I have given.

I experimented with the arrows and the ctrl, shift, alt keys. I noticed that Anki doesn’t use any. Instead of changing everything, why not add this functionality using these keys? For example, the desired behavior will occur when using ctrl + down arrow or ctrl + up arrow.

2 Likes

You’re overlooking –

  • Page up/down
  • The sidebar search box – Browsing - Anki Manual
  • The mouse
  • The fact that the right/left arrows are already used for expanding/collapsing