keyconfig 20110522

Announce and Discuss the Latest Theme and Extension Releases.
Post Reply
Foxxen2
Posts: 22
Joined: March 30th, 2006, 2:42 am

Post by Foxxen2 »

Apparent bug in keyconfig:
https://bugzilla.mozilla.org/show_bug.cgi?id=332271

(Also, for me, choosing "keyconfig options" from the extensions manager brings up a blank box whereas keyconfig options" from the tools menu populates it. Does anyone else get this?)
User avatar
Mickey73
Posts: 26
Joined: March 4th, 2006, 12:16 pm
Location: Toronto

Post by Mickey73 »

Hi guys,
I've been trying to create a new shortcut "Shift+Backspase" to do the same as "Ctrl+W" to close tabs. I have (Back is Close) extension, of course I'm addicted to it now. Sometime I find myself trying it in IE :-). It makes sense to have "Shift+Backspace" closing the tab if it's not the first page. I tried (cmd_close) like in "Ctrl+W", it didn't work. I want to keep the "Ctrl+W", and have "Shift+Backspace" too. What should I do?
Thanks.
Zoolcar9
Posts: 2225
Joined: November 9th, 2004, 6:45 pm
Location: Jakarta, Indonesia (UTC+7)
Contact:

Post by Zoolcar9 »


Code: Select all

BrowserCloseTabOrWindow()

My Firefox information | Add-ons | GitHub

"With great power, comes great desire to show it off."
User avatar
Mickey73
Posts: 26
Joined: March 4th, 2006, 12:16 pm
Location: Toronto

Post by Mickey73 »

It worked, thank you Zoolcar9. How can I prevent it from closing the whole window though? Sometimes one can click a few extra times by mistake.
Another question, please. You know how when you type something in the address bar, you click "Ctrl+Enter" to add (www. & .com) to it. And when you click "Shift+Enter" it adds (www. & .net) to it. How can I make "Shift+Enter" add (www. & .ca) To the entry? I need it more for our Canadian websites than (.net).
Thank you.
old zeniko
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old zeniko »

Mickey73 wrote:How can I prevent it from closing the whole window though?

Code: Select all

if (getBrowser().mTabs.length < 2) gBrowser.addTab(); BrowserCloseTabOrWindow();

Mickey73 wrote:Another question, please. You know how when you type something in the address bar, you click "Ctrl+Enter" to add (www. & .com) to it. And when you click "Shift+Enter" it adds (www. & .net) to it. How can I make "Shift+Enter" add (www. & .ca) To the entry? I need it more for our Canadian websites than (.net).

Add <a href="data:text/javascript,window.__preUC_handleURLBarCommand%20%3D%20window.handleURLBarCommand%3B%0Awindow.handleURLBarCommand%20%3D%20function(aTriggeringEvent)%0A%7B%0A%09const%20SHIFT_ENTER_URL%20%3D%20%22http%3A%2F%2Fwww.%25s.net%2F%22%3B%0A%09%0A%09if%20(!gURLBar)%0A%09%7B%0A%09%09return%3B%0A%09%7D%0A%09%0A%09if%20(aTriggeringEvent%20%26%26%20aTriggeringEvent.shiftKey%20%26%26%20!aTriggeringEvent.ctrlKey)%0A%09%7B%0A%09%09if%20(!%2F%5E(%5Cw%2B%3A%7Cwww%5C.)%7C%5C%2F%5Cs*%24%2Fi.test(gURLBar.value))%0A%09%09%7B%0A%09%09%09gURLBar.value%20%3D%20SHIFT_ENTER_URL.replace(%22%25s%22%2C%20gURLBar.value.replace(%2F%5E%5Cs%2B%7C%5Cs%2B%24%2Fg%2C%20%22%22).replace(%2F%20%2Fg%2C%20%22%2520%22))%3B%0A%09%09%7D%0A%09%7D%0A%09%0A%09window.__preUC_handleURLBarCommand(aTriggeringEvent)%3B%0A%7D%3B%0A">these lines</a> to your userChrome.js and replace "http://www.%s.net/" with "http://www.%s.ca/" (or whatever you prefer).
dorando
Posts: 1203
Joined: January 9th, 2004, 9:57 am
Contact:

Post by dorando »

Foxxen2 wrote:Apparent bug in keyconfig:
https://bugzilla.mozilla.org/show_bug.cgi?id=332271
Not a bug, described there.

Foxxen2 wrote:(Also, for me, choosing "keyconfig options" from the extensions manager brings up a blank box whereas keyconfig options" from the tools menu populates it. Does anyone else get this?)
In the official version the keyconfig screen cannot be reached from the Extension Manager as this screen is a tool for editing the application and not a tool for editing the keyconfig prefs.

Mickey73 wrote:It worked, thank you Zoolcar9. How can I prevent it from closing the whole window though?
gBrowser.removeCurrentTab();
User avatar
Mickey73
Posts: 26
Joined: March 4th, 2006, 12:16 pm
Location: Toronto

Post by Mickey73 »

Thank you zeniko, they worked.
User avatar
Mickey73
Posts: 26
Joined: March 4th, 2006, 12:16 pm
Location: Toronto

Post by Mickey73 »

Perfect, thank you dorando.
Foxxen2
Posts: 22
Joined: March 30th, 2006, 2:42 am

Post by Foxxen2 »

dorando wrote:
Foxxen2 wrote:Apparent bug in keyconfig:
https://bugzilla.mozilla.org/show_bug.cgi?id=332271
Not a bug, described there.

Thanks dorando, I thought it was a problem in the core Fx key handler (hence bugzilla)...

Anyhow I've moved its status there from "invalid" to "open" again, in view of your response, hope thats right :)
********
Posts: 947
Joined: August 24th, 2005, 12:23 pm

Post by ******** »

what's the code to toggle the find bar?

to clarify:
1. if find bar is hidden, open it and focus the text box.
2. else if find bar is already open, hide it.

by default, ctrl+f already does the first half.

thanks in advance.
Zoolcar9
Posts: 2225
Joined: November 9th, 2004, 6:45 pm
Location: Jakarta, Indonesia (UTC+7)
Contact:

Post by Zoolcar9 »


Code: Select all

var findToolbar = document.getElementById("FindToolbar");
if(typeof gFindBar == "object") { //Bon Echo 2.0a3
  if(findToolbar.hidden) gFindBar.onFindCmd();
  else gFindBar.closeFindBar();
} else {
  if(findToolbar.hidden) onFindCmd();
  else closeFindBar();
}
Last edited by Zoolcar9 on June 4th, 2006, 11:20 am, edited 4 times in total.
My Firefox information | Add-ons | GitHub

"With great power, comes great desire to show it off."
********
Posts: 947
Joined: August 24th, 2005, 12:23 pm

Post by ******** »

thanks, Zoolcar9. :)

the funny thing is, when you type (for example) "h" into the find bar and then hide the find bar and then you do "find next", it still finds "h".

this is not a bug in your code. it also applies to the "close find bar" button.
alta88
Posts: 1029
Joined: January 28th, 2006, 3:08 pm

Post by alta88 »

findbar could use a good code review.. and it would be nice to have searchwp type terms buttons, add words to search instead of just replace, maybe a wordcount, esp nice would be word 3 of 10 is focused on the page.

i've done some customization on it, and in fact test findbar close button press and clear buffers like this and dehighlight.

thanks to userchrome.js these things are simpler than before.
wcyee
Posts: 5
Joined: April 14th, 2006, 7:38 pm

keyconfig disabled by Firefox 1.5.0.2 upgrade

Post by wcyee »

Upgrading to Firefox 1.5.0.2 disabled keyconfig 20050908.2 because it's "incompatible". After two hours, I'm sorely missing all my shortkeys. Any idea if I can tweak some config file or where to find a "compatible" version?

Thanks!
dorando
Posts: 1203
Joined: January 9th, 2004, 9:57 am
Contact:

Re: keyconfig disabled by Firefox 1.5.0.2 upgrade

Post by dorando »

wcyee wrote:Upgrading to Firefox 1.5.0.2 disabled keyconfig 20050908.2 because it's "incompatible". After two hours, I'm sorely missing all my shortkeys. Any idea if I can tweak some config file or where to find a "compatible" version?

Thanks!
It should work by now, but you likely need to click Tools > Extensions > Find Updates. Blame the devs for not releasing a Release Candidate.
Post Reply