What Does Ctrl+K or Cmd+K Do in Desktop Browsers?

Pressing Ctrl+K on Windows or Linux, or Cmd+K on macOS, focuses the browser's address bar and switches it directly into search mode. Instead of treating your input as a website URL or showing standard address bar suggestions, the browser prepares to send your query straight to your default search engine, which is typically Google Search.

How the Shortcut Works

When you press Ctrl+K (or Cmd+K on a Mac) while browsing, two things happen simultaneously:

  1. Focuses the address bar: Your cursor jumps immediately to the address bar (also known as the omnibox in Chrome), no matter where you were on the page.
  2. Activates search mode: In browsers like Google Chrome and Microsoft Edge, the address bar inserts a question mark (?) or displays a "Search Google" (or your default search engine) indicator. Any text you type afterward is treated strictly as a search query.

Why Use Search Mode Instead of Just Typing in the Address Bar?

Normally, you can type a search term directly into the address bar and press Enter. However, Ctrl+K / Cmd+K is especially useful in a few specific situations:

  • Searching for URLs or domain-like terms: If you want to search for something that contains a dot or slash (such as example.com or localhost:3000) without the browser trying to navigate to it directly, search mode forces it to be a Google Search query.
  • Avoiding autocomplete distractions: It signals to the browser that you want to search the web rather than jump to a bookmarked page or browsing history item.
  • Faster keyboard navigation: You do not need to reach for your mouse to click the address bar or open a new tab just to run a quick search.

Browser Differences

While Ctrl+K / Cmd+K is widely supported, its exact behavior can vary slightly depending on the browser:

  • Google Chrome & Microsoft Edge: Focuses the address bar and prepends a ? to put the omnibox into search mode using your default search engine.
  • Mozilla Firefox: Focuses the address bar in search mode (or focuses the separate search bar if you have enabled it in Firefox's toolbar settings).
  • Safari: Uses Cmd+L to focus the address bar, while Cmd+Option+F is the traditional shortcut to jump to the search field.

If you ever want to cancel search mode after pressing Ctrl+K or Cmd+K, simply press Backspace to remove the search prefix or Esc to return focus to the webpage.