[bug] ⌘/ doesn't toggle comments in the file editor — the menu's Keyboard Shortcuts accelerator takes it
What happens
In the built-in file editor, pressing ⌘/ (Ctrl+/ on Windows/Linux) doesn't comment or uncomment the line or selection. It opens Settings → Keyboard Shortcuts instead.
Why
The editor's CodeMirror keymap does include defaultKeymap, which binds Mod-/ to toggleComment, in both editors:
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/FilePane/registry/views/CodeView/components/CodeEditor/CodeEditor.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/components/CodeEditor/CodeEditor.tsx
But the app menu registers the same chord as a native accelerator for the shortcuts page (apps/desktop/src/main/lib/menu.ts):
const showHotkeysAccelerator = "CmdOrCtrl+/";
// ...
accelerator: showHotkeysAccelerator,
click: () => menuEmitter.emit("open-settings", "keyboard"),Electron menu accelerators fire before the renderer sees the keydown, so CodeMirror never gets Mod-/. The renderer hotkey registry already has a separate binding for this page (SHOW_HOTKEYS = ⌘⇧/), so the menu accelerator is the only thing that conflicts.
Workaround
Alt+Shift+A (CodeMirror's toggleBlockComment) still works, but it inserts a block comment, not a line comment.
Expected
⌘/ / Ctrl+/ toggles line comments whenever the code editor has focus, like in VS Code and other editors. One fix: move the menu item's accelerator to ⌘⇧/ to match SHOW_HOTKEYS, or drop it so ⌘/ goes to the editor.
Source: superset-sh/superset