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.
I just spent 30 minutes trying to set new shortcuts instead of cmk+k and I am failing to do so. As with most people, I have a motor drive to clear my terminal quite often and every time I hit cmd+k without thinking, ai popup comes up, this is driving me crazy. I have set/changed the shortcuts multiple times, restarted cursor multiple times, its not taking effect, going back to vs code, sorry.
I was looking forward to subscribing but can’t do that if i have to abandon vs code default ctrl+k shortcuts frankly (sadly) and whatever the other non-homogenous things are. At least for me I, who highly configured VS code already, can’t consider cursor–not sure about all the things that are unhelpfully different. (I know i’m personally not the center of the universe, just sharing in case you might want to hear from a coding Karen)