"Show remote content" hotkey?

User Help for Mozilla Thunderbird
tallredpaul
Posts: 2
Joined: June 13th, 2021, 7:51 pm

Re: "Show remote content" hotkey?

Post by tallredpaul »

@Morat
Thank you so much for your assistance. I tried many things trying to get it to work with no success. I decided that if it worked for MicheleBS, it should work for me too (and so I must be doing something wrong). After checking many things I came to realize I had recently made a minor change to the message body view settings (in Thunderbird, "View -> Message Body As -> Simple HTML"). When I changed it back to "Original HTML", everything worked perfectly. It seems even old programmers (me) can make simple changes causing BIG PROBLEMS. I continue to learn my lesson.

Thanks again for your patient help and assistance.
morat
Posts: 6426
Joined: February 3rd, 2009, 6:29 pm

Re: "Show remote content" hotkey?

Post by morat »

@tallredpaul

Glad you got it working.

:)
ChaosDM242
Posts: 7
Joined: February 16th, 2019, 8:01 am

Re: "Show remote content" hotkey?

Post by ChaosDM242 »

Hi everyone,

I just bought a new laptop and so it was time to re-install all programs from the old laptop. One of the programs was of course Thunderbird. It seems that I was using an "old" version where I had modified some key bindings. After installing TB78 I am not able to use the old extension. I found the tbkeys extension but, being a total zero in programming, I can't for the life of me modify/create 1 key binding.
I "succeeded" in disabling all single key bindings (that was easy, I found the code in the review section of the extension page) but I would like to have this added :
Remove the CTRL+S binding (that does I don't know what) and make it so that CTRL+s is assigned to "send message"

Could anyone on here smarter than me (so anyone of you) help me out with this?

Thanks in advance,
Dimitri
morat
Posts: 6426
Joined: February 3rd, 2009, 6:29 pm

Re: "Show remote content" hotkey?

Post by morat »

@ChaosDM242

Here is the command for the File > Send Now menu item in the compose window.

Code: Select all

window.goDoCommand('cmd_sendNow');
Try the following compose key bindings in settings if you are using the tbkeys addon.

Code: Select all

{
  "ctrl+s": "window.goDoCommand('cmd_sendNow');"
}
Try the following compose key bindings in settings if you are using the tbkeys-lite addon.

Code: Select all

{
  "ctrl+s": "cmd:cmd_sendNow"
}
You cannot execute arbitrary javascript using the tbkeys-lite addon.

More info: http://forums.mozillazine.org/viewtopic ... #p14872763

The File > Save menu item uses the Ctrl+S shortcut normally.

Thunderbird shortcuts - Writing messages
http://support.mozilla.org/kb/keyboard- ... g-messages
ChaosDM242
Posts: 7
Joined: February 16th, 2019, 8:01 am

Re: "Show remote content" hotkey?

Post by ChaosDM242 »

THANKS A MILLION!!! Works flawlessly.
ChaosDM242
Posts: 7
Joined: February 16th, 2019, 8:01 am

Re: "Show remote content" hotkey?

Post by ChaosDM242 »

@Morat :
One last request (promised ;) )

I used to use the "r" key as "markAsRead", but it's now assigned to MarkThreadasRead. I unset the m key (that is assigned to the markAsRead command) and tried the following command

{"r": "cmd:cmd_markAsRead"}

But that doesn't seem to be right...no idea why. Can you help me out please?

Thanks,
Dimitri
morat
Posts: 6426
Joined: February 3rd, 2009, 6:29 pm

Re: "Show remote content" hotkey?

Post by morat »

@ChaosDM242

I'm not sure what you are asking.

Here are the Read commands.

Code: Select all

window.goDoCommand('cmd_toggleRead');
window.goDoCommand('cmd_markAsRead');
window.goDoCommand('cmd_markAsUnread');
window.goDoCommand('cmd_markThreadAsRead');
window.goDoCommand('cmd_markReadByDate');
window.goDoCommand('cmd_markAllRead');
Do you have a syntax error in your settings?

The settings page will not allow invalid JSON to be submitted.

JSON Validator
http://jsonlint.com/

P.S.

You should post shortcut requests in the keyconfig thread.

keyconfig thread: http://forums.mozillazine.org/viewtopic ... 48&t=72994
ChaosDM242
Posts: 7
Joined: February 16th, 2019, 8:01 am

Re: "Show remote content" hotkey?

Post by ChaosDM242 »

OK, I see and "understand" the commands...but I still must be doing something wrong.

This is what I have in my "Compose Key Bindings" box

{"alt+s": "cmd:cmd_sendNow"}
{"r": "window.goDoCommand('cmd_markAsRead')"}

But the program doesn't accept this (syntax)...more than likely because the 2nd line is "wrong". But I don't know what's wrong :(

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

Re: "Show remote content" hotkey?

Post by morat »

Are you using the tbkeys or tbkeys-lite addon?

Main key bindings example 1:

Code: Select all

{
    "j": "window.goDoCommand('cmd_nextMsg');",
    "k": "window.goDoCommand('cmd_previousMsg');",
    "o": "window.goDoCommand('cmd_openMessage');"
}
Main key bindings example 2:

Code: Select all

{
    "j": "cmd:cmd_nextMsg",
    "k": "cmd:cmd_previousMsg",
    "o": "cmd:cmd_openMessage"
}
You can use example 1 or example 2 with the tbkeys addon.

You can only use example 2 with the tbkeys-lite addon.

The "cmd:cmd_markAsRead" command only works in the main window.

The "cmd:cmd_sendNow" command only works in the compose window.
ChaosDM242
Posts: 7
Joined: February 16th, 2019, 8:01 am

Re: "Show remote content" hotkey?

Post by ChaosDM242 »

Great...it works! THANKS (again)!

Dimitri
hydrostarr
Posts: 280
Joined: October 6th, 2004, 10:21 am

Re: "Show remote content" hotkey?

Post by hydrostarr »

@tallredpaul and @MicheleBS,

Do either of you have a copy (on your computer) of the tbkeys.xpi install file that supports the following feature? Could you possibly send it to me in a private message?

Have you saved the "hacked" version of tbkeys-v2.1.0.1.xpi (if that's the version number) that supports Message-window-key-bindings? I tried to get a copy of this file per this discussion, but @morat no longer has an available copy of the software.

morat wrote:@tallredpaul

Okay. I sent a link using the 2.1.0 version in a private message.

Remember to (1) (2) (3), then restart before installing the hacked version.

1. backup key bingings just in case
2. uninstall current version
3. set addons to update manually
morat
Posts: 6426
Joined: February 3rd, 2009, 6:29 pm

Re: "Show remote content" hotkey?

Post by morat »

You can hack the tbkeys extension, then add a message key binding.

Tools > Addons > tbkeys > Options > Settings > Message key bindings

The message key bindings fire in the message window.

Hack for tbkeys 2.1.0: http://forums.mozillazine.org/viewtopic ... #p14872195

Hack for tbkeys 2.2.0:

* manifest.json

Code: Select all

- "name": "tbkeys",
+ "name": "tbkeys hack",

Code: Select all

- "version": "2.2.0",
+ "version": "2.2.0.1",
* schema.json

Code: Select all

  "main": { "$ref": "Keys" },
- "compose": { "$ref": "Keys" }
+ "compose": { "$ref": "Keys" },
+ "message": { "$ref": "Keys" }
* implementation.js

Code: Select all

  "mail:3pane": "main",
  msgcompose: "compose",
+ "mail:messageWindow": "message",

Code: Select all

+ "chrome://messenger/content/messageWindow.xul",
+ "chrome://messenger/content/messageWindow.xhtml",
  "chrome://messenger/content/messengercompose/messengercompose.xul",
  "chrome://messenger/content/messengercompose/messengercompose.xhtml",
  "chrome://messenger/content/messenger.xul",
  "chrome://messenger/content/messenger.xhtml",
* background.js

Code: Select all

  composekeys: "{}",
+ messagekeys: "{}",

Code: Select all

  main: JSON.parse(settings.mainkeys),
  compose: JSON.parse(settings.composekeys),
+ message: JSON.parse(settings.messagekeys),
* options.html

Code: Select all

  <tr>
    <td>
      <label>Compose key bindings</label>
    </td>
    <td>
      <textarea id="composekeys" class="json" rows="20" cols="60"></textarea>
    </td>
  </tr>
+ <tr>
+   <td>
+     <label>Message key bindings</label>
+   </td>
+   <td>
+     <textarea id="messagekeys" class="json" rows="20" cols="60"></textarea>
+   </td>
+ </tr>
tbkeys releases
http://github.com/willsALMANJ/tbkeys/releases
Last edited by morat on March 6th, 2022, 2:59 pm, edited 1 time in total.
hydrostarr
Posts: 280
Joined: October 6th, 2004, 10:21 am

Re: "Show remote content" hotkey?

Post by hydrostarr »

Thanks @morat! Can you also private-message me a hacked copy of tbkeys v2.2.0 (per above)?
morat
Posts: 6426
Joined: February 3rd, 2009, 6:29 pm

Re: "Show remote content" hotkey?

Post by morat »

Okay. I sent a link in a private message.
Post Reply