Is there a way to disable those evil keyboard shortcuts in Thunderbird?

When I accidentally hit a, suddenly the message gets archived and a new Archives folder is created. Similarly other keys bring havoc to my workflow.

While googling, I have found many complains similar to mine, but no working solution offered. There used to be a KeyConfig addon, but this is incompatible with new versions of Thunderbird.

My Thunderbird version is Icedove 24.6.0, but the problem still exists in Thunderbird 31.

  • You could try disabling the individual keyboard short-cuts for each using the keyconfig extension. support.mozilla.org/en-US/questions/920663
    – slm
    Jul 10 '14 at 4:25
  • 3
    @slm - as I say in my question, the keyconfig addon is not compatible with new Thunderbird versions. Jul 10 '14 at 7:20
  • Hmmm. I have 24.5 and it works there.
    – slm
    Jul 10 '14 at 12:50
  • 1
    @intika - new bounty, in case you are interested. Jan 23 '20 at 6:12
  • 1
    @intika - if you have a solution using userChrome.css, I would create new bounty. Jan 31 '20 at 6:08

Without extension you can only disable some of it:

  • A can be disabled by disabling the Archive functionality in genereal, this has to be done in each Mail-Account under Copies and Folders->Keep messages archives in:
  • J can be disabled by disabling the Junk functionality, which is not a desired solution.

A better solution is the add-on tbkeys or tbkeys-lite.

To install this, follow the Readme, then open the settings for the extension and change the settings to this:

    "j": "window.goDoCommand('cmd_nextMsg')",
    "m": "window.goDoCommand('cmd_previousMsg')",
    "s": "window.goDoCommand('cmd_openMessage')",
    "k": "window.goDoCommand('cmd_reply')",
    "a": "window.goDoCommand('cmd_replyall')",
    "w": "window.goDoCommand('cmd_forward')",
    "c": "window.MsgNewMessage()"

which will remap all dangerous shortcuts to harmless actions. (I didn't remap "r" because I actually like this one)

For Thunderbird older than version 68, you could use keyconfig Add-On

To install this, you have to

  • right-click on the first word "keyconfig" in the old first forum post here from "April 30th, 2004"
  • install the keyconfig.xpi file in thunderbirds add-ons "as file"
  • open the settings for the extension "keyconfig 20110522", there you can disable (or change) all single-key-shortcut, you don't like (and also "Ctrl+Q" which is my favorite ;-)

You can disable the "a" problem by disabling email archives in general. This applies to all accounts.

Edit -> Preferences -> Advanced -> General -> Config Editor... mail.identity.default.archive_enabled -> false

  • Disabling functionality shouldnt be the wa to go. You wouldnt deinstall writing corrections as a fix to temporarily deactivate them, would you?!
    – WGRM
    May 20 '20 at 22:53
  • @WGRM but it's not kvbx's fault that Thunderbird offers no other solution Aug 25 '20 at 16:03

Sigh, this was a hard nut to crack. I wish there was more documentation.

The patch above posted by αғsнιη still works. There is a catch, however, if you are using a patched Thunderbird, which updates it self, you can't patch it again! By doing so you will probably break your Thunderbird. You need to download a completely fresh copy of Thunderbird and patch the omni.ja again. It is hard to predict when the patch will break so you should do patching via script.

I have taken a liberty and create a patch script called thunderbird-patch that can patch the omni.ja for you. You need to run it where your Thunderbird's directory is e.g. ./thunderbird-patch /usr/lib64/thunderbird.

It creates a backup of the original, unpacks it to /tmp/omni. There it patches the files which are needed and then it packs everything back again and stores it into original location.

One side note: The original omni.ja is using uncompressed zip file. The reason being that they wanted to have Thunderbird started as fast as possible. The script is using a compression, I did not notice any slowdowns of any kind. Should you experience those remove the compression.

The original file:

Archive:  backup_omni.ja
Zip file size: 51474524 bytes, number of entries: 5115
5115 files, 50486796 bytes uncompressed, 50486796 bytes compressed:  0.0%

The new generated file from the script:

Archive:  omni.ja
Zip file size: 15214620 bytes, number of entries: 5115
5115 files, 50486796 bytes uncompressed, 14226892 bytes compressed:  71.8%

(One more thing, omni.ja is a former jar file and that is the reason why it is just zipped file).

My patched omni.ja for Thunderbird 68.8.0 only (for any other version you have to patch it via script).

Edit: How to disable shortcuts like CTRL+Enter, and CTRL+SHIFT+Enter

Shortcuts containing Enter alias keycode VK_RETURN are using little bit different approach.

  • First to find the keycode at:

chrome/en-US/locale/en-US/messenger/messengercompose/messengercompose.dtd (comment out the line containing VK_RETURN)

<!ENTITY sendNowCmd.label "Send Now">
<!ENTITY sendCmd.keycode "VK_RETURN">
<!ENTITY sendNowCmd.accesskey "d">

<!ENTITY sendLaterCmd.label "Send Later">
<!ENTITY sendLaterCmd.keycode "VK_RETURN">
<!ENTITY sendLaterCmd.accesskey "L">
  • Secondly you need to find out key_send and key_sendLater:

chrome/messenger/content/messenger/messengercompose/messengercompose.xul (comment out both lines)

<key id="key_send" keycode="&sendCmd.keycode;" observes="cmd_sendWithCheck" modifiers="accel"/>
<key id="key_sendLater" keycode="&sendLaterCmd.keycode;" observes="cmd_sendLater" modifiers="accel, shift"/>

The sed to change it should be something like this:

sed -e '/^\s*<!ENTITY [^\.]*Cmd\.keycode "/{  s:^\s*:<!-- :; s:$: -->: ;}' \
    -e '/^\s*<key id="key_send[^"]*" keycode="&[^\.]*Cmd\.keycode;"[^/]*\/[^>]*>$/ { s:^\s*:<!-- :; s:$: -->: ; };' \
chrome/en-US/locale/en-US/messenger/messengercompose/messengercompose.dtd \

Edit2: It works, I've just pushed the script changes. In order for the changes to work you need to remove your profile (perhaps --clearcache is enough?) completely and remove/uninstall your Thunderbird. Next do a fresh install of you Thunderbird. I have tested the changes on Opensuse and it works for me.

The Omni.ja copy above does not include the removal of the ctrl+enter and ctrl+shift+enter.

The modified patch script: thunderbird-patch.

  • @MartinVegter Check my findings. I have tried it on my Opensuse and it works.
    – tukan
    May 18 '20 at 11:45
  • do you know why the original script by αғsнιη did not work? You say there is a problem "if you are using a patched Thunderbird, which updates it self". I am not using patched, and my Thunderbird does not update itself. So what was the problem why it did not work when I tried the original script ? May 18 '20 at 13:03
  • @MartinVegter Do you have vanilla version installed? Did you compare the result to what I have posted to your changes?
    – tukan
    May 18 '20 at 13:21
  • "Why it did not work when you tried the script?" I can't guess what conditions you have before you tried the script (like profiles, other changes).
    – tukan
    May 18 '20 at 13:29
  • 1
    @tukan - perfect. Thank you very much. May 21 '20 at 5:16

The mentioned keyconfig 20110522 Add-On is not compatible with the latest Thunderbird releases (here v60.7.0).

I found dorando keyconfig which is a drop-in replacement. With it you can rebind nearly every keyboard shortcut.


Not the answer you're looking for? Browse other questions tagged or ask your own question.