Skip to content

Commit 35430ea

Browse files
committed
Status bar: Home and end should move focus to start and end of status bar entries
fixes microsoft#97512
1 parent 1495b3c commit 35430ea

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

src/vs/workbench/browser/parts/statusbar/statusbarPart.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -947,6 +947,30 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
947947
}
948948
});
949949

950+
KeybindingsRegistry.registerCommandAndKeybindingRule({
951+
id: 'workbench.statusBar.focusFirst',
952+
weight: KeybindingWeight.WorkbenchContrib,
953+
primary: KeyCode.Home,
954+
when: CONTEXT_STATUS_BAR_FOCUSED,
955+
handler: (accessor: ServicesAccessor) => {
956+
const statusBarService = accessor.get(IStatusbarService);
957+
statusBarService.focus(false);
958+
statusBarService.focusNextEntry();
959+
}
960+
});
961+
962+
KeybindingsRegistry.registerCommandAndKeybindingRule({
963+
id: 'workbench.statusBar.focusLast',
964+
weight: KeybindingWeight.WorkbenchContrib,
965+
primary: KeyCode.End,
966+
when: CONTEXT_STATUS_BAR_FOCUSED,
967+
handler: (accessor: ServicesAccessor) => {
968+
const statusBarService = accessor.get(IStatusbarService);
969+
statusBarService.focus(false);
970+
statusBarService.focusPreviousEntry();
971+
}
972+
});
973+
950974
KeybindingsRegistry.registerCommandAndKeybindingRule({
951975
id: 'workbench.statusBar.clearFocus',
952976
weight: KeybindingWeight.WorkbenchContrib,

0 commit comments

Comments
 (0)