Customize Shortcuts dialog is implemented here:
http://code.google.com/p/fbug/source/browse/branches/firebug1.8/content/firebug/firefox/customizeShortcuts.js
It gets all prefs with prefix
"extensions.firebug.key.shortcut."+<name> and generates the list in
the dialog.
pref("extensions.firebug.key.shortcut.<name>", "shift x");
See default shortcuts as an example:
http://code.google.com/p/fbug/source/browse/branches/firebug1.8/defaults/preferences/firebug.js#127
For the label & localization, you need to create a new string in your
string bundle
firebug.shortcut.<name>.label=Localized Shortcut Name
See Firebug string bundle
http://code.google.com/p/fbug/source/browse/branches/firebug1.8/locale/en-US/firebug.properties#661
And of course you need to define your shortcut in your firebug-overlay
overlay.
Something like:
<commandset id="mainCommandSet">
<command id="cmd_<name>" oncommand=""/>
</commandset>
<keyset id="mainKeyset">
<key id="key_<name>" key="x" modifiers="shift"
command="cmd_<name>" class="fbOnlyKey"/>
</keyset>
class="fbOnlyKey" means that the shortcut will be available only if
Firebug UI is opened and focused (to avoid collisions with web page
shortcuts)
Honza
On Jun 18, 10:28 am, Jhonte <[email protected]> wrote:
> Hello!
>
> What is the best practise of adding shortkeys to your own extension
> that extends FireBug?
>
> Since I don't want it to clash against an already existing key, is
> there a way to add your own keys into Firebug:s "Customize Shortkeys"
> option?
>
> Please point my to any documentation or where to start.
>
> Thanks!
--
You received this message because you are subscribed to the Google Groups
"Firebug" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/firebug?hl=en.