keyconfig 20110522

Announce and Discuss the Latest Theme and Extension Releases.
Post Reply
Olofern
Posts: 22
Joined: March 6th, 2018, 2:14 am

Re: keyconfig 20110522

Post by Olofern »

I'd like to remap Num Lock, is it possible?
I tried

Code: Select all

user_pref("extensions.dorandoKeyConfig.main.xxx_key1_Testo successivo", "][][VK_NUMLOCK][gFindBar.onFindAgainCommand(false);][chrome://browser/content/browser.xul");
it doesn't work
morat
Posts: 6403
Joined: February 3rd, 2009, 6:29 pm

Re: keyconfig 20110522

Post by morat »

It isn't possible with the <key> element. I tried using the VK_NUMLOCK value with the Keyconfig extension and with a CustomizableUI example.

Key values
http://developer.mozilla.org/en-US/docs ... Key_Values

CustomizableUI example: http://forums.mozillazine.org/viewtopic ... &t=3040673
VLMin
Posts: 67
Joined: April 14th, 2006, 7:15 pm

Re: keyconfig 20110522

Post by VLMin »

FEATURE REQUEST: It would be so wonderful to be able to export the current set of keyconfig shortcuts, then import them into Pale Moon elsewhere. SO very nice!!!

Thank you for your consideration.
VLMin
Posts: 67
Joined: April 14th, 2006, 7:15 pm

Re: keyconfig 20110522

Post by VLMin »

morat, thank you for responding. I have read everything you suggested. From my perspective as a nontechnical user, it sounds like just enough information to make a complete mess of things. I will ask one question:

If one were to make a copy of the current pref.js file, scroll down to the keyconfig section, copy all the entries that assign shortcuts, and save these, then, say in a new PM installation, paste that group of entries into the new, operational prefs.js file while the program is closed, then next time PM is launched, would this have the effect of adding those modifications to the setup, whether in about:config or wherever else the entries need to go?

As was mentioned in one of the referenced items, other extension developers have created code to export/import preferences, some for their own particular extensions, Chuck Baker for all extensions (FEBE) and for selected extensions (OPIE). These are now running quite nicely in the Pale Moon community and elsewhere, wherever the XUL model is preserved.

It seems to me a reasonable request, and I realize that you donate your time most generously, such that all requests are a tad unreasonable.

Thanks!
morat
Posts: 6403
Joined: February 3rd, 2009, 6:29 pm

Re: keyconfig 20110522

Post by morat »

VLMin wrote:would this have the effect of adding those modifications to the setup
Yes, that's correct. Try transfering a single prefs.js entry at first as a test.
mueller
Posts: 11
Joined: July 11th, 2011, 3:10 am

Re: keyconfig 20110522

Post by mueller »

Is there any hope, that there will be a new version of KeyConfig in the near future, that will work with Firefox 63? Or is it completely impossible in Firefox, that keybindings can be changed? Thanks.
iPhilip
Posts: 2
Joined: September 23rd, 2015, 12:51 pm

Re: keyconfig 20110522

Post by iPhilip »

Folks,

If you would like to have a hotkey that highlights the selected text in a Thunderbird compose window, you can use this line of code:

Code: Select all

GetCurrentEditor().insertHTML("<span style=\"background-color: yellow;\">" + document.commandDispatcher.focusedWindow.getSelection() + "</span>")
Cheers!
bege
Posts: 153
Joined: January 23rd, 2009, 9:14 pm
Location: Germany

Re: keyconfig 20110522

Post by bege »

After updating to Thunderbird 60 my restart shortcut does not work any more. What is the new command?
morat
Posts: 6403
Joined: February 3rd, 2009, 6:29 pm

Re: keyconfig 20110522

Post by morat »

@bege

Try this:

Code: Select all

var os = Components.classes["@mozilla.org/observer-service;1"].
  getService(Components.interfaces.nsIObserverService);
var cancelQuit = Components.classes["@mozilla.org/supports-PRBool;1"].
  createInstance(Components.interfaces.nsISupportsPRBool);
os.notifyObservers(cancelQuit, "quit-application-requested", "restart");
if (cancelQuit.data) {
  Services.prompt.alert(window, "Keyconfig", "Abort restart process.");
} else {
  var appStartup = Components.classes["@mozilla.org/toolkit/app-startup;1"].
    getService(Components.interfaces.nsIAppStartup);
  appStartup.quit(appStartup.eAttemptQuit | appStartup.eRestart);
}
bege
Posts: 153
Joined: January 23rd, 2009, 9:14 pm
Location: Germany

Re: keyconfig 20110522

Post by bege »

@morat
you are around here for years now and as helpful as ever. Thank you very much.
Do you like to explain, what this complex code is necessary for this simple command? (It used to be just "application.restart")
morat
Posts: 6403
Joined: February 3rd, 2009, 6:29 pm

Re: keyconfig 20110522

Post by morat »

@bege

STEEL was removed so the simple code fails in Thunderbird 60.

http://developer.mozilla.org/docs/Mozil ... _API/STEEL

Code: Select all

// fails in Thunderbird 60
var Application = Components.classes["@mozilla.org/steel/application;1"].
  getService(Components.interfaces.steelIApplication);
Application.restart();
bich_30
Posts: 6
Joined: May 11th, 2010, 12:06 pm

Re: keyconfig 20110522

Post by bich_30 »

Incompatible with Thunderbird 64.
pintassilgo
Posts: 200
Joined: August 30th, 2013, 3:50 pm

Re: keyconfig 20110522

Post by pintassilgo »

Fixed version (not from the original developer) working in current versions (Firefox Developer Edition and Nightly):
https://github.com/xiaoxiaoflood/firefo ... /keyconfig

Legacy addon, not WebExtensions, but it works even in v66, as you can see in screenshot below:
https://i.imgur.com/owFYeSw.png
onix
Posts: 50
Joined: March 21st, 2007, 10:22 am

Re: keyconfig 20110522

Post by onix »

I have been trying to map an Xpunge command: Tools --> Xpunge --> MultiXpunge --> Call MultiXpunge Now to Control + Shift + X

Using DOM Inspector I found the oncommand associated with this is: xpunge_mu_doMenuActionCall(this), so I tried using

Code: Select all

goDoCommand('xpunge_mu_doMenuActionCall(this)');
both with single- and double-quotes without any luck.

Using TB 60.4.0 32-bit on Window10Pro 64-bit. Any leads for rectifying this problem would be appreciated!
Post Reply