mark_jd wrote:I want to assign F1 key to open the google page in a new foreground tab.
Try
Code: Select all
gBrowser.selectedTab = gBrowser.addTab("http://www.google.com/");
ildar.mulyukov wrote:[thunderbird]
plz gimme a hint, what to put into "Action" to do "Repair Folder" . This is usually done trough the Folder Properties.
Try
Code: Select all
var tempEditFolder;
eval("tempEditFolder ="+ gFolderTreeController.editFolder.toString().replace(
/let /g,
"var "
).replace(
"if (folder.isServer) {",
"rebuildSummary(folder); return; if (folder.isServer) {"
));
tempEditFolder();
K4RBQT99 wrote:After each Firefox update, I see that the native shorcut "Find Next" (F3) is re-enabled. I have this disabled for to free F3 for other custom action, so after the update my action doesn't work anymore. A little nuisance, easy of to fix each time, but maybe somebody can to comment something related.
That <key> doesn't have an id so keyconfig generates one for it, sadly I had chosen a bad algorithm which would change the id if the amount of preceding <key>s changes. You could try to edit
Profile/extensions/keyconfig@dorando.xpi (.xpi is the same as .zip) /components/keyconfig-service.js and replace
Code: Select all
for(i = 0, l = nodes.length; i < l; i++) if(!nodes[i].id)
nodes[i].id = "xxx_key"+ i +"_"+nodes[i].getAttribute("command")+nodes[i].getAttribute("oncommand");
with
Code: Select all
for(i = 0, l = nodes.length; i < l; i++) {
var node = nodes[i];
if(!node.hasAttribute("id")) {
var j = 1;
do {
var id = "xxx_key"+(j++)+"_"+(node.getAttribute("command") || node.getAttribute("oncommand"));
} while(this.document.getElementById(id));
node.id = id;
}
}
which I'll likely use in the next update.
rahul wrote:firefox 13 broke some (but not all) of my Option key shortcuts, probably due to bug 418091. i got them working again by changing the symbols back to letters in prefs.js.
Hmm… if you try to assign those with keyconfig in Firefox 13+, are they correctly set or do you still need to the edit prefs.js?
mad.engineer wrote:TB 13.0.1, OS X 10.7.4, Using:
menuitem#keyconfig { display:none !important; }
in my userChrome.css, but it does not work. I can still see the keyconfig menu option via Tools->Keyconfig.
On mac, Firefox seems to use the native menu system and hides the XUL menu by setting
display:none. Setting the
hidden (or
collapsed) attribute seems to exclude/remove an item from the native menu, so try (needs only be run once, should be remembered cross session):
Code: Select all
document.getElementById("keyconfig").setAttribute("hidden","true");
document.persist("keyconfig","hidden");
chirpy_7 wrote:to trigger language-specific search results in google, this used to work, but may have stopped with FF 13 (in any case: very recently):
Code: Select all
loadURI(window.content.location.href+"&lr=lang_fr");
Seems to work fine for me on google.com and google.fr.
chirpy_7 wrote:Moreover, I'd really appreciate a quick hint as to how you would go about uncovering what's causing these problems.
If errors are reported, a source, bug, or web search for the reported object/function can help, otherwise trying different parameters for the used functions or looking up how they are used in the source.
Labutin wrote:Why goDoCommand("cmd_compactFolder") compact ALL folders instead compact only selected folder?
Because of
bug 64751. For only compacting the selected folder try
taglife wrote:Thunderbird try
name: 附加元件, id: xxx_key1_é??å??å??ä?¶, shortcut: Ctrl+Shift+A, code:
BrowserOpenAddonsMgr();
Ineffective?
BrowserOpenAddonsMgr is only available in Firefox, try
fogler1 wrote:how do I create a align to right key shortcut?
Try
Code: Select all
var controller = document.commandDispatcher.getControllerForCommand("cmd_align");
if (controller instanceof Components.interfaces.nsICommandController) {
var params = Components.classes["@mozilla.org/embedcomp/command-params;1"].createInstance(Components.interfaces.nsICommandParams);
params.setStringValue("state_attribute", "right");
controller.doCommandWithParams("cmd_align", params);
}
trianglekitty wrote:I'd like to assign the sequence ctrl+shift+end (highlight text to end of page under the cursor's position) to a single keyboard key like PgUp (which I never use.) Is this possible with keyconfig?
If a text box has the focus, shortcuts such as those are handled before they reach a XUL <key>, so keyconfig can't help here (since keyconfig only allows creation/modification of XUL <key>s).
But it is possible to override the file used by the backend code, so you could try to built an extension doing that by opening your
Profile and create within the
extensions folder a folder named
userxul@nobody containing:
install.rdf
Code: Select all
<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/2004/em-rdf#">
<rdf:Description rdf:about="urn:mozilla:install-manifest">
<id>userxul@nobody</id>
<name>User XUL</name>
<version>0</version>
<targetApplication><rdf:Description>
<id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</id>
<minVersion>1.0+</minVersion>
<maxVersion>*</maxVersion>
</rdf:Description></targetApplication>
</rdf:Description>
</rdf:RDF>
chrome.manifest
Code: Select all
content userxul .
override chrome://global/content/platformHTMLBindings.xml chrome://userxul/content/platformHTMLBindings.xml
(note that the files should not contain any space at the start).
Also open chrome://global/content/platformHTMLBindings.xml in Firefox and save that file (File > Save Page As…) in the
userxul@nobody folder, open it, and remove any
Code: Select all
<handler event="keypress" keycode="VK_PAGE_UP" command="cmd_movePageUp"/>
and replace any
Code: Select all
<handler event="keypress" keycode="VK_END" modifiers="shift,control" command="cmd_selectBottom"/>
with
Code: Select all
<handler event="keypress" keycode="VK_PAGE_UP" command="cmd_selectBottom"/>
Slickone wrote:I'm not sure what you mean about "add new shortcuts duplicating the functionality of the unsupported shortcuts"
Add a new key with the code of the unsupported shortcuts.
Slickone wrote:, or why I would want to do that.
To assign a different shortcut.
Slickone wrote:I can't imagine what kind of extension would add the Ctrl-Q shortcut. Any ideas?
No, but you could try to disable all Extensions, and re-enable them one by one.
ruffsense wrote:Where does keyconfig saves his config?
The configuration is saved by the Application in its
prefs.js file.
nigelle wrote:I have a standard (I have not modified it) Windows with keys labelled "shift", "ctrl", "alt" and the windows flag and "alt gr" that I think is equivalent to ctrl+alt.
Please clarify which of them I can use (press) with keyconfig to define shortcut according the version of FF that I use.
"shift", "ctrl", and "alt". "alt gr" is equivalent to Alt+Ctrl.
Amsuke wrote:Dorando, you once helped me to create a "Duplicate Window" command […] The problem is that with the current versions of Firefox, this is no longer working properly. It opens a new window with the correct URL in the address bar - but it never loads the page. I have to put the focus in the address bar and hit enter to actually load the page.
That happens because of "Don’t load tabs until selected" (also causes
bug 629232). Try
Code: Select all
OpenBrowserWindow().addEventListener("load", function tempFunction(event){
this.removeEventListener("command", tempFunction, true);
var ss = Components.classes["@mozilla.org/browser/sessionstore;1"].getService(Components.interfaces.nsISessionStore);
ss.setTabState(this.gBrowser.mCurrentTab, ss.getTabState(gBrowser.mCurrentTab))
},true);
chirpy_7 wrote:I tried both (even just came back from a restart (which normally isn't required)) - unfortunately though: neither of your suggestions works on my machine just yet. (I doubt that being on Linux makes the difference)
Regarding your first code: do I just need to copy & paste it "as is" - or does the function require a separate key etc ?
I also tried dorando's suggestion @
viewtopic.php?p=11987681#p11987681 which I had overlooked previously: but also this didn't want to work...
Works fine for me.