diff --git a/KNOWLEDGE_BASE.md b/KNOWLEDGE_BASE.md index 60159b584..e8bd9e11e 100644 --- a/KNOWLEDGE_BASE.md +++ b/KNOWLEDGE_BASE.md @@ -503,6 +503,7 @@ Press **?** to open the shortcut reference. Navigation shortcuts work outside te | `s` | Star or unstar the focused commit. | | `c` | Write a commit. | | `⌘/Ctrl+K` or `/` | Search developers and commits. | +| `⌘/Ctrl+B` | Collapse or expand the sidebar on wide screens. | | `⌘/Ctrl+Enter` | Submit from the composer. | | `⌘/Ctrl+Shift+P` | Toggle composer preview. | | `g` then `l` / `e` / `p` / `s` / `n` / `m` / `*` | Go to your log / Trending / profile / settings / Notifications / Remotes / Starred. `g m` works only while Remotes is on. | diff --git a/resources/js/components/app-nav.tsx b/resources/js/components/app-nav.tsx index 37d44786b..1d71ff0ec 100644 --- a/resources/js/components/app-nav.tsx +++ b/resources/js/components/app-nav.tsx @@ -275,6 +275,7 @@ export function AppNav({ const { isNavOpen: sidebarOpen, isLayoutOpen, setNavOpen } = useNavOpen(); const items = useNavItems(); const keys = useKeyLabels(); + const collapseShortcut = keys.combo(keys.mod, 'B'); const iconsOnly = !(useMediaQuery('(min-width: 64rem)') && isLayoutOpen); @@ -377,7 +378,11 @@ export function AppNav({