microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.38k stars 28.94k forks source link

Breadcrumbs keyboard navigation shortcuts #58930

Closed jon301 closed 6 years ago

jon301 commented 6 years ago

Hi

It is currently possible to customize horizontal breadcrumbs navigation :

    {
        "key": "ctrl+l",
        "command": "breadcrumbs.focusNext",
        "when": "breadcrumbsActive && breadcrumbsVisible"
    },
    {
        "key": "ctrl+h",
        "command": "breadcrumbs.focusPrevious",
        "when": "breadcrumbsActive && breadcrumbsVisible"
    },

However there is no way to customize vertical navigation. The only way to navigate through the tree is to use keyboard arrows. I guess it would be nice to have 3 more breadcrumbs commands, something like : breadcrumbs.focusDown, breadcrumbs.focusUp, and breadcrumbs.toggleFolder

Thanks for your amazing work.

Cheers

yume-chan commented 6 years ago

They are list.focusUp, list.focusDown and list.expand, and I believe the Code team doesn't want more shortcuts names.


    {
        "key": "ctrl+h",
        "command": "breadcrumbs.focusPrevious",
        "when": "breadcrumbsActive && breadcrumbsVisible"
    },
    {
        "key": "ctrl+j",
        "command": "list.focusDown",
        "when": "breadcrumbsActive && breadcrumbsVisible"
    },
    {
        "key": "ctrl+k",
        "command": "list.focusUp",
        "when": "breadcrumbsActive && breadcrumbsVisible"
    },
    {
        "key": "ctrl+l",
        "command": "breadcrumbs.focusNext",
        "when": "breadcrumbsActive && breadcrumbsVisible"
    }
jon301 commented 6 years ago

Thanks @yume-chan ! <3 Where did you find that these shortcuts would interact with the breadcrumbs picker ? I'm always struggling to find out if one already exists or which is the good one.

yume-chan commented 6 years ago

I remember that at some time the Code team merged all list shortcuts into list.*.

Thus now anything looks like a tree view should obey these shortcuts.