MozillaZine

What are all possible goDoCommands?

User Help for Mozilla Thunderbird
cheflo
 
Posts: 4
Joined: April 19th, 2017, 9:05 am

Post Posted April 19th, 2017, 1:00 pm

Using a keybinding extension such as MenuWizard or DorandoKeyconfig, I can see that they are calling Thunderbird commands by a syntax like this:

Code: Select all
goDoCommand('cmd_editAsNew')


Is there anywhere I can find a list of all the available Thunderbird commands that I can call this way?

For example I would like to find the goDoCommand for collapsing and expanding threads for a single message rather than for all messages. This function is available as the left and right arrow in the default key bindings, but I would like to rebind it to `h` and `l`.

Based on the shortcuts for expanding and collapsing all thread I tried `goDoCommand('cmd_expandThread')` and `goDoCommand('cmd_expandCollapsedThread')` to no avail. I also did not see anything listed here ttp://kb.mozillazine.org/Keyconfig_exte ... hunderbird

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

Post Posted April 19th, 2017, 1:15 pm

Similar thread: viewtopic.php?f=39&t=2750453

Try these:

Code: Select all
var viewIndex = gDBView.currentlyDisplayedMessage;
if (gDBView.isContainer(viewIndex)) {
  gDBView.toggleOpenState(viewIndex);
}

Code: Select all
// simulate a left arrow keydown event
var utils = document.commandDispatcher.focusedWindow.
  QueryInterface(Components.interfaces.nsIInterfaceRequestor).
    getInterface(Components.interfaces.nsIDOMWindowUtils);
utils.sendKeyEvent("keydown", KeyEvent.DOM_VK_LEFT, 0, 0);

Code: Select all
// simulate a right arrow keydown event
var utils = document.commandDispatcher.focusedWindow.
  QueryInterface(Components.interfaces.nsIInterfaceRequestor).
    getInterface(Components.interfaces.nsIDOMWindowUtils);
utils.sendKeyEvent("keydown", KeyEvent.DOM_VK_RIGHT, 0, 0);

Reference:

http://dxr.mozilla.org/comm-release/sou ... eadPane.js
http://dxr.mozilla.org/comm-release/sou ... s/tree.xml

Return to Thunderbird Support


Who is online

Users browsing this forum: No registered users and 10 guests