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

Sök i support

Akta dig för supportbedrägerier: Vi kommer aldrig att be dig att ringa eller skicka ett sms till ett telefonnummer eller dela personlig information. Rapportera misstänkt aktivitet med alternativet "Rapportera missbruk".

Läs mer
Denna tråd har arkiverats. Ställ en ny fråga om du behöver hjälp.
Löst Arkiverad

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

Ändrad av MahmoudJ

Alla svar (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).

Vald lösning

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

Ändrad av cor-el

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