Skip to content

Instantly share code, notes, and snippets.

@aksh1618
Created March 30, 2025 15:21
Show Gist options
  • Select an option

  • Save aksh1618/c14e1b50bf01dc5d2bc36416efc411f6 to your computer and use it in GitHub Desktop.

Select an option

Save aksh1618/c14e1b50bf01dc5d2bc36416efc411f6 to your computer and use it in GitHub Desktop.
Steps for adding Ctrl+Tab support in Chromium based browsers (Chromium, Google Chrome, Edge etc.)

Ctrl + Tab in Chromium Based Browsers

  1. Install the CLUT: Cycle Last Used Tabs extension (e.g. from chrome web store)
  2. Go to Manage Extensions page (chrome://extensions/shortcuts)
  3. Open console (Right Click -> Inspect -> Tab named "Console")
  4. Past this script, and press Enter:
    // Find the id and command for the CLUT extension in this chromium based
    // browser. It will run something like:
    // chrome.developerPrivate.updateExtensionCommand({
    //     extensionId: "cobieddmkhhnbeldhncnfcgcaccmehgn",
    //     commandName: "alt_switch_fast",
    //     keybinding: "Ctrl+Tab"
    // });
    // Inspired by https://fwextensions.github.io/QuicKey/ctrl-tab/ but not
    // using QuicKey as it was not providing the actual seamless switching
    // experience and instead depended on a popup.
    chrome.developerPrivate.getExtensionsInfo().then((extensions) => {
      // Find the CLUT extension by checking its name
      const clutExt = extensions.find(ext => ext.name.includes("CLUT"));
      if (!clutExt) return console.error("CLUT extension not found.");
    
      // Select the command whose description contains "quick"
      const quickCmd = clutExt.commands.find(cmd => 
        cmd.description.toLowerCase().includes("quick")
      );
      if (!quickCmd) return console.error("No command with 'quick' found.");
    
      // Update the extension command using the retrieved values
      chrome.developerPrivate.updateExtensionCommand({
        extensionId: clutExt.id,
        commandName: quickCmd.name,
        keybinding: "Ctrl+Tab"
      });
    });
  5. Confirm it worked by looking at shortcuts for CLUT: Cycle Last Used Tabs in the Keyboard Shortcuts tab of the Manage Extensions page: it should say Ctrl + Tab next to the Quick switch option in the list.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment