Windows 10 will reach EOS (end of support) on October 14, 2025. For more information, see this article.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Open a website with a keyboard shortcut.

  • 3 replies
  • 2 have this problem
  • 68 views
  • Last reply by MahmoudJ

more options

Hello,

Is there a way to open a website (in a new tab) with a keyboard shortcut. For example, use Alt+X to open google.com and Alt+V to open gmail.com

Thanks in advance

Hello, Is there a way to open a website (in a new tab) with a keyboard shortcut. For example, use Alt+X to open google.com and Alt+V to open gmail.com Thanks in advance

Modified by MahmoudJ

Chosen solution

A possibility might be to use the PrefBar extension.

This extension allows to define buttons and add a shortcut key to the button.

This is probably the easiest way with a direct URL:

gBrowser.selectedTab = gBrowser.addTab("<URL>");

You can use a bookmark with a keyword assigned with this code (replace <keyword> with the actual keyword):

[shortcutURL,postData] = PlacesUtils.getURLAndPostDataForKeyword("<keyword>");
gBrowser.selectedTab = gBrowser.addTab(shortcutURL);
Read this answer in context 👍 0

All Replies (3)

more options

I can't think of a built-in way to do this.

The closest feature that comes to mind is the keyword feature. When you view the properties of a bookmark, you will find a keyword field. You can enter one or more characters. Hypothetically, let's say you assign 1 to www.dilbert.com. This would lead to the following possibility:

  • Same tab: Ctrl+L, 1, Enter
  • New tab: Ctrl+T, 1, Enter

We're definitely not down to one keypress... You might find an existing add-on that has can do that, or you could conceivably create a userscript for it (userscripts can globally on all regular websites, but may not work on internal page such as the built-in home page or new tab page for security reasons).

more options

Chosen Solution

A possibility might be to use the PrefBar extension.

This extension allows to define buttons and add a shortcut key to the button.

This is probably the easiest way with a direct URL:

gBrowser.selectedTab = gBrowser.addTab("<URL>");

You can use a bookmark with a keyword assigned with this code (replace <keyword> with the actual keyword):

[shortcutURL,postData] = PlacesUtils.getURLAndPostDataForKeyword("<keyword>");
gBrowser.selectedTab = gBrowser.addTab(shortcutURL);

Modified by cor-el

more options

@cor-el Thanks a lot, this is the best add-on ever :D

Just one thing, flash keeps steeling the keyboard focus preventing the add from capturing the hotkeys is there a way to solve this ?