keyconfig 20110522

Announce and Discuss the Latest Theme and Extension Releases.
Post Reply
jek60
Posts: 14
Joined: March 9th, 2009, 10:17 am

Re: keyconfig 20110323

Post by jek60 »

Dorando, FYI, the current Thunderbird release update isn't reflected in update.rdf.
bolidew
Posts: 64
Joined: June 1st, 2005, 4:52 pm

Re: keyconfig 20110323

Post by bolidew »

Is it possible to assign a key shortcut to "click" the Firefox Button (version 4 or above)?
TIA!
Cattleya
Posts: 57
Joined: October 7th, 2010, 11:14 pm

Re: keyconfig 20110323

Post by Cattleya »

Hi dorando,
Can you help me to create a hotkey to toggle Image Animation from normal to none - none to normal?
About:config: image.animation_mode

Thank you, have a nice day xD~
dorando
Posts: 1203
Joined: January 9th, 2004, 9:57 am
Contact:

Re: keyconfig 20110323

Post by dorando »

morat wrote:There are some commands absent like cmd_scrollTop from platformHTMLBindings.xml.

view-source:chrome://global/content/platformHTMLBindings.xml

Is it possible to list these commands as well?
You can access it as a XMLDocument with

Code: Select all

var request =  new XMLHttpRequest();
request.open("GET""chrome://global/content/platformHTMLBindings.xml"false);
request.send(null);

alert(request.responseXML); 

emil9216 wrote:Is it possible to change the default key combination for switching tabs "ctrl+tab" with this combination "alt+~" ?
No, but you can Add a new key containing

Code: Select all

gBrowser.tabContainer.advanceSelectedTab(1,true); 

chirpy_7 wrote:just noted a minor behavioural change:

hitting s would hitherto toggle star / unstar (bookmark) the current tab:

Code: Select all

if(PlacesStarButton._starred) {
 
StarUI._itemId PlacesUtils.getMostRecentBookmarkForURI(gBrowser.currentURI);
 
StarUI.removeBookmarkButtonCommand();
} else {
 
PlacesCommandHook.bookmarkCurrentPage(false);
Now, unfortunately, the unstar bit does not work anymore.
Try

Code: Select all

if(PlacesStarButton._itemIds[0]) {
 
StarUI._uriForRemoval PlacesUtils.bookmarks.getBookmarkURI(PlacesStarButton._itemIds[0]);
 
StarUI._actionOnHide "remove";
 
StarUI.handleEvent({type"popuphidden"originalTargetStarUI.panel})
} else {
 
PlacesCommandHook.bookmarkCurrentPage(false);

Hamid_Y2K wrote:"CopyCurrentURI"
Try

Code: Select all

var ClipboardHelper Components.classes["@mozilla.org/widget/clipboardhelper;1"]
.
getService(Components.interfaces.nsIClipboardHelper);

ClipboardHelper.copyString(content.location); 
Hamid_Y2K wrote:"OpenCookieInfo"
Using chrome://browser/content/pageinfo/security.js as a base try

Code: Select all

var wm Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator);
var 
win wm.getMostRecentWindow("Browser:Cookies");
var 
eTLDService Components.classes["@mozilla.org/network/effective-tld-service;1"].getService(Components.interfaces.nsIEffectiveTLDService);

var 
eTLD;
var 
uri content.document.documentURIObject;
try {
 
eTLD eTLDService.getBaseDomain(uri);
} catch (
e) {
 
eTLD uri.asciiHost;
}

if (
win) {
 
win.gCookiesWindow.setFilter(eTLD);
 
win.focus();
} else {
 
window.openDialog("chrome://browser/content/preferences/cookies.xul""Browser:Cookies""", {filterString eTLD});
Hamid_Y2K wrote:"Copy link text"
"copy link location"
The code I posted previously works for me in Firefox 4.
Hamid_Y2K wrote:"Organize Statusbar""
If you want to customize the Add-on bar try

Code: Select all

BrowserCustomizeToolbar(); 
If you refer to the Add-on Organize Status Bar try

Code: Select all

objOSB.Options() 

OzarksCrescentMural wrote:Where can I download a copy of keyconfig that will work in Windows for Firefox 4.0.1?
The first post.
OzarksCrescentMural wrote:Where can I find a list of the Codes too?
Nowhere, but see the post from morat.

jek60 wrote:Dorando, FYI, the current Thunderbird release update isn't reflected in update.rdf.
Thunderbird 3.1.10 is build on top of XULRunner/Toolkit 1.9.2.17 which is in the covered range.

bolidew wrote:Is it possible to assign a key shortcut to "click" the Firefox Button (version 4 or above)?
See my answer to rpz79.

Cattleya wrote:Can you help me to create a hotkey to toggle Image Animation from normal to none - none to normal?
About:config: image.animation_mode
Try

Code: Select all

var val gBrowser.mPrefs.getCharPref("image.animation_mode") == "normal" "none" "normal";
gBrowser.mPrefs.setCharPref("image.animation_mode"val); 
Support mozilla.dorando.at through donations/contributions.
chirpy_7
Posts: 165
Joined: March 19th, 2007, 6:24 am

Re: keyconfig 20110323

Post by chirpy_7 »

sweet !

thanks once again to the matrix keymaker ;)
jek60
Posts: 14
Joined: March 9th, 2009, 10:17 am

Re: keyconfig 20110323

Post by jek60 »

dorando wrote:
jek60 wrote:Dorando, FYI, the current Thunderbird release update isn't reflected in update.rdf.
Thunderbird 3.1.10 is build on top of XULRunner/Toolkit 1.9.2.17 which is in the covered range.

Hm. Not sure why it wouldn't update directly when I upgraded then. I just used MRTechToolkit to mark it as compatible which my standard workaround.
Cattleya
Posts: 57
Joined: October 7th, 2010, 11:14 pm

Re: keyconfig 20110323

Post by Cattleya »

Thank you so much, dorando xD

Hope you will help me again, I have two issues:
- Is it possible to assign a key shortcut to press hotkey, example:
I press Ctrl + U, keyconfig will press Ctrl + S.

- And how to press Enter in keyconfig, I only find something like "cmd_copy", "cmd_paste" but nothing for Enter.
morat
Posts: 6421
Joined: February 3rd, 2009, 6:29 pm

Re: keyconfig 20110323

Post by morat »

@dorando

Thanks for reply.

Here is the finished script in case someone else is interested.

Code: Select all

// copy list of commands to clipboard
// some commands are only legal when there is a selection
// or when the focus is anywhere where you can type text
var commands = document.getElementsByTagName("command");
var out = new Array();
var info = Components.classes["@mozilla.org/xre/app-info;1"].
  getService(Components.interfaces.nsIXULAppInfo);
var type = document.documentElement.getAttribute("windowtype");
out.push(info.name + " " + info.version, "", type, "");
for (var i = 0; i < commands.length; i++) {
  var id = commands[i].getAttribute("id");
  var oncommand = commands[i].getAttribute("oncommand");
  if (id && oncommand) out.push(id);
}
var req =  new XMLHttpRequest();
req.open("GET", "chrome://global/content/platformHTMLBindings.xml", false);
req.send(null);
var doc = req.responseXML;
var handlers = doc.getElementsByTagName("handler");
for (var i = 0; i < handlers.length; i++) {
  var command = handlers[i].getAttribute("command");
  if (command && out.indexOf(command) == -1) out.push(command);
}
var clipboard = Components.classes["@mozilla.org/widget/clipboardhelper;1"].
  getService(Components.interfaces.nsIClipboardHelper);
if (navigator.platform.indexOf("Win")) {
  clipboard.copyString(out.join("\n"));
} else {
  clipboard.copyString(out.join("\r\n"));
}
alert("done");

The Keyconfig Thunderbird page is missing 30 commands for the main window.
These 30 commands do not include the commands in the platformHTMLBindings.xml file.
VLMin
Posts: 67
Joined: April 14th, 2006, 7:15 pm

Keyconfig for Firefox 4

Post by VLMin »

I've looked around ... I don't see anything that explicitly states that keyconfig works in FF 4. Is this the case? Or has the FF team FINALLY integrated the functionality into the product?

Also, using keyconfig or otherwise, is there a way to export a list of all active FF shortcuts, say to a csv file or the like?

Thanks!
User avatar
Clefaria
Posts: 91
Joined: April 25th, 2011, 3:14 pm

Re: Keyconfig for Firefox 4

Post by Clefaria »

How do I properly set up a new keyboard shortcut for opening Firefox (4's) options?
dorando
Posts: 1203
Joined: January 9th, 2004, 9:57 am
Contact:

Re: keyconfig 20110323

Post by dorando »

Cattleya wrote:- Is it possible to assign a key shortcut to press hotkey, example:
I press Ctrl + U, keyconfig will press Ctrl + S.
Try

Code: Select all

var utils content.QueryInterface(Components.interfaces.nsIInterfaceRequestor).
getInterface(Components.interfaces.nsIDOMWindowUtils);

utils.sendKeyEvent("keypress"0KeyEvent.DOM_VK_SEvent.CONTROL_MASK); 
Cattleya wrote:- And how to press Enter in keyconfig, I only find something like "cmd_copy", "cmd_paste" but nothing for Enter.
Try

Code: Select all

var utils content.QueryInterface(Components.interfaces.nsIInterfaceRequestor).
getInterface(Components.interfaces.nsIDOMWindowUtils);

utils.sendKeyEvent("keypress"KeyEvent.DOM_VK_RETURN00); 

VibrantLife wrote:I've looked around ... I don't see anything that explicitly states that keyconfig works in FF 4. Is this the case?
The latest version works with Firefox 4.
VibrantLife wrote:Also, using keyconfig or otherwise, is there a way to export a list of all active FF shortcuts, say to a csv file or the like?
Listing all active shortcuts is unlikely, but for listing all enabled <key>s something like

Code: Select all

var output = [];

for(var 
0gKeys.lengthli++) {
 var 
key gKeys[i];
 if(
key.shortcut != gStrings.disabled)
  
output.push(gKeys[i].shortcut+"\t\t" gKeys[i].name);
}

alert(output.join("\n")); 
should work (select the keyconfig window from the dropdown and Add a new key).

Clefaria wrote:How do I properly set up a new keyboard shortcut for opening Firefox (4's) options?
Add a new key containing

Code: Select all

openPreferences(); 
Support mozilla.dorando.at through donations/contributions.
User avatar
Clefaria
Posts: 91
Joined: April 25th, 2011, 3:14 pm

Re: keyconfig 20110323

Post by Clefaria »

Thanks!
VLMin
Posts: 67
Joined: April 14th, 2006, 7:15 pm

Re: keyconfig 20110323

Post by VLMin »

Listing all active shortcuts is unlikely, but for listing all enabled <key>s something like


I did this, added a key, named it "List active shortcuts", and pasted in the code beginning with "var ...". I assigned a shortcut (alt-ctrl-L), closed the keyconfig window, and tried the shortcut. But nothing seems to have happened.

I did not make the shortcut global, as I do not know what effect that will have.

If you have a further suggestion, I would be grateful!
Layl
Posts: 4
Joined: September 24th, 2008, 2:25 am

Re: keyconfig 20110323

Post by Layl »

can plz u help me make a trigger-shortcut to enable and disable adblock ?

and is there a solution to remove scrolling when you press Space ?
dorando
Posts: 1203
Joined: January 9th, 2004, 9:57 am
Contact:

Re: keyconfig 20110323

Post by dorando »

VibrantLife wrote:I did this, added a key, named it "List active shortcuts", and pasted in the code beginning with "var ...". I assigned a shortcut (alt-ctrl-L), closed the keyconfig window, and tried the shortcut. But nothing seems to have happened.
Add a new key to the keyconfig window itself (select it from the dropdown) and press the combination while the keyconfig window is active (the text in the alert is selectable).

Layl wrote:can plz u help me make a trigger-shortcut to enable and disable adblock ?
Try

Code: Select all

var pref 'extensions.adblockplus.enabled';
gPrefService.setBoolPref(pref,!gPrefService.getBoolPref(pref)); 
Layl wrote:and is there a solution to remove scrolling when you press Space ?
Add a new key without any code and assign Space to it.
Support mozilla.dorando.at through donations/contributions.
Post Reply