0

In Firefox, I want to change the "ctrl-1" keyboard shortcut (that brings up the first tab in the browse) to the key sequence "ctrl,ctrl,1", that is press "ctrl", then "ctrl" again and then "1".

Does anyone know which configuration items, add-ons (and anything else) I need to change in order to accomplish this?

1
  • There could be workarounds with external software, but you haven't specified your system.
    – Destroy666
    Commented Apr 30, 2023 at 18:15

2 Answers 2

1

If you are working in Linux, you might be able to capture the key-down and key-up events of the CTRL key. Even though Ctrl technically is a modifier, it still fires individual events. Visible through the xev command like this for down, then up:

KeyPress event, serial 37
    state 0x10

KeyRelease event, serial 37
    state 0x14

Key events can also be captured by Python scripts, in case you want to cook up something.

0

This is impossible to do.

The Ctrl key is a modifier that gets added to the next key to be pressed. It's not a key by itself. This means that Ctrl+1 just sends to Firefox (or any process) the character 1 with an indication that Ctrl was pressed when the 1 key was pressed.

Therefore pressing Ctrl twice will not have any effect different than pressing it once. The modifier indication is only added once.

You could use instead of CTRL some other modifier key, such as Alt, or perhaps Ctrl-F1, or any other key combination. The add-on Shortkeys could help.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .