Add keyboard shortcut to Chrome extension

When working on the linkyard project one of my friends wrote a cool extension for Chrome for sharing links more easily.

I wondered if I can add a keyboard shortcut to invoke it so I don’t have to reach for the mouse every time I want to publish something. I thought that I’d have to modify the code, but there is no need to do that.

In Chrome you can assign hot keys to your extensions manually at the following address.

chrome://extensions/configureCommands

When you type it in your address bar, or go to Settings > Extensions > Keyboard shortcuts (bottom right corner) the following dialog pops up.

A dialog for adding custom keyboard shortcuts to invoke Chrome extensions

Set the desired hot key and you are good to go. No extra code required!


Would you like to get the most interesting content about programming every Monday?
Sign up to Programming Digest and stay up to date!