keyconfig 20110522

Announce and Discuss the Latest Theme and Extension Releases.
Post Reply
mad.engineer
Posts: 314
Joined: August 8th, 2006, 4:08 pm

Re: keyconfig 20080929

Post by mad.engineer »

Hi dorando,

I assigned a different key this time (Shift+F2) to your code in key config (from the one that was using earlier) and now it works !. Not sure why it would not work earlier.

But now every time I press the key, the address field toggles the way I expect it to be, but this pop-up message show up: http://img402.imageshack.us/img402/7541 ... shottb.jpg ?. Is there any way to have your code not show this pop-up message?. Thanks again. I appreciate your support.
dorando
Posts: 1203
Joined: January 9th, 2004, 9:57 am
Contact:

Re: keyconfig 20080929

Post by dorando »

Remove the

Code: Select all

alert(focusCache.join("\n\n")); 
line or use the previous code.
mad.engineer
Posts: 314
Joined: August 8th, 2006, 4:08 pm

Re: keyconfig 20080929

Post by mad.engineer »

Thank you. It worked.
Amsuke
Posts: 60
Joined: April 3rd, 2010, 8:23 am

Re: keyconfig 20080929

Post by Amsuke »

I'm currently using this:

Code: Select all


commandDispatcher.focusedWindow.scrollByLines(7);




...for the Up/Down arrow keys. I have discovered an area where this is a problem. If I'm in a drop down text box (for example, doing a search on Amazon), then using the up/down arrows doesn't just navigate the drop down list, it also scrolls the page - which, of course, wrecks the whole navigation.

Is there any way around this? So that this code is only used when there is no focus, and if there is focus (such as in a list, multi-line text box, etc...), the regular up/down function will be preserved?
dorando
Posts: 1203
Joined: January 9th, 2004, 9:57 am
Contact:

Re: keyconfig 20080929

Post by dorando »

Try

Code: Select all

if(commandDispatcher.focusedWindow.document.designMode == "on")
 
goDoCommand("cmd_lineNext");

var 
target commandDispatcher.focusedElement;
if(!(
target instanceof HTMLInputElement && (target.type == "text" || target.type == "password")))
 
commandDispatcher.focusedWindow.scrollByLines(7); 
Amsuke
Posts: 60
Joined: April 3rd, 2010, 8:23 am

Re: keyconfig 20080929

Post by Amsuke »

Thanks, dorando. That seems to do the trick!
User avatar
FireLove
Posts: 108
Joined: July 27th, 2008, 5:59 pm

Re: keyconfig 20080929

Post by FireLove »

Hi dorando,

Please help me with the code to summon Status Bar when in Full Screen mode.
I'd like to stay in Full Screen more, but need to goodies in my status bar ...

And can you please tell me, how I can enable/disable particular user styles with a shortcuts.
Is it possible to do with keyconfig, so I could have all my shortcuts in one place?
dorando
Posts: 1203
Joined: January 9th, 2004, 9:57 am
Contact:

Re: keyconfig 20080929

Post by dorando »

FireLove wrote:Please help me with the code to summon Status Bar when in Full Screen mode.
Try

Code: Select all

document.getElementById("status-bar").removeAttribute("moz-collapsed"); 
or for userChrome.css

Code: Select all

#status-bar[moz-collapsed] { visibility: visible; }         
(can still be hidden trough View > Status Bar).

FireLove wrote:And can you please tell me, how I can enable/disable particular user styles with a shortcuts.
Depends on what you actually want, but with

Code: Select all

var url = ContentAreaUtils.ioService.newURI("_URL_", 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(url, type))
 sss.unregisterSheet(url, type);
else
 sss.loadAndRegisterSheet(url, type); 
you could load a file as a combined userContent.css/userChrome.css. Replace the _URL_ with the file: url, but http:// also seems to work, as does data: ( data:text/css;charset=utf-8,*%20%7B%20color%3A%20red%20!important%20%7D ).
Amsuke
Posts: 60
Joined: April 3rd, 2010, 8:23 am

Re: keyconfig 20080929

Post by Amsuke »

By default, Firefox assigns Alt+S to the "History" pull down menu. This gets in the way of a lot of forums, which use Alt+S to post.

Is there any way I can use keyconfig to change the hotkey assigned to the "History" pulldown menu? Or at least to unbind it, so it's free to use in web pages themselves?
dorando
Posts: 1203
Joined: January 9th, 2004, 9:57 am
Contact:

Re: keyconfig 20080929

Post by dorando »

No, but with MenuManipulator you can edit the accesskey of the menu.
User avatar
FireLove
Posts: 108
Joined: July 27th, 2008, 5:59 pm

Re: keyconfig 20080929

Post by FireLove »

dorando wrote:
FireLove wrote:Please help me with the code to summon Status Bar when in Full Screen mode.
Try

Code: Select all

document.getElementById("status-bar").removeAttribute("moz-collapsed"); 


Thanks!
works fine!

Now I have another problem :roll: :D
- how do I switch it back to hiding, preferably with the same shortcut (while I stay in Full Screen)
dorando
Posts: 1203
Joined: January 9th, 2004, 9:57 am
Contact:

Re: keyconfig 20080929

Post by dorando »

Try

Code: Select all

var node document.getElementById("status-bar");

if(
node.hasAttribute("moz-collapsed")) 
 
node.removeAttribute("moz-collapsed");
else
 
node.setAttribute("moz-collapsed","true"); 
dpdp
Posts: 37
Joined: September 1st, 2003, 8:36 am

Re: keyconfig 20080929

Post by dpdp »

Any way to make this compatibie with Lanikai/Thunderbird 3.1b2pre? Thanks!
User avatar
FireLove
Posts: 108
Joined: July 27th, 2008, 5:59 pm

Re: keyconfig 20080929

Post by FireLove »

dorando wrote:Try

Code: Select all

var node = document.getElementById("status-bar");

if(
node.hasAttribute("moz-collapsed")) 
 node
.removeAttribute("moz-collapsed");
else
 node.setAttribute("moz-collapsed","true"); 


Woohoo!!!
You always make me go WOW!
Thank you very much!
You always make my day!
User avatar
FireLove
Posts: 108
Joined: July 27th, 2008, 5:59 pm

Re: keyconfig 20080929

Post by FireLove »

Wow, it even works in Regular (non Full) Screen mode !!!
Post Reply