Repository navigation
Description
What happened?
Environment
- TablePro 0.74.0 (build 130)
- macOS 15.7.9 (24G830), Apple Silicon (arm64)
- Settings > Editor > Vim mode: enabled
- Database type: MySQL
- Input method: ABC (no IME marked text active)
- Hammerspoon is running, but its only key interception is Option+E — Escape is not remapped
Summary
After switching between Insert and Normal mode a few times, pressing Esc from Insert mode no longer returns to Normal mode. The mode badge stays on INSERT. Ctrl+[ still works. Restarting the app fixes it, but the problem comes back.
Steps to reproduce
- Enable Vim mode in Settings > Editor.
- Open two connections, each in its own window.
- In a query tab, press
ito enter Insert mode and type some SQL. - Press
Esc(works at this point), then toggle Insert/Normal a few more times. - Press
Escfrom Insert mode again.
Expected
Esc returns to Normal mode (as documented in the Vim Mode docs).
Actual
Nothing happens; the mode badge stays on INSERT. Cmd-based shortcuts (e.g. Cmd+Enter) still work.
Workarounds tried
Ctrl+[always switches back to Normal mode — this is the only reliable way out of Insert mode while the bug is active.- Closing one of the two connection windows did not help.
- Quitting and relaunching TablePro fixed it;
Escworked again afterwards. - The Edit menu's "Clear Selection" item is still bound to bare
Esc(Settings > Keyboard > Data Grid); I have not changed it.
Additional context (source reading, 0.74.0 tag)
Escape appears to have four competing paths in this build, which may be where the state gets wedged:
VimKeyInterceptor.handleKeyEvent— theevent.keyCode == 53branch that hands Escape to the Vim engine.SuggestionController.handleKeyDown—case kVK_Escape: close(); return nil, which consumes the keystroke.- The popup's
NSWindow.willCloseNotificationobserver inVimKeyInterceptor, which re-dispatches Escape to the engine. - The bare-Escape key equivalent on Edit > Clear Selection (
KeyboardShortcutModels.swift:565,.clearSelection: .special(.escape)), with the external-source hand-off inEditorEventRouter.handleEscapeFromMenu()→handleEscapeFromExternalSource().
I couldn't attach logs: log show --last 10m --predicate 'subsystem == "com.TablePro"' produced no output on my machine, and a live log stream capture was also empty. Happy to run any diagnostic you suggest.
Steps to reproduce
No response
Expected behavior
No response
Database type
None
TablePro version
0.76.0
macOS version & chip
macOS 15.7.9 (24G830), Apple Silicon (arm64)
Screenshots / Logs
No response
Activity
fix(editor): give the editor one key-down chain so Esc always leaves …