keyconfig 20110522
-
- Posts: 1934
- Joined: February 10th, 2008, 6:30 am
- Location: Hungary
Re: keyconfig 20110522
Hi!
How can I disable alt+[starting character] focusing the menu items on the menu bar? It's a garbage feature, the removes hotkey possibilities essentially randomly. (Based on what characters the menu names start with in your particular locale)
Even XUL addons like keyconfig can't override this apparently.
How can I disable alt+[starting character] focusing the menu items on the menu bar? It's a garbage feature, the removes hotkey possibilities essentially randomly. (Based on what characters the menu names start with in your particular locale)
Even XUL addons like keyconfig can't override this apparently.
-
- Posts: 6421
- Joined: February 3rd, 2009, 6:29 pm
Re: keyconfig 20110522
@avada
You can set ui.key.menuAccessKey to 0 in about:config to disable them.
More info: http://forums.mozillazine.org/viewtopic ... &t=2169503
Also,
You can set ui.key.menuAccessKey to 0 in about:config to disable them.
More info: http://forums.mozillazine.org/viewtopic ... &t=2169503
Also,
Code: Select all
document.getElementById("helpMenu").removeAttribute("accesskey");
Code: Select all
(function () {
var menus = document.getElementById("main-menubar").children;
for (var i = 0; i < menus.length; i++) {
menus[i].removeAttribute("accesskey");
}
})();
-
- Posts: 1934
- Joined: February 10th, 2008, 6:30 am
- Location: Hungary
Re: keyconfig 20110522
Thanks. I assumed I could use -1 ui.key.* keys, one of them was even set to -1.morat wrote:You can set ui.key.menuAccessKey to 0 in about:config to disable them.
morat wrote:Also,
Code: Select all
document.getElementById("helpMenu").removeAttribute("accesskey");
Code: Select all
(function () {
var menus = document.getElementById("main-menubar").children;
for (var i = 0; i < menus.length; i++) {
menus.removeAttribute("accesskey");
}
})();
I guess this should go into an uc.js file?
-
- Posts: 6421
- Joined: February 3rd, 2009, 6:29 pm
Re: keyconfig 20110522
@avada
Put the code snippet with your initialization code.
e.g. mozilla.cfg or userChrome.js or whatever
Put the code snippet with your initialization code.
e.g. mozilla.cfg or userChrome.js or whatever
-
- Posts: 1934
- Joined: February 10th, 2008, 6:30 am
- Location: Hungary
Re: keyconfig 20110522
Hi!
I have these as keys to open the two variants of quick findbar:
They worked find in the past, but now they can only open the quick findbar, if the findbar was opened before manually for that tab. So not really useful like this.
I have these as keys to open the two variants of quick findbar:
Code: Select all
gFindBar.startFind(gFindBar.FIND_TYPEAHEAD);
Code: Select all
gFindBar.startFind(gFindBar.FIND_LINKS);
-
- Posts: 6421
- Joined: February 3rd, 2009, 6:29 pm
Re: keyconfig 20110522
@avada
Try this:
Reference
http://searchfox.org/mozilla-release/se ... indCommand
FYI:
These are equivalent...
Try this:
Code: Select all
if (gFindBarInitialized) {
alert("findbar initialized");
gFindBar.startFind(gFindBar.FIND_TYPEAHEAD);
} else {
alert("findbar not initialized");
gFindBarPromise.then(function (fb) {
fb.startFind(fb.FIND_TYPEAHEAD);
});
}
http://searchfox.org/mozilla-release/se ... indCommand
FYI:
These are equivalent...
Code: Select all
gFindBarPromise.then(function (fb) {
fb.startFind(fb.FIND_TYPEAHEAD);
});
Code: Select all
(async function () {
var fb = await gFindBarPromise;
fb.startFind(fb.FIND_TYPEAHEAD);
})();
-
- Posts: 1934
- Joined: February 10th, 2008, 6:30 am
- Location: Hungary
Re: keyconfig 20110522
Thanks, it works.morat wrote:@avada
Try this:
ReferenceCode: Select all
if (gFindBarInitialized) { alert("findbar initialized"); gFindBar.startFind(gFindBar.FIND_TYPEAHEAD); } else { alert("findbar not initialized"); gFindBarPromise.then(function (fb) { fb.startFind(fb.FIND_TYPEAHEAD); }); }
http://searchfox.org/mozilla-release/se ... indCommand
FYI:
These are equivalent...
Code: Select all
gFindBarPromise.then(function (fb) { fb.startFind(fb.FIND_TYPEAHEAD); });
Code: Select all
(async function () { var fb = await gFindBarPromise; fb.startFind(fb.FIND_TYPEAHEAD); })();
-
- Posts: 1934
- Joined: February 10th, 2008, 6:30 am
- Location: Hungary
Re: keyconfig 20110522
@morat
Hi!
A good while ago got this code from you to hide the UI, reversibly via a hotkey:
Which still works fine. I only use it for the tab bar now. What I want to ask is: Can it be changed to be applied by default and be shown via hotkey? I guess not with keyconfig, but maybe the code can be moved to a Custombuttons button.
Hi!
A good while ago got this code from you to hide the UI, reversibly via a hotkey:
Code: Select all
var css = [];
css.push("#TabsToolbar { visibility: collapse !important; }");
//css.push("#navigator-toolbox {visibility: collapse;}");
//css.push("browser {margin-right: -14px; margin-bottom: -14px;}");
//css.push("#toolbar-menubar {visibility: collapse;}");
// css.push("...");
// css.push("...");
// css.push("...");
// css.push("...");
var ios = Components.classes["@mozilla.org/network/io-service;1"].
getService(Components.interfaces.nsIIOService);
var uri = ios.newURI("data:text/css," + encodeURIComponent(css.join("\n")), null, null);
var sss = Components.classes["@mozilla.org/content/style-sheet-service;1"].
getService(Components.interfaces.nsIStyleSheetService);
if (sss.sheetRegistered(uri, sss.USER_SHEET)) {
sss.unregisterSheet(uri, sss.USER_SHEET);
} else {
sss.loadAndRegisterSheet(uri, sss.USER_SHEET);
}
-
- Posts: 6421
- Joined: February 3rd, 2009, 6:29 pm
Re: keyconfig 20110522
@avada
Run the code in a custom buttons init tab. Run the same code using a keyconfig hotkey.
Run the code in a custom buttons init tab. Run the same code using a keyconfig hotkey.
-
- Posts: 1934
- Joined: February 10th, 2008, 6:30 am
- Location: Hungary
Re: keyconfig 20110522
I had that thought as well. But it's not reliable. I'm quite sure it runs twice if I have two windows in the session. So it remains visible.morat wrote:@avada
Run the code in a custom buttons init tab. Run the same code using a keyconfig hotkey.
-
- Posts: 6421
- Joined: February 3rd, 2009, 6:29 pm
Re: keyconfig 20110522
@avada
Try something like:
* <profile folder>\user.js
About user.js
http://kb.mozillazine.org/User.js_file
* a custom buttons init tab
* a keyconfig hotkey
P.S.
Here is how to run a code snippet once per session in each window.
Run once per session
http://odyseus.github.io/CustomButtons/ ... started-11
Try something like:
* <profile folder>\user.js
Code: Select all
user_pref("extensions.custombuttons.css.initialized", false);
http://kb.mozillazine.org/User.js_file
* a custom buttons init tab
Code: Select all
var pref = "extensions.custombuttons.css.initialized";
if (Services.prefs.getBoolPref(pref) == false) {
var css = "#menubar-items { background-color: orange !important; }";
var ios = Components.classes["@mozilla.org/network/io-service;1"].
getService(Components.interfaces.nsIIOService);
var uri = ios.newURI("data:text/css," + encodeURIComponent(css), null, null);
var sss = Components.classes["@mozilla.org/content/style-sheet-service;1"].
getService(Components.interfaces.nsIStyleSheetService);
var type = sss.USER_SHEET;
if (sss.sheetRegistered(uri, type)) sss.unregisterSheet(uri, type);
else sss.loadAndRegisterSheet(uri, type);
Services.prefs.setBoolPref(pref, true);
}
Code: Select all
var css = "#menubar-items { background-color: orange !important; }";
var ios = Components.classes["@mozilla.org/network/io-service;1"].
getService(Components.interfaces.nsIIOService);
var uri = ios.newURI("data:text/css," + encodeURIComponent(css), null, null);
var sss = Components.classes["@mozilla.org/content/style-sheet-service;1"].
getService(Components.interfaces.nsIStyleSheetService);
var type = sss.USER_SHEET;
if (sss.sheetRegistered(uri, type)) sss.unregisterSheet(uri, type);
else sss.loadAndRegisterSheet(uri, type);
Here is how to run a code snippet once per session in each window.
Run once per session
http://odyseus.github.io/CustomButtons/ ... started-11
-
- Posts: 1934
- Joined: February 10th, 2008, 6:30 am
- Location: Hungary
Re: keyconfig 20110522
@morat
Thanks!
Thanks!
-
- Posts: 153
- Joined: September 13th, 2009, 1:12 pm
Re: keyconfig 20110522
I want to map View -> Message Source to something else. It's currently Command+U. I'd like to change it to just the u key, like r is reply and f is forward. How can I do that?
-
- Posts: 6421
- Joined: February 3rd, 2009, 6:29 pm
Re: keyconfig 20110522
@godzfire
Are you using the tbkeys or tbkey-lite addon?
The command to view message source...
You cannot run arbitrary javascript with tbkeys-lite.
You can use the cmd shorthand and func shorthand with tbkeys and tbkeys-lite.
Use the cmd shorthand for calling a command using the goDoCommand method.
For example, "cmd:cmd_nextMsg" is the same as "window.goDoCommand('cmd_nextMsg');".
Use the func shorthand for calling a function on the window object without a parameter.
For example, "func:MsgNewMessage" is the same as "window.MsgNewMessage();".
Tips: http://forums.mozillazine.org/viewtopic ... #p14872763
Are you using the tbkeys or tbkey-lite addon?
The command to view message source...
Code: Select all
window.goDoCommand('cmd_viewPageSource');
You can use the cmd shorthand and func shorthand with tbkeys and tbkeys-lite.
Use the cmd shorthand for calling a command using the goDoCommand method.
For example, "cmd:cmd_nextMsg" is the same as "window.goDoCommand('cmd_nextMsg');".
Use the func shorthand for calling a function on the window object without a parameter.
For example, "func:MsgNewMessage" is the same as "window.MsgNewMessage();".
Tips: http://forums.mozillazine.org/viewtopic ... #p14872763
-
- Posts: 153
- Joined: September 13th, 2009, 1:12 pm
Re: keyconfig 20110522
That works, thanks!