Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
When the terminal is open and focused, hitting Cmd + Shift + ] (the default keybinding for workbench.action.terminal.focusNext) triggers workbench.action.nextEditor to run instead.
Likewise for workbench.action.terminal.focusPrevious and workbench.action.previousEditor.
Steps to Reproduce
- Open two editors
- Open two terminal groups, and have one of them focused
- Hit
Cmd + Shift + ]to try to switch to the other terminal group - Observe that
workbench.action.nextEditoris run instead, so the next editor is switched to and the Terminal loses focus
Expected Behavior
workbench.action.terminal.focusNext is run, Terminal focus persists, the next Terminal group is switched to
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
Version: 2.3.29
VSCode Version: 1.105.1
Commit: 4ca9b38c6c97d4243bf0c61e51426667cb964bd0
Date: 2026-01-08T00:34:49.798Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 21.6.0
Additional Information
For context, the default keybinding for workbench.action.terminal.focusNext has a When expression of terminalFocus && terminalHasBeenCreated && !terminalEditorFocus || terminalFocus && terminalProcessSupported && !terminalEditorFocus. And the default keybinding for workbench.action.nextEditor has no When expression.
I tried setting the When for workbench.action.nextEditor to !terminalFocus. This worked somewhat, i.e. sometimes allowed workbench.terminal.focusNext to be run instead of workbench.action.nextEditor, but not if the active terminal group is a running process like npm run watch.
I eventually realized that to fix this properly, workbench.action.nextEditor can remain without a When expression, but the When expression for workbench.action.terminal.focusNext needs to be changed to reference terminalFocusInAny instead of terminalFocus. I.e.:
terminalFocusInAny && terminalHasBeenCreated && !terminalEditorFocus || terminalFocusInAny && terminalProcessSupported && !terminalEditorFocus
Does this stop you from using Cursor
No - Cursor works, but with this issue