eclipse-theia / theia

Eclipse Theia is a cloud & desktop IDE framework implemented in TypeScript.
http://theia-ide.org
Eclipse Public License 2.0
19.29k stars 2.45k forks source link

improved shown keybindings in context menu #13830

Closed jonah-iden closed 2 weeks ago

jonah-iden commented 2 weeks ago

What it does

This improves the visible keybindings in context menus by not showing keybindings that are inactive in the current context.

How to test

For example add a keybinding like this to some keybinding contribution

 {
        command: CommonCommands.UNDO.id,
        keybinding: 'z',
        when: 'notebookEditorFocused',
}

previously this was the always shown as Z in the context menu regardless of if a notebook editor was focused.

Now this should still normally be ctrl/cmd+z but when a notebook editor is focused it should show as Z

Follow-ups

Review checklist

Reminder for reviewers