232

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?

I say Reinstate Monica
  • 25,487
  • 19
  • 95
  • 131
wip
  • 6,834
  • 7
  • 28
  • 29
  • 3
    Have you tried searching the Chrome Web Store? If not, here's a link to a shortcuts manager extension - https://chrome.google.com/webstore/detail/shortkeys/logpjaacgmcbpdkdchjiaagddngobkck – VenkatH Nov 01 '12 at 09:19
  • 1
    @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 02 '12 at 01: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 00:14
  • 1
    @wil Almost 3 years later, the "Close Other Tabs" command exists now in Shortkeys. – Mike Crittenden Jul 28 '15 at 03:32
  • Another option is [vimium](https://github.com/philc/vimium/wiki/Key-Mappings) although I don't think it can actually rebind `C-W`. – mgalgs Oct 16 '15 at 23:47
  • Ctrl + W is annoying when trying to search within nano on Fedora 26 Web Terminal :-/ – Pwnstar Oct 02 '17 at 13:05
  • 7
    For Windows users looking for an answer that just works, this is the one: [AutoControl Shortcut Manager](https://chrome.google.com/webstore/detail/autocontrol-shortcut-mana/lkaihdpfpifdlgoapbfocpmekbokmcfd) – Tim Feb 22 '20 at 00:09
  • @VenkatH you forgot to mention it is opensource. ;) – carloswm85 Aug 24 '21 at 22:38

13 Answers13

122

If you're on a Mac then you can do this with the Mac System PreferencesKeyboardShortcuts. https://support.apple.com/guide/mac-help/create-keyboard-shortcuts-for-apps-mchlp2271/13.0/mac/13.0

Here are my current settings:

enter image description here

Simplified procedure:

  1. Open System Preferences -> Keyboard -> Shortcuts tab
  2. From the left, click App Shortcuts.
  3. Click +
  4. Choose 'All Applications' as the app
  5. Choose 'Shut Down...' as the command
  6. Put in whatever shortcut you want.
  7. Restart the app you added the shortcut for
Almenon
  • 326
  • 1
  • 3
  • 12
cmcginty
  • 3,161
  • 5
  • 26
  • 27
  • 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 06 '18 at 10:25
  • 11
    oh, i get it. u need to know that exact titles from somewhere Oo – Zaporozhchenko Oleksandr Feb 13 '19 at 14:32
  • 12
    For Windows users, the [AutoControl shortcut manager](https://chrome.google.com/webstore/detail/autocontrol/lkaihdpfpifdlgoapbfocpmekbokmcfd) extension let's you customize Chrome's shortcuts as well as create your own shortcuts. – GetFree Apr 03 '19 at 17:08
  • 3
    Where can I find a full list of these, e.g. to replace `Cmd+L`? – Sinjai Apr 30 '19 at 17:02
  • 4
    @Sinjai the list is from the app menu bar. – cmcginty May 02 '19 at 03:13
  • @cmcginty do you know where specifically? – CodyBugstein Aug 29 '19 at 14:06
  • 3
    Don't have any shortcuts for chrome – Bolein95 Apr 18 '20 at 05:37
  • Chrome Mac: `Cmd + d` to for `Next Tab to the Right` didn't work for me. – Sridhar Sarnobat Aug 06 '21 at 21:31
  • 2
    This is very useful. However, I want to map "jump to 1st tab" which is `cmd+1` to `ctrl+1`. However it's not in the menu, and I couldn't guess what it is – nemo May 19 '22 at 10:18
  • 1
    @SridharSarnobat It's the bookmark shortcuts by default, you'd better choose another one. e.g., I'd like `cmd+2` for "Select Previous Tab" and `cmd+2` for "Select Next Tab", since `cmd+1` for "Select the 1st Tab" by default (I want set `cmd+4` for "Select the Last Tab" instead of default `cmd+9`, but failed), then I can switch tabs with left hand, and use Trackpad with right hand. – Míng Aug 30 '22 at 01:36
  • Unfortunately, Mac isn't letting me use Command+PgDn and Command+PgUp as shortcut keys :-/ – Noel Yap Sep 13 '22 at 02:56
58

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.

enter image description here

Sridhar Sarnobat
  • 1,395
  • 2
  • 13
  • 25
systemaddict
  • 808
  • 6
  • 4
  • 2
    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](https://superuser.com/review/late-answers/754042) – fixer1234 May 06 '18 at 02:40
  • 3
    This is just for extensions, but it also lets you override built-in shortcuts, like Ctrl + Q. – nmrugg Aug 20 '18 at 00:07
  • 2
    Be careful and use the **exact** link: _chrome://extensions/shortcuts_ **Without** http... – Josem Mar 04 '19 at 17:07
  • 3
    @JoelAZ I found this answer looking for a way to change uBlock Origin extension shortcuts, so yes this answer is useful – golimar May 10 '19 at 10:19
  • During the process of customizing shortcuts, you need to be aware of what shortcuts are already assigned or designated via extensions. This page will give you that oversight. – systemaddict Aug 04 '20 at 20:37
  • It's also worth saying that the vanilla extensions/shortcuts doesn't allow you to map to keys like "Alt+Tab". To do it, you need to hack it with the console by running something like: chrome.developerPrivate.updateExtensionCommand({ extensionId: "logpjaacgmcbpdkdchjiaagddngobkck", commandName: "03-nexttab", keybinding: "Alt+Tab" }); – Nether Nov 26 '20 at 15:45
  • This worked for me with the Shortkeys extension for using Cmd Shift J to move to the next tab in Chome on mac. – Sridhar Sarnobat Aug 06 '21 at 21:33
  • As of Ubuntu 21.04/Chrome 94.0.4606.81, all this does is enable me to create shortcuts to open my extensions. – Chaim Eliyah Oct 11 '21 at 03:25
  • This extension helped. The annoying thing about Mac and Chrome, is that you have to use Ctrl Page Up/Down to move around with tabs, but cmd to reopen/close tabs. This disconnect is highly annoying to me, and makes more sense to change the Ctrl to just be cmd. Thank you for this answer, it worked for me. – tisaconundrum Sep 14 '22 at 16:44
22

This has been possible for quite some time already, at least on Windows.
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

Richt
  • 392
  • 3
  • 6
  • 8
    Great extension. However, it's supported from Windows XP to Windows 10. No support for other OSs so far. – Mercalli Jun 11 '19 at 07:57
  • 2
    AutoControl Shortcut Manager requires a separate Windows executable installation. VirustTotal flags that executable as Adware. No thanks. – Lester Buck May 17 '20 at 15:41
  • 1
    @LesterBuck, I've just checked VirusTotal and it says 6 out 72 engines detected the file. And none of those 6 engines are prominent antivirus solutions. Can you share a link to the VT results you saw? – Richt May 19 '20 at 11:01
  • 1
    @Richt 5/68 now: https://www.virustotal.com/gui/file/9fcafcd6d615c6dc65389ad0bc81073fa5d8fa02f1d3e5d27b93212a112cd449/detection – Cees Timmerman Sep 06 '20 at 13:53
  • 6
    This should be marked as the answer, at least for Windows users. Finally, I don't have to reach around to press Ctrl+W to close a tab with my right ('navigation') hand (I've added Ctrl+/). – Dade McDade Feb 07 '21 at 10:06
  • 1
    Amazing project! Thanks! – TuralAsgar May 07 '21 at 14:41
11

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.

zzbomb
  • 255
  • 1
  • 5
  • 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 01:06
  • 13
    @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
  • 7
    @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](https://www.autocontrol.app) – GetFree Apr 05 '19 at 20:33
  • 4
    (how long will it take Google to provide the trivial feature of customizeable keyboard shortcuts...) – sam boosalis Jun 21 '19 at 20:47
  • the http://developer.chrome.com/trunk/apps/commands.html link is now broken – Colin D Jul 08 '22 at 16:12
5

Go to this website: https://www.autocontrol.app/

And download and install their chrome extension, everything is done automatically.

DEAD Simple to add any custom shortcuts from keyboard to mouse.

All u do is add a new function, then click a button, then you tell what this button does on chrome.

S To
  • 59
  • 1
  • 2
5

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.

Ben Wheeler
  • 115
  • 7
Charley Ramm
  • 175
  • 1
  • 3
  • 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 02: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 07: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 03 '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
    The plugin link is 404 now. – Eric May 20 '19 at 10:44
4

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.

marts
  • 204
  • 1
  • 8
  • 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 00:06
  • Shortkeys is discontinued (today being 2021.02.17) – Dade McDade Feb 07 '21 at 09:55
  • @DadeMcDade do you have a source for this? The website is still up and the extension available to install. I no longer use Chrome nor the extension so I can't check for myself. I would edit my answer if this is true. – marts Jul 18 '21 at 22:27
  • I can't say that I remember. But you're right - I just checked, and it's available. – Dade McDade Jul 20 '21 at 08:50
  • Just installed Shortkeys and it works with NixOS 21.05 and Gnome 4. It also allows to create new tabs, or change the previous tab and next tab shortcuts. To do that, go to: `chrome://extensions/shortcuts` and Shortkeys will have added a bunch of options that can be remapped. – jun Sep 22 '21 at 17:52
4

I use BetterTouchTool on macOS:

enter image description here

Adam Johns
  • 231
  • 3
  • 11
  • 1
    Welcome to Super User. Please read [How to Recommend Software](https://meta.superuser.com/a/5330/213131) 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. – I say Reinstate Monica May 02 '19 at 09:34
4

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.

Pysis
  • 1,080
  • 2
  • 12
  • 25
1

I found a couple ones working on my Mac:

Simple one: https://chrome.google.com/webstore/detail/tab-manager-shortcuts/oofoadncochbkbpebpbndghocapamchi

More options: https://chrome.google.com/webstore/detail/keyboard-shortcuts/lplcmnhgijkkmflbmhabnccgelffpnog

TotalAMD
  • 111
  • 2
  • simple and do not need any permission, this rocks and should be the accepted answer, most of the other extensions ask for 1000 permission to change the shortcuts!!! – Badr Elmers May 27 '23 at 13:42
1

if you wanna some High Frequency chrome shortcut using by keyboard, I really recommend you VimiumC, it is an improved version of Vimium.

install here: https://chrome.google.com/webstore/detail/vimium-c-all-by-keyboard/hfjbmagddngcpeloejdejnfgbamkjaeg

source and issue here: https://github.com/gdh1995/vimium-c

Vimium C Options

  • it is so easy to set shortcut to control your chrome, like map <c-w> closeOtherTabs combination Ctrl+W to the command "Close Other Tabs"
  • and key "z" and "c" made by myself for go left and right tab
  • and key "s" also made by myself for selected words on webpage for Google search in another tab
  • VimiumC already set key "x" as close tab and "X" as re-open closed tab by default

So convenient, simple and fast, all in your fingers

but, the bad part is, VimiumC can not run on chrome safe page, like "chrome://" and "https://chrome.google.com/" or blank page and unloaded pages which need javascript

J.Z
  • 211
  • 2
  • 2
1

For Windows you can remap keys for specific applications (e.g. Chrome) using Microsoft PowerToys - https://docs.microsoft.com/en-us/windows/powertoys/

e.g. I swapped my Alt and Ctrl keys for all applications, which broke the Alt+D shortcut in Chrome, so remapped it to Ctrl+L to select the address bar url -

shot

shot2

Brian Burns
  • 700
  • 8
  • 14
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