MozillaZine

Disable CTRL+Enter shortcut

Discussion of general topics about Mozilla Thunderbird
post2forum
 
Posts: 144
Joined: September 1st, 2005, 7:22 pm

Post Posted April 21st, 2017, 9:47 pm

What is the easiest way to disable CTRL+Enter from sending mail. Is it possible to do it without installing an extension? I found an old post about it from 8 years ago but I am wondering if there is a better way than the extension mentioned in the thread, which is locked now. viewtopic.php?f=28&t=1209615

Happy112
 
Posts: 66
Joined: April 15th, 2017, 10:25 am

Post Posted April 22nd, 2017, 2:55 am

Hi post2forum !
Unfortunately I can't think of another way to disable shortcuts than to use an extension.
Would you give one of these a try : https://addons.mozilla.org/en-US/thunderbird/addon/dorando-keyconfig/
(This is not 'the old' keyconfig)
And also : https://addons.mozilla.org/en-US/thunderbird/addon/s3menu-wizard/
Sure hope this will work for you !

post2forum
 
Posts: 144
Joined: September 1st, 2005, 7:22 pm

Post Posted April 22nd, 2017, 9:09 pm

Thanks but Menu Wizard doesn't work to disable the shortcut. There is an entry for CTRL + Return but disabling it does nothing, and restarting doesn't help. Dorando Keyconfig isn't compatible with my Thunderbird 54 and also it's experimental. Isn't there some javascript or something I could add to thunderbird to stop that keyboard shortcut?

morat
 
Posts: 2228
Joined: February 3rd, 2009, 6:29 pm

Post Posted April 23rd, 2017, 7:51 am

I can disable the key element with the original keyconfig extension.

viewtopic.php?f=48&t=72994

I can disable the key element with the userChromeJS extension.

Code: Select all
/* Thunderbird userChrome.js */

(function() {

if (location == "chrome://messenger/content/messenger.xul") {}
if (location == "chrome://messenger/content/messageWindow.xul") {}
if (location == "chrome://messenger/content/messengercompose/messengercompose.xul") {

  var menuitem = document.getElementById("menu-item-send-now");
  var key = document.getElementById("key_send");
  if (menuitem && menuitem.hasAttribute("key")) {
    menuitem.removeAttribute("key");
  }
  if (menuitem && menuitem.hasAttribute("acceltext")) {
    menuitem.removeAttribute("acceltext");
  }
  if (key && key.hasAttribute("oncommand")) {
    key.removeAttribute("oncommand");
  }

}

})();

http://userchromejs.mozdev.org/
http://userchromejs.mozdev.org/faq.html

Instructions:

1. install userChromeJS extension
2. close email client
3. create or edit the userChrome.js file in the chrome folder in the profile folder
4. open email client with the -purgecaches command line option

i.e.

thunderbird.exe -purgecaches
ThunderbirdPortable.exe -purgecaches

You have to purge the caches only after creating or editing the userChrome.js file.

Reference:

http://dxr.mozilla.org/comm-release/sou ... ompose.xul

userChromeJS 2.0 (signed)
Thunderbird 52.0
Windows 7 SP1 32-bit

Return to Thunderbird General


Who is online

Users browsing this forum: No registered users and 1 guest