Repository navigation
Description
Every other command in the palette that has a keyboard equivalent declares a binding. The theme toggle does not, so switching theme means opening the palette and finding it.
The fix
In apps/web/src/lib/navigation.ts, the view:theme entry has no binding property:
{
id: 'view:theme',
label: context.dark ? 'Switch to light theme' : 'Switch to dark theme',
section: 'View',
icon: context.dark ? Sun : Moon,
run: context.toggleTheme,
},Compare it with the entry directly below, view:sidebar, which has binding: '['.
Adding a binding is enough. The shortcut then appears automatically in the ? dialog, because that dialog is generated from the registry rather than from a separate list.
Picking the key
It has to not collide with anything already registered. The existing single-key global bindings are ? and [, and ] is registered in apps/web/src/components/layout/app-shell.tsx. Surface bindings such as j, k, c, s, p, a, l, i, x, f, t, u, h are taken on their own surfaces.
shift+d is probably free and reads as "dark". Suggest what you like on this thread before writing the code if you would rather check first.
Also
- Add a row to the View table in docs/keyboard-shortcuts.md, which currently says the theme toggle has no key of its own
- A test in
apps/web/tests/asserting the binding is registered
Read CONTRIBUTING.md first. The short version: bun run verify must be green, and there are no comments in code.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsReady
Activity
Masad791 commentedon Aug 7, 2026
Hi, I'd like to work on this — can I get it assigned to me? I'll go with shift+d as suggested.
feat(web): add shift+d keyboard shortcut for theme toggle
feat(web): add shift+d keyboard shortcut for theme toggle (Noveum#331)