MozillaZine

keyconfig 20110522

Announce and Discuss the Latest Theme and Extension Releases.
dorando
 
Posts: 1203
Joined: January 9th, 2004, 9:57 am

Post Posted February 11th, 2006, 2:07 am

<code>var a = 'javascript.enabled'; gPrefService.setBoolPref(a,!gPrefService.getBoolPref(a));</code>

echoes

User avatar
 
Posts: 835
Joined: November 13th, 2005, 1:09 am
Location: Labyrinths of coral caves

Post Posted February 11th, 2006, 11:34 am

dorando wrote:<code>var a = 'javascript.enabled'; gPrefService.setBoolPref(a,!gPrefService.getBoolPref(a));</code>


thanks! :D

sridhar
 
Posts: 184
Joined: June 18th, 2004, 2:54 pm

Post Posted February 12th, 2006, 9:31 am

Code to paste (the URL in) clipboard in address bar and press Go please.

i.e., Alt+D followed by return key

ala ctrl+D in the latest Opera 9 preview.

old zeniko
 
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post Posted February 12th, 2006, 10:30 am

Code: Select all
var url = readFromClipboard(); if (url) content.location = url;

romanmir
 
Posts: 20
Joined: March 11th, 2005, 12:34 pm

Post Posted February 12th, 2006, 11:37 am

maybe you can tell me the answers to 2 of my questions posted here: http://forums.mozillazine.org/viewtopic.php?t=380690? Thank you.

Zoolcar9

User avatar
 
Posts: 2225
Joined: November 9th, 2004, 6:45 pm
Location: Jakarta, Indonesia (UTC+7)

Post Posted February 12th, 2006, 11:06 pm

sridhar wrote:Code to paste (the URL in) clipboard in address bar and press Go please.

i.e., Alt+D followed by return key

ala ctrl+D in the latest Opera 9 preview.

I already answered your question at TEM, haven't I?

My Firefox information | Add-ons | GitHub

"With great power, comes great desire to show it off."

alta88
 
Posts: 1020
Joined: January 28th, 2006, 3:08 pm

Post Posted February 16th, 2006, 4:31 am

hi all,

is it possible to have keys mapped a certain way only when a specific function or application is active?

specifically, i've installed Find Selection, which does a findAgain via Ctl-G on a selected text. it does this by invoking the Find toolbar function. i've remapped findAgain to be RightArrow (findPrevious to be LeftArrow), and it works fine. until i no longer want it to; breaking horizontal mouse scrolling is one side effect.

is there something like :findtoolbaractive or a js equivalent? or other method?

OldManRivuh

User avatar
 
Posts: 400
Joined: October 5th, 2004, 9:48 am
Location: Northern, CA

Post Posted February 16th, 2006, 9:07 pm

You can change the install.rdf for the keyconfig_20050908.1.xpi version
(and probably others) to make this extension work in Firefox 1.5.0.1 and
Thunderbird 1.5. Your mileage may vary, so do it at your own 'peril'.
When I upgraded to Thunderbird 1.5, it completely forgot about the keyconfig extension
for some reason. When I installed the modified version, my key assignments were still there.
(they should still be in user.js)

Code: Select all
    <targetApplication><rdf:Description>
      <id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</id>
      <minVersion>1.0</minVersion>
      <maxVersion>1.5.0.*</maxVersion>
    </rdf:Description></targetApplication>
   
    <targetApplication><rdf:Description>
      <id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</id>
      <minVersion>1.0</minVersion>
      <maxVersion>1.5.0.*</maxVersion>
    </rdf:Description></targetApplication>

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

Post Posted February 17th, 2006, 4:23 am

alta88 wrote:hi all,

is it possible to have keys mapped a certain way only when a specific function or application is active?

specifically, i've installed Find Selection, which does a findAgain via Ctl-G on a selected text. it does this by invoking the Find toolbar function. i've remapped findAgain to be RightArrow (findPrevious to be LeftArrow), and it works fine. until i no longer want it to; breaking horizontal mouse scrolling is one side effect.

is there something like :findtoolbaractive or a js equivalent? or other method?
Adding <key>s with
Code: Select all
if(document.commandDispatcher.focusedWindow.getSelection() != "")
 stonie_findSelection(0);
else
 goDoCommand("cmd_scrollRight");
and
Code: Select all
if(document.commandDispatcher.focusedWindow.getSelection() != "")
 stonie_findSelection(1);
else
 goDoCommand("cmd_scrollLeft");
might be what you want.

alta88
 
Posts: 1020
Joined: January 28th, 2006, 3:08 pm

Post Posted February 17th, 2006, 9:02 am

yes, that works perfectly! thanks dorando.

opens up a lot of possibilities for customizing and resetting keys specific to apps.

so to understand how to apply this generically, how did you find the stonie_findSelection() as the particular function active? i actually would have thought is was the findtoolbar function at that level. or if you could point me somewhere i could read up, i'd be grateful.

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

Post Posted February 18th, 2006, 3:48 am

Normally I use DOM Inspector to find these, but in this case I took a look at the code.
Support mozilla.dorando.at through donations/contributions.

LunaC

User avatar
 
Posts: 57
Joined: March 6th, 2004, 1:14 pm
Location: Toronto, Canada

Post Posted February 22nd, 2006, 5:25 pm

Is there any way to remap 'shift delete', the one that deletes items in a drop down list (remembered searches, visited urls, etc)?

I read through this whole thread and must admit I haven't a clue what half of this means, so please talk to me like i'm a newb if you can describe how to remap it ;)

ddirks
 
Posts: 17
Joined: July 21st, 2003, 9:25 am

Post Posted February 23rd, 2006, 3:56 pm

Is there a function I can use to paste a static text string into the text box under the cursor? I'd like to map a keyboard shortcut to paste in a string.

If this is not possible with keyconfig (and after a none-too-thorough perusal of the messages in this forum, I'm not sure it is), does anyone know of a good extension to do this?

Finally, as someone attempting to learn about how this all works, is there a good reference somewhere that will tell me what sorts of functions are available? For example, I know I can use goDoCommand('cmd_delete'); in T-bird to delete the current message, but is there a list of all the things I can "goDoCommand" with? And more generally, to write a function that keyconfig can understand -- any suggestions of a good starting point?

Thanks for any help,
Doug

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

Post Posted February 24th, 2006, 3:44 am

LunaC wrote:Is there any way to remap 'shift delete', the one that deletes items in a drop down list (remembered searches, visited urls, etc)?
This is hardcoded in autocomplete.xml so it cannot be changed with keyconfig. It is likely possible to create a new shortcut with
Code: Select all
gURLBar.mController.handleDelete();


ddirks wrote:Is there a function I can use to paste a static text string into the text box under the cursor? I'd like to map a keyboard shortcut to paste in a string.
Following seems to work:
Code: Select all
var editor = (event.originalTarget instanceof Components.interfaces.nsIDOMNSEditableElement) ? event.originalTarget.editor : null
if(editor) {
  if(!editor.insertText) editor = editor.QueryInterface(Components.interfaces.nsIPlaintextEditor);
  editor.insertText("ABC");
}


ddirks wrote:Finally, as someone attempting to learn about how this all works, is there a good reference somewhere that will tell me what sorts of functions are available?
I use DOM Inspector, <a href="http://xulplanet.com/references/xpcomref/">XPCOM Reference</a> and the <a href="http://lxr.mozilla.org/mozilla/">source</a>, but this needs at least basic knowledge about various <a href="http://developer.mozilla.org/#Technologies">Technologies</a> used with the Mozilla platform.

ddirks wrote:Finally, as someone attempting to learn about how this all works, is there a good reference somewhere that will tell me what sorts of functions are available? For example, I know I can use goDoCommand('cmd_delete'); in T-bird to delete the current message, but is there a list of all the things I can "goDoCommand" with?
There is a list at <a href="http://www.mozilla.org/unix/customizing.html">Customizing Mozilla</a> in the section 'Legal commands for use in custom key bindings', but it might be totally outdated.

ddirks
 
Posts: 17
Joined: July 21st, 2003, 9:25 am

Post Posted February 24th, 2006, 12:02 pm

Dorando,

Thanks for the code to paste a string. It works perfectly, and would have taken me a long time to discover on my own, I think.

Thanks also for the reference suggestions. I'll see where they lead me.

Return to Extension/Theme Releases


Who is online

Users browsing this forum: No registered users and 6 guests