267

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
  • 7,444

15 Answers15

136

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
  • 446
cmcginty
  • 3,431
70

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

25

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
  • 422
  • 5
  • 6
11

It looks like this feature is 'on the way', but it is not in the main release cycle yet. I 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: Create Keyboard Shortcuts for Chrome Extensions

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.


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 can’t replace the ones that are supplied by the browser and I’m not sure how much is exposed there for things like developer tooling.

zzbomb
  • 255
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.

5

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
  • 224
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
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,100
3

I use BetterTouchTool on macOS:

enter image description here

2

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

1

If you want to some high frequency Chrome shortcuts using by a keyboard, I really recommend you VimiumC. It is an improved version of Vimium.

Install here: Vimium C - All by Keyboard Vimium C - All by Keyboard

The source and issue are here: Vimium C - All by Keyboard (GitHub)

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

It is so convenient, simple and fast, and is all in your fingers.

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

J.Z
  • 211
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

0

https://arc.net/ is a Chromium browser that supports changing shortcuts in its settings. enter image description here

HappyFace
  • 1,389
0

I recommend using Brave. It's exactly chrome with keyboard shortcuts (and some other features which I disable).

  • Use Cmd/Ctrl+Shift+P to get a command bar.
  • Set your own custom keyboard shortcuts.
  • Use F7 to surf websites with caret (arrow keys).
Vahid
  • 111