What are all possible goDoCommands?

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

What are all possible goDoCommands?

Post by cheflo »

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_extension:_Thunderbird
morat
Posts: 6432
Joined: February 3rd, 2009, 6:29 pm

Re: What are all possible goDoCommands?

Post by morat »

Similar thread: http://forums.mozillazine.org/viewtopic ... &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
Post Reply