Windows 10 reached EOS (end of support) on October 14, 2025. If you are on Windows 10, see this article.

Vyhľadajte odpoveď

Vyhnite sa podvodom s podporou. Nikdy vás nebudeme žiadať, aby ste zavolali alebo poslali SMS na telefónne číslo alebo zdieľali osobné informácie. Nahláste prosím podozrivú aktivitu použitím voľby “Nahlásiť zneužitie”.

Ďalšie informácie
Vyriešené Archivované

Open a website with a keyboard shortcut.

MahmoudJ

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

Upravil(a) MahmoudJ dňa

Všetky odpovede (3)

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

Vybrané riešenie

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);

Upravil(a) cor-el dňa

@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 ?