MozillaZine

keyconfig 20110522

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

Post Posted August 24th, 2018, 5:31 pm

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: 2955
Joined: February 3rd, 2009, 6:29 pm

Post Posted August 25th, 2018, 6:33 am

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/Web/API/KeyboardEvent/key/Key_Values

CustomizableUI example: viewtopic.php?f=38&t=3040673

VLMin
 
Posts: 60
Joined: April 14th, 2006, 7:15 pm

Post Posted October 16th, 2018, 3:37 pm

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.

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

Post Posted October 16th, 2018, 5:09 pm


VLMin
 
Posts: 60
Joined: April 14th, 2006, 7:15 pm

Post Posted October 16th, 2018, 7:33 pm

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: 2955
Joined: February 3rd, 2009, 6:29 pm

Post Posted October 16th, 2018, 8:57 pm

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

Post Posted November 3rd, 2018, 12:01 am

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

Post Posted November 5th, 2018, 5:02 pm

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: 115
Joined: January 23rd, 2009, 9:14 pm
Location: Germany

Post Posted November 10th, 2018, 2:23 pm

After updating to Thunderbird 60 my restart shortcut does not work any more. What is the new command?

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

Post Posted November 10th, 2018, 3:34 pm

@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: 115
Joined: January 23rd, 2009, 9:14 pm
Location: Germany

Post Posted November 10th, 2018, 3:39 pm

@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: 2955
Joined: February 3rd, 2009, 6:29 pm

Post Posted November 10th, 2018, 4:38 pm

@bege

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

http://developer.mozilla.org/docs/Mozilla/Tech/Toolkit_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

Post Posted November 20th, 2018, 12:54 am

Incompatible with Thunderbird 64.

Return to Extension/Theme Releases


Who is online

Users browsing this forum: No registered users and 4 guests