Why do Sublime Text and VS Code use Ctrl-Shift-P instead of Ctrl-K for the command bar?

The command bar is a popular interaction technique these days - with a quick keyboard shortcut, you can open a prompt to search, navigate, or run a command. Power users can fly around applications like Slack, Notion, or Figma without ever touching a mouse. 

In the spirit of “Everyone can see what a horse is”, I highly recommend the writeups of the command bar by Maggie Appleton and Chris Coyier - in particular, Chris’s characterization that the purpose of a command bar is to “Run” (run a command), “Jump” (navigate somewhere), or “Search” (list potential options, or fall back to a search if there is no good match). 

But I was curious about one implementation detail: why do code editors Sublime Text and VS Code use Ctrl-Shift-P (or Cmd-Shift-P) for their command bar?

My recent command palette history in Cursor, which is a fork of VS Code (and yes, I use light mode).

Sublime Text pioneered the command bar pattern, but the creator says it wasn’t a unique invention

Sublime Text is often cited as the inspiration for other command bars, so I wanted to dig into its origins. I asked the developer of Sublime Text, Jon Skinner, about the inspiration and choice of keyboard shortcut, and he replied:

I added the Command Palette to Sublime Text in June 2011, but I don't have any notes on what the inspirations were. I'm fairly sure there was precedent for it though, for example, MacOS already had the ability to search through menu items at the time.

The key binding (Ctrl+Shift+P / Cmd+Shift+P) exists though because Sublime Text didn't have the ability to Print for a long time. That freed up Ctrl+P to search through the files in the project, and the Command Palette was a logical extension of that functionality.

Jon Skinner (creator of Sublime Text), personal email to me (March 2025)

So, Ctrl-Shift-P was the natural extension of the existing navigation feature, Go-to-File. As Chris Coyier points out in his writeup (linked above, and here again for convenience), many command bars have now combined navigation (“Jump”) and command-running (“Run”) capabilities. But Sublime Text still splits them across two related shortcuts.

VS Code directly inherits the shortcut from Sublime Text

The command palette in VS Code was present from the start. If you dig back to the initial public commit in 2015 (commit message: “Hello Code”), you’ll find there was already a command palette with the same Ctrl-Shift-P shortcut.

As John Papa wrote in his 2015 Getting Started with VS Code, it also included a Go-To File that was mapped to Ctrl-P, and various other palettes. Although I couldn’t find any explicit attributions, I think direct inspiration is the most likely path - there was also Ctrl-Shift-P in the code editor Atom, released around the same time. 

As I’ve written before, design is path-dependent and keyboard shortcuts are incredibly-sticky; even 40+ years later, Microsoft Excel copies many of the keyboard shortcuts of Lotus 1-2-3, who copied it from the original VisiCalc (1979). Muscle memory is hard to overcome, so why handicap yourself by changing things? 

Why not Ctrl-K instead?

As far as I can tell, Slack popularized the usage of Ctrl-K with the release of the Quick Switcher (2014); note that Slack only uses it to Jump, because traditionally you would Run commands with slash-commands in the chat (which dates back to IRC in the 1990s). 

The choice of Ctrl-K specifically might have been inherited from Firefox’s usage to focus the searchbar (as early as 2011), but I couldn’t find any public record of why Firefox chose Ctrl-K here, too. It’s easy to type in the home row, at least. 

VS Code already had other uses for Ctrl-K

Although VS Code was released after Slack’s Quick Switcher, you can also see that VS Code had already reserved Ctrl-K to start the chording mode used by Visual Studio; e.g., Ctrl-K entered a mode where you could type other different shortcuts. Reddit user jekellyMSFT presumably works for Microsoft, and they explained why:

We call these "chords" - one key sequence, followed by another, to invoke a single command.

This greatly expands the number of possible key bindings you can create.

The trade-off is the first half of the chord becomes unusable for command binding on its own - because VS must see what follows before it can execute the correct command.

As such, we don't want to bind too many characters in chords. Ctrl-K was chosen at some point long ago as a chord to preface a large set of useful, but uncommon Editor/Debugger functions.

Reddit user jekellyMSFT, comment on What’s the deal with ctrl-k?

New applications should probably reach for the command bar instead of chording at all. But again, if you want to preserve the user experience, would you risk breaking backward compatibility?

And, Ctrl-K is also a common keyboard shortcut for hyperlinking

In rich text editors like Microsoft Word, Ctrl-K is universally used for inserting a hyperlink. Code editors like Sublime Text and VS Code work with plain text, so it’s not directly needed; but it’s also a potential conflict in other environments. 

StackOverflow user Chloe points out an interesting conflict when an application tries to provide both command bars and hyperlinks on Ctrl-K: 

Some tools even support both interactions, which is also confusing. In Jira for example, ⌘+K brings up the command palette unless a text input is focused, in which case it inserts a hyperlink.

[...] if a product is about to release a command palette but currently uses ⌘+K to insert a hyperlink, what should they do?

StackOverflow user Chloe: How did CMD-K come to be the standard shortcut for both adding a hyperlink and opening a command palette?

Imagine if an application overloaded Ctrl-C to do something besides “copy” in certain contexts? It would be a recipe for confusion. Yet, that’s where we are with Ctrl-K today.

Tracing back the MacOS inspirations for the command palette

Jon Skinner, creator of Sublime Text and its command palette, mentioned that MacOS already supported similar features at the time. What were those inspirations, exactly?

From the “Jump” perspective of searching to navigate, today we would use Spotlight, first introduced in 2005. But Spotlight descends from application launchers like LaunchBar, first released in 1996

Similarly, the “Run” functionality of searching to run a command, MacOS introduced searching through help menu commands in 2008 with Cmd-? (or Cmd-Shift-/). This shortcut has great symbolism - need help? Type the question mark! And, the use of Cmd-? goes back to at least NeXTStep 3.0 (1992, via the Infinite Mac emulator)

And of course, the idea of typing commands predates any kind of graphical desktop environment or GUI. The idea of using words to express ideas can be attributed to cavemen times, along with a palette to hold the paint for your cave drawings. So as always, these ideas go back pretty far, depending on where you draw the line.

Can you help me draw the timeline for command bars?

In case you haven’t noticed, I’ve fallen into a bit of a historical rabbit-hole here. I’d love to be able to draw a timeline like one for programming languages at the Computer History Museum in Mountain View:

It’ll be an interesting one to draw out, since the “Run” and “Jump” functionality descend from similar-but-different places. This blog post is a good start on the groundwork but it’s also far from the full story. So, if you know anything about these histories, shoot me an email at bobbie@digitalseams.com !

Next
Next

The AI lifestyle subsidy is going to end