Customize Google Chrome keyboard shortcuts?

135

31

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?

wip

Posted 2012-11-01T09:00:15.527

Reputation: 5 155

3Is 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 – 2015-04-22T00:14:36.663

1@wil Almost 3 years later, the "Close Other Tabs" command exists now in Shortkeys. – Mike Crittenden – 2015-07-28T03:32:21.830

Another option is vimium although I don't think it can actually rebind C-W.

– mgalgs – 2015-10-16T23:47:04.020

Ctrl + W is annoying when trying to search within nano on Fedora 26 Web Terminal :-/ – Spektakulatius – 2017-10-02T13:05:20.027

1

For Windows users looking for an answer that just works, this is the one: AutoControl Shortcut Manager

– Tim – 2020-02-22T00:09:22.167

2

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 – 2012-11-01T09:19:32.487

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 – 2012-11-02T01:46:23.093

Answers

65

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

cmcginty

Posted 2012-11-01T09:00:15.527

Reputation: 2 249

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 – 2018-11-06T10:25:00.887

2oh, i get it. u need to know that exact titles from somewhere Oo – Zaporozhchenko Aleksandr – 2019-02-13T14:32:26.417

7

For Windows users, the AutoControl shortcut manager extension let's you customize Chrome's shortcuts as well as create your own shortcuts.

– GetFree – 2019-04-03T17:08:01.053

Where can I find a full list of these, e.g. to replace Cmd+L? – Sinjai – 2019-04-30T17:02:53.610

1@Sinjai the list is from the app menu bar. – cmcginty – 2019-05-02T03:13:30.150

@cmcginty do you know where specifically? – CodyBugstein – 2019-08-29T14:06:04.943

16

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. .

systemaddict

Posted 2012-11-01T09:00:15.527

Reputation: 295

1

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 – 2018-05-06T02:40:19.473

1This 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 – 2018-07-28T03:15:22.937

This is just for extensions, but it also lets you override built-in shortcuts, like Ctrl + Q. – nmrugg – 2018-08-20T00:07:13.573

1Be careful and use the exact link: chrome://extensions/shortcuts Without http... – Josem – 2019-03-04T17:07:59.323

@JoelAZ I found this answer looking for a way to change uBlock Origin extension shortcuts, so yes this answer is useful – golimar – 2019-05-10T10:19:59.803

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

Posted 2012-11-01T09:00:15.527

Reputation: 247

1@wil update: this has been in Chrome for some time, just scroll down in the extensions page and click "Keyboard Shortcuts" – skeggse – 2014-06-21T01:06:19.920

11@distilledchaos: That link only allows you to set keyboard shortcuts for apps and extensions, not for the browser in general. – bergie3000 – 2014-08-27T18:35:27.840

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 – 2017-08-25T16:17:20.830

6

@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 – 2019-04-05T20:33:58.520

1(how long will it take Google to provide the trivial feature of customizeable keyboard shortcuts...) – sam boosalis – 2019-06-21T20:47:58.383

10

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

Richt

Posted 2012-11-01T09:00:15.527

Reputation: 173

2Great extension. However, it's supported from Windows XP to Windows 10. No support for other OSs so far. – Mercalli – 2019-06-11T07:57:54.907

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.

Charley Ramm

Posted 2012-11-01T09:00:15.527

Reputation: 175

3This 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ʀʀʏ – 2014-06-21T13:22:43.997

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 – 2015-02-27T07:20:00.973

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 – 2015-04-03T19:45:48.210

You can use the Vimium extension for the j k scrolling and more. – Jadam – 2017-03-13T17:14:32.403

1The plugin link is 404 now. – Eric Wang – 2019-05-20T10:44:01.830

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 – 2013-04-10T02:13:59.893

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.

marts

Posted 2012-11-01T09:00:15.527

Reputation: 161

Shortkeys is nice, but it doesn't work on the new tab page, or when the address bar is in focus – Casebash – 2018-03-19T00:06:35.267

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.

Pysis

Posted 2012-11-01T09:00:15.527

Reputation: 980

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

user179068

Posted 2012-11-01T09:00:15.527

Reputation: 1

1Hi 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 – 2018-12-14T20:18:28.277

-1

I use BetterTouchTool on macOS:

enter image description here

Adam Johns

Posted 2012-11-01T09:00:15.527

Reputation: 131

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.

– I say Reinstate Monica – 2019-05-02T09:34:07.977