MozillaZine


keyconfig 20110522

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

Post Posted April 7th, 2010, 6:54 am

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

Post Posted April 9th, 2010, 9:49 am

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

Post Posted April 9th, 2010, 12:41 pm

Thank you. It worked.

Amsuke
 
Posts: 60
Joined: April 3rd, 2010, 8:23 am

Post Posted April 13th, 2010, 3:24 pm

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

Post Posted April 14th, 2010, 3:19 am

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

Post Posted April 14th, 2010, 3:11 pm

Thanks, dorando. That seems to do the trick!

FireLove

User avatar
 
Posts: 108
Joined: July 27th, 2008, 5:59 pm

Post Posted April 19th, 2010, 2:07 am

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

Post Posted April 21st, 2010, 10:55 am

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

Post Posted April 22nd, 2010, 10:28 am

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

Post Posted April 23rd, 2010, 6:33 am

No, but with MenuManipulator you can edit the accesskey of the menu.

FireLove

User avatar
 
Posts: 108
Joined: July 27th, 2008, 5:59 pm

Post Posted April 23rd, 2010, 3:58 pm

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

Post Posted April 24th, 2010, 5:09 am

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

Post Posted April 25th, 2010, 12:34 pm

Any way to make this compatibie with Lanikai/Thunderbird 3.1b2pre? Thanks!

FireLove

User avatar
 
Posts: 108
Joined: July 27th, 2008, 5:59 pm

Post Posted April 25th, 2010, 3:12 pm

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!

FireLove

User avatar
 
Posts: 108
Joined: July 27th, 2008, 5:59 pm

Post Posted April 25th, 2010, 3:14 pm

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

Return to Extension/Theme Releases


Who is online

Users browsing this forum: No registered users and 1 guest