112

I would like to customize keyboard shortcuts in Google Chrome.

For example, I would like to map the key combination Ctrl+Shift+W to the command "Close Other Tabs" instead of right-clicking on a tab (default command).

Is there any setting in Chrome to set this combination to that command?

  • 2
    Have you tried searching the Chrome Web Store? If not, here's a link to a shortcuts manager extension - chrome.google.com/webstore/detail/shortkeys/… – VenkatH Nov 1 '12 at 9:19
  • @VenkatH Thank you for the hint ! Unfortunately, "Close Other Tabs" is not a command supported by the "Shortkeys" extension, so it does not fill my need. – wip Nov 2 '12 at 1:46
  • 3
    Is there a way to remove keyboard shortcuts? I want to use the shortcuts built into Tumblr but it conflicts with the ones already built into chrome and none of the extensions I could find edit already existing ones... – Cyberson Apr 22 '15 at 0:14
  • 1
    @wil Almost 3 years later, the "Close Other Tabs" command exists now in Shortkeys. – Mike Crittenden Jul 28 '15 at 3:32
  • Another option is vimium although I don't think it can actually rebind C-W. – mgalgs Oct 16 '15 at 23:47
42

If you're on a Mac then you can do this with the Mac System PreferencesKeyboardShortcuts. https://apple.stackexchange.com/a/174979/1443

Here are my current settings:

enter image description here

  • This is great, but unfortunately it did not work with cmd+shift+c for some bizarre reason. I wanted to open the javascript console with cmd+shift+c instead of cmd+option+j – Doug Nov 6 '18 at 10:25
  • 1
    oh, i get it. u need to know that exact titles from somewhere Oo – Zaporozhchenko Aleksandr Feb 13 at 14:32
  • 5
    For Windows users, the AutoControl shortcut manager extension let's you customize Chrome's shortcuts as well as create your own shortcuts. – GetFree Apr 3 at 17:08
  • Where can I find a full list of these, e.g. to replace Cmd+L? – Sinjai Apr 30 at 17:02
  • @Sinjai the list is from the app menu bar. – cmcginty May 2 at 3:13
12

Looks like this feature is 'on the way' but not in the main release cycle yet. Found an article that describes the feature being implemented in the development build, #22. Or at least partially to allow some features to be shortcut-ed Ref: http://googlesystem.blogspot.com/2012/08/create-keyboard-shortcuts-for-chrome.html

That post mentions an experimental API for more types of actions linked to shortcuts which can be found.. here: http://developer.chrome.com/extensions/experimental.commands.html

Of course that's all in the development stage still.


Edit (2018): This is partially possible with the commands api which has been out for a couple years. http://developer.chrome.com/trunk/apps/commands.html

It's pretty restricted still since you cant replace the ones that are supplied by the browser and im not sure how much is exposed there for things like dev tooling.

  • 1
    @wil update: this has been in Chrome for some time, just scroll down in the extensions page and click "Keyboard Shortcuts" – skeggse Jun 21 '14 at 1:06
  • 10
    @distilledchaos: That link only allows you to set keyboard shortcuts for apps and extensions, not for the browser in general. – bergie3000 Aug 27 '14 at 18:35
  • Going with cVim extension, I guess - I realize that isn't going to be an option for many people, but...it is for me! – dsummersl Aug 25 '17 at 16:17
  • 4
    @MikeyE, This is now finally possible through something called "native extensions". Here is one such extension that can customize Chrome's shortcuts once and for all: AutoControl Shortcut Manager – GetFree Apr 5 at 20:33
6

Update: As of Feb 2017, this plugin is no longer available.

There is a Chrome plugin called Shortcut Manager which can do this.

I just used it to create shortkeys for j and k to scroll up and down. It also has 'close other windows' available to map to a short-key.

  • I installed the plugin, unfortunately for some reason it is impossible to set the combination I want "Ctrl+Shift+W" into the input box (when I try to, the pop-up asking me if I want to leave the page appears). – wip Apr 10 '13 at 2:13
  • 3
    This doesn't seem to override the default functionality. I am trying to add a ALT+ENTER ".com" shortcut for the URL bar (for subdomains) and it still uses the default functionality of doing a search. – Gaʀʀʏ Jun 21 '14 at 13:22
  • I added Ctrl+G to open favorite page , earlier it seemed not working but after restarting chrome it started working. Ctrl+G has default function of searching next in chrome , this extension overrides it. – Vins Feb 27 '15 at 7:20
  • This doesn't work for Mac when I try to set "Ctrl+Page Up" to go to the previous tab. (Actually Cmd+Page Up since I switched those two keys) – andrewtweber Apr 3 '15 at 19:45
  • You can use the Vimium extension for the j k scrolling and more. – Jadam Mar 13 '17 at 17:14
5

Not entirely the answer for general shortcuts, but still relative and somewhat cumbersome to find, chrome://extensions/shortcuts allows you to customize behaviors from a shortcut. I'm sure you could find/make an extension to reroute / transpose all of the shortcuts you want to use to control chrome as you see fit. .

  • This is pretty light on the "how"; it's more of a suggestion for an area to investigate in order to create a solution. Can you flesh it out? As-is, it would probably be more appropriate as a comment. From review – fixer1234 May 6 '18 at 2:40
  • 1
    This is not just "light" on the how, this is completely useless and pointless. The in-built shortcuts do not even appear there, only actions of add-ons that the add-ons choose to expose as shortcut-able. And as pointed out elsewhere, the desired shortcut of ctrl+w is not accessible, even to extensions. – JoelAZ Jul 28 '18 at 3:15
  • This is just for extensions, but it also lets you override built-in shortcuts, like Ctrl + Q. – nmrugg Aug 20 '18 at 0:07
  • 1
    Be careful and use the exact link: chrome://extensions/shortcuts Without http... – Josem Mar 4 at 17:07
  • @JoelAZ I found this answer looking for a way to change uBlock Origin extension shortcuts, so yes this answer is useful – golimar May 10 at 10:19
3

The extension in Charley Ramm's answer no longer exists, but I found a different one: Shortkeys

Add to Chrome, press options. I'm using it to bind forward/backwards keys to my Naga Hex V2, which is not supported on linux at the moment. The reviews suggest that some people have problems using it. It works fine for me, Linux Mint 18 + Dell multimedia keyboard.

Restart Chrome after changing the keybindings.

  • Shortkeys is nice, but it doesn't work on the new tab page, or when the address bar is in focus – Casebash Mar 19 '18 at 0:06
3

This has been possible for quite some time already.
There's a new kind of extensions for Chrome called "native extensions" that can customize Chrome shortcuts and other cool things.

AutoControl Shortcut Manager is exactly for this purpose.

There are no restrictions on the shortcuts you can create or customize. You can even disable shortcuts if you assign no action to them.

In the specific case asked in the question, Ctrl+Shift+W for closing "other tabs" looks like this:

enter image description here

2

As described in the comments of another answer, I am also wanting to disable the "Cmd+Shift+W" shortcut for close window, and incidentally the similar shortcut that appears when I disable the first, which now stands for "Close All".

  • I simply went to the Mac's Keyboard preference pane, in the "Shortcuts" tab, in "App Shortcuts" section, and went to create new shortcut mappings.
  • I made these for Google Chrome and chose that as the first parameter, but I guess you could fix a similar problem in any other application by selecting the one you want instead.
  • I then proceeded to name the menu entry that I wanted to replace, such as those I mentioned above.
  • Lastly, I assigned it a complex key combination, one that I would hopefully never accidentally press in the future.

It's not the best approach, and I am currently reading into another question and answer "How to disable keyboard shortcuts in mac os x" which may remove the shortcut completely, but it works well enough through the existing system interface without having to install any additional software as a limited Google Chrome Web Extension or system application.

0

While I know this isn't the exact solution you were looking for it may be helpful to some as it was to me. This Chrome extension make many advanced shortcuts possible via the use of mouse gestures: CrxMouse Chrome™ Gestures

  • 1
    Hi user, welcome to Super User! Questions that are essentially links are discouraged. Can you explain why that is the solution, maybe include screen shots of it in action, etc? – Canadian Luke Dec 14 '18 at 20:18
-1

I use BetterTouchTool on macOS:

enter image description here

  • Welcome to Super User. Please read How to Recommend Software then edit your answer to include at least the minimum required information (the items in bold). Posts without this information may be subject to deletion. Thanks for contributing. – Twisty Impersonator May 2 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.