In VSCode, the Command-K shortcut (Ctrl-K on PC) is used as the first half of a bunch of chorded keyboard shortcuts. For example, the shortcut to close all editors is to press Command-K and then Command-W. But in Cursor, Command-K is used to issue a code instruction to the AI.
How do I access the various keyboard shortcuts bound to Command-K?
Thanks for reporting this. What would your desired solution be here? We switch the default AI editing binding from Command K to something else? Or we switch the chorded keybinding?
I think right now we’re planning on trying out switching the chorded to keybinding to Command R if people like that.
I updated mind to use cmd+option+L and cmd+option+K, to avoid existing shortcuts. Would probably make a good default.
The bigger problems I encountered were:
These new keyboard shortcuts were wiped out (i.e. reset to Cursor’s default) after updating Cursor yesterday.
The keyboard shortcuts were hard to set, for me, just trying to get option+cmd+L to toggle the sidebar open & close. I finally figured out that workbench.panel.aichat.view.toggleVisibility doesn’t seem to work for this and that aichat.close-sidebar only works if the text input within the chat is not focused. Since it focuses automatically when opening the sidebar, it’s impossible to set up a shortcut that simply toggles the chat open > close > open > close > etc).
There is room for improvement in consistent naming–Cursor’s current commands are a mix of kebab case (aichat.close-sidebar), all one word (aichat.opensidebar), or camelCase (aichat.switchToMostRecentChat), etc meaning when this is fixed, I’ll probably end up losing my shortcuts again anyway.