MozillaZine

keyconfig 20110522

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

Post Posted March 10th, 2009, 6:23 am

Compatibility information has been updated, it might be necessary to click on Tools > Add-ons > Find Updates (which will incorrectly state at the top that "No updates were found" while "A compatibility update has been applied" as stated below the extension name) if the extensions didn't get re-enabled already.

Note that it is possible to disable compatibility checking by adding a boolean 'extensions.checkCompatibility' through about:config.

pooz wrote:Where are these scopes and method-calls written, from that you wrote these codes?
The global scope is just there, any JavaScript included by an overlay should run within it. The function calls are in elements.xul within chrome://dta/content/integration/ (View > Page Source to look into it), while the object containing the functions is defined in the elements.js.
pooz wrote:Is there a way, to call a bookmark/specific URL in a new Tab also by a keycommand?
Try
Code: Select all
gBrowser.selectedTab = gBrowser.addTab(getShortcutOrURI('keyword',{}));    


kriegaex wrote:When I update Firefox or Thunderbird, keyconfig often is the only add-on which does not work because of a compatibility check. This could be fixed easily by specifying something like 2.0.* as MaxVersion for TB and 3.0.* for FF.
Stating to support maxVersion of 3.0.* (the * is not wildcard character, it means infinity) would be claiming something impossible to know. As stated before, It is not my responsibility to work around an issue the Mozilla devs intentionally introduced, they could have chosen to treat a maxVersion of 3.0 as 3.0.* instead of loading that burden unto the extension authors.

Note that you should have been notified that "This update will cause some of your extensions and/or themes to stop working until they are updated." before you upgraded.
kriegaex wrote:In the very improbable case of a minor version upgrade really interfering with keyconfig, [...]
Sadly "minor version upgrade"s did far too often break extension, as did keyconfig not that long ago because Firefox 3.0.2 changed a "~10 year old behavior in a breaking way".

dubsey wrote:1. OK, as on Opera the hotkey for home page is Ctrl + SPACE . But on the current Keyconfig I'm using it does not say "SPACE" instead it says nothing at all as in "ctrl + " can this be fixed for the next version so that spacebar is shown
On my list of things to consider. Note that keyconfig displays it currently in the same way as Firefox would in the menu.
dubsey wrote:3. What about a nice little menu icon for Keyconfig, so that we can optionally access Keyconfig via the menu bar
Assuming you meant the toolbar (as there should be a Tools > Keyconfig…), I've added this to my list, but with a low priority. You likely can create your own buttons with Custom Buttons or Custom Buttons².
dubsey wrote:4. Anything on publishing this highly useful on 'firefox addons' website and then using this thread for all development builds etc
My latest post regarding Mozilla Add-ons seems still to be valid (note the comment posted February 9, 2009 on the extension page). Even if all the issues would finally be completely gone, by now I'm wondering if the pain maintaining an entry over there would be worth it at all.
dubsey wrote:5. Waht about a basic 'options' window where we can see addons version properly, as well as authour's name [...]
Tools > Add-ons lists the version, context menu > About <extension> the author and contributors.
dubsey wrote:[...] a menu option to 'restart firefox' with a confirm box
The wording is slightly off in keyconfig, a restart should be never necessary, some changes will only take effect on new windows (resetting a key, updating the key displayed in menu), simple editing should take effect immediately. Adding a button for this might be an overkill since I hope to remove any need for it in the future. Note that a button for this was supposed to be included in Firefox.

jek60 wrote:[...] can I use keyconfig to map ctrl-a, ctrl-n, ctrl-b, ctrl-f, ctrl-n, ctrl-p, and ctrl-w to do the emacs action while in edit boxes?
You should be able to assign those like
Code: Select all
goDoCommand("cmd_charPrevious");  
. Note that cmd_deleteToBeginningOfLine seems to be broken, you likely need to use
Code: Select all
goDoCommand("cmd_selectBeginLine"); goDoCommand("cmd_delete");  
instead. Also note that some combinations like Ctrl+A (grayed out in keyconfig) can't be used without setting ui.key.accelKey to 18 (changes most Ctrl+ to Alt+) or 224 (changes most Ctrl+ to Meta+ which is unusable on windows).

If you want to use the original shortcuts outside edit boxes, you could use something like:
Code: Select all
if(commandDispatcher.focusedElement instanceof Components.interfaces.nsIDOMNSEditableElement) {
 goDoCommand("cmd_charNext");
}
 else {
 gFindBar.onFindCommand();
}
 
. Use double click or the still misnamed Edit this key from the context menu to get the code from an existing key.

kriegaex
 
Posts: 26
Joined: October 11th, 2006, 4:17 am

Post Posted March 10th, 2009, 7:14 am

@Dorando: Well, manually setting 3.0.* works for me, so it would for other users of your extension, too. As for minor updates breaking add-ons: Yes, as I said, it can happen, but it only happens sometimes, whereas updates disabling your add-on happens always, unless your users decide to disable the compatibility check globally. You are putting a burden on them this way, to use your own words. My suggestion is one which works fairly well for most other extensions, other authors do it that way.

BTW, if any minor upgrade would break keyconfig again, users would have to wait for you to update it anyway. If the extension does not work because of an incompatibility or because of restrictive versioning does not matter in that case, except for one thing: The user is in control and can decide to disable keyconfig if he does not want to use it until the next update. You however are kind of forcing users to wait for your updates, even if keyconfig would work with version checking disabled.

I can always work around this, but maybe you want to do less technically adept users a favour and reconsider your versioning scheme like other authors did. If any update would leave keyconfig intact, you could relax and would not have to do anything. No updates just because a minor version digit has been incremented. Less work for you, less fuss and a more continuous user experience for us. We do not expect you to release an update everytime Mozilla does, but only if something is broken or if you want to present us with a new feature.

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

Post Posted March 10th, 2009, 8:03 am

kriegaex wrote:Yes, as I said, it can happen, but it only happens sometimes, [...]
Far too often in fact. On the other hand, some extensions are so minimal and use something so well defined and used that they have a smaller likelihood of breaking by the next major versions than others have with minor updates...
kriegaex wrote:[...] whereas updates disabling your add-on happens always, [...]
Actually that should only happen if the warning is ignored one gets if "Warn me if this will disable any of my add-ons" is checked (which is by default).
kriegaex wrote:You are putting a burden on them this way, to use your own words.
Again, It is not my responsibility to work around an issue the Mozilla devs intentionally introduced, blame them if you want to blame anyone.
kriegaex wrote:[...] other authors do it that way.
If they feel comfortable with that, let them, I simply don't like to claim something I can't possibly know...

kriegaex
 
Posts: 26
Joined: October 11th, 2006, 4:17 am

Post Posted March 10th, 2009, 8:08 am

You want to be right. Just fine, be. I can live with that, even though I do not understand your arguments. Furthermore, I still like keyconfig and will continue use it, even though it means I will have to continue working around this issue. No offense meant, no harm done.

Cleverson
 
Posts: 11
Joined: March 11th, 2009, 3:09 pm

Post Posted March 11th, 2009, 5:09 pm

Hello:

I'd like a key to go to the next/previous folder with unread messages in Thunderbird, skipping the displayed question. It's not the same as [p/n]; the key must skip all possibly unread messages in this folder, then go to the next folder containing unread messages, and do not display that alert asking whether I'm sure I want to go to that folder. How can I do it?

Thanks and congratulations for this excelent extension that is Keyconfig.

Cleverson

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

Post Posted March 12th, 2009, 5:18 am

Try
Code: Select all
var nextMode = pref.getIntPref("mailnews.nav_crosses_folders");
pref.setIntPref("mailnews.nav_crosses_folders", 0);

CrossFolderNavigation(nsMsgNavigationType.nextUnreadMessage);
try { SetFocusThreadPaneIfNotOnMessagePane(); } catch(err){}

pref.setIntPref("mailnews.nav_crosses_folders", nextMode); 

ChrisCairns
 
Posts: 107
Joined: March 12th, 2009, 12:58 am

Post Posted March 15th, 2009, 6:32 am

can someone please write a code which helps me change the shorrcut for "Move to frame" which by default is F6

Bonhomme7h
 
Posts: 5
Joined: March 15th, 2009, 6:15 pm

Post Posted March 15th, 2009, 6:36 pm

It is possible to create one different shortcut for each of my favorite search engine to search highlighted text?

Thank you!

Remi Dionne

johnnygers
 
Posts: 1
Joined: March 16th, 2009, 6:12 am

Post Posted March 16th, 2009, 6:31 am

I like this addon (thanks!), but it's the only one that constantly breaks.
dorando wrote:
kriegaex wrote:[...] other authors do it that way.
If they feel comfortable with that, let them, I simply don't like to claim something I can't possibly know...
OR, you can actually follow the development guidelines at: https://developer.mozilla.org/en/Install_Manifests

Code: Select all
Extensions compatible with Firefox 3 should specify a maxVersion of 3.0.*, so that they are automatically compatible with security and stability updates. Extensions compatible only with Firefox or Thunderbird 2 should specify a maxVersion of 2.0.0.*.
It's not just a "claim of something you can't possibly know". It's a contract on the version numbering schemes: 3.0.* are only security/stability related and should not break the addons. and even if they did , you'd have to update it anyway!

dorando wrote:
kriegaex wrote:You are putting a burden on them this way, to use your own words.
Again, It is not my responsibility to work around an issue the Mozilla devs intentionally introduced, blame them if you want to blame anyone.


Hard to blame mozilla if you are the one not following the guidelines. It is a silly "feature", i agree, but it's not going away.

Now there are ways to fix this:
1) Follow the guidelines
2) Ignore the "feature" and label YOUR addon as 3.* compatible instead of forcing people to turn it off for ALL addons.
3) Be unecessarily restrictive about the version numbers, and keep things as they are, but UPDATE the addon every time it breaks instead of taking 3 weeks to change a single character in a text file?

just my 2cents.

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

Post Posted March 17th, 2009, 5:06 am

ChrisCairns wrote:can someone please write a code which helps me change the shorrcut for "Move to frame" which by default is F6
F6 is, like some others, defined in a way which can't currently be supported by keyconfig, so you won't be able to change/disable it. If you wanted to add an alternative shortcut you can Add a new key (button on the lower left on the keyconfig screen) with:
Code: Select all
var utils = commandDispatcher.focusedWindow.QueryInterface(Components.interfaces.nsIInterfaceRequestor).
getInterface(Components.interfaces.nsIDOMWindowUtils);

utils.sendKeyEvent("keydown", KeyEvent.DOM_VK_F6, 0, 0);
utils.sendKeyEvent("keypress", KeyEvent.DOM_VK_F6, 0, 0);
utils.sendKeyEvent("keyup", KeyEvent.DOM_VK_F6, 0, 0);  
which should simulate pressing F6. Also note that functions for keyconfig provides f4kc_FocusNextFrame which also might be what you want.

Bonhomme7h wrote:It is possible to create one different shortcut for each of my favorite search engine to search highlighted text?
Try
Code: Select all
var ss = Cc["@mozilla.org/browser/search-service;1"].getService(Ci.nsIBrowserSearchService);

var submission = ss.getEngineByAlias("keyword").getSubmission(getBrowserSelection(), null);

if (submission)
 getBrowser().loadOneTab(submission.uri.spec, null, null, submission.postData, null, false);   
. Change keyword to a keyword you assigned through the Manage Search Engines dialog.

johnnygers wrote:
dorando wrote:
kriegaex wrote:[...] other authors do it that way.
If they feel comfortable with that, let them, I simply don't like to claim something I can't possibly know...
OR, you can actually follow the development guidelines at: https://developer.mozilla.org/en/Install_Manifests
The text preceding the one you cited states
this allows the extension author to specify which versions of Firefox an extension has been tested with.
as does Extension Versioning, Update and Compatibility which continues with
In particular you should never specify a maxVersion that is larger than the currently available version of the application since you do not know what API and UI changes are just around the corner.
and also states
For the maxVersion it is generally permissible to use a * in place of the minor version [...]
in contrast to the "should" from the Install Manifests document.
johnnygers wrote:3.0.* are only security/stability related and should not break the addons.
Yes, should not break is correct, but they did and far too often at that. But this isn't about how likely it is that the extension would break anyway (as a note the keyconfig version which got broken in 3.0.2 does seem to work in current 3.1b4pre builds, so keyconfig is now more likely to break due to minor releases than due to major)...
johnnygers wrote:
dorando wrote:
kriegaex wrote:You are putting a burden on them this way, to use your own words.
Again, It is not my responsibility to work around an issue the Mozilla devs intentionally introduced, blame them if you want to blame anyone.
Hard to blame mozilla if you are the one not following the guidelines.
In the past (Firefox 1.0PR/1.0 ?) authors needed to make compatibility claims against an "extension compatibility
version" which would only change "when there are major changes" since, as the submitter noted, "The onus should be on the
application developers not to break functionality between subminor releases." For later Releases (Firefox 1.5 onward ?) the devs stopped claiming to provide an extension environment which wouldn't change between releases (impossible anyway in the way extensions work) and instead asked authors to claim support for unreleased "subminor releases" on the same branch.

As said, this issue you perceive has not existed before and has been intentionally introduced, and, as said too, could have been easily avoided by the devs.
johnnygers wrote:[...] but UPDATE the addon every time it breaks instead of taking 3 weeks to change a single character in a text file?
Uhm, hu? Firefox 3.0.7 was released on 2009-03-04 and the compatibility update on 2009-03-07. Other 3.0.x updates were available within a day or even before release (if I noticed a stable Candidate) according to my logs. Oh, and while updating takes only a couple of minutes it also requires basic testing with the affected applications, signing the update entries, and ensuring that the file gets parsed correctly.

kriegaex
 
Posts: 26
Joined: October 11th, 2006, 4:17 am

Post Posted March 17th, 2009, 5:27 am

As a matter of fact, after each minor upgrade we cannot continue to use keyconfig but have to wait for His Majesty, and be it just for a few days. You are quick, true, but we do have to wait anyway. Don't you think we would notice incompatibilities quicker with an active keyconfig, thus help you to test the add-on? It is really nice from you to test by yourself, but we definitely have to wait. Your nit-picky arguments do not help anybody in your user base. Your perfectionism is honoured, but pragmatism would be more helpful here.

BTW, upgrade orgies just because a minor version number changes are pointless. I have installed so many add-ons, and if each one would need an upgrade I would be pissed. An upgrade should only occur if necessary, everything else is a waste of time, bandwidth and nerves. I imagine a changelog with each upgrade, 80% of the time stating: "version number increased". Very informative.

Sorry for being sarcastic, but you just do not get it. Be pragmatic! Think about your users, not your misguided perfectionism.

Bonhomme7h
 
Posts: 5
Joined: March 15th, 2009, 6:15 pm

Post Posted March 17th, 2009, 2:16 pm

dorando wrote:
Bonhomme7h wrote:It is possible to create one different shortcut for each of my favorite search engine to search highlighted text?
Try
Code: Select all
var ss = Cc["@mozilla.org/browser/search-service;1"].getService(Ci.nsIBrowserSearchService);

var submission = ss.getEngineByAlias("keyword").getSubmission(getBrowserSelection(), null);

if (submission)
 getBrowser().loadOneTab(submission.uri.spec, null, null, submission.postData, null, false);   
. Change keyword to a keyword you assigned through the Manage Search Engines dialog.


Thank you! :D The only inconvenience is that it's open in the background instead of the search box who open in the foreground. It is possible to correct it?

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

Post Posted March 18th, 2009, 4:59 am

kriegaex wrote:As a matter of fact, after each minor upgrade we cannot continue to use keyconfig but have to wait for His Majesty, and be it just for a few days.
Again, that should only happen if the warning is ignored one gets if "Warn me if this will disable any of my add-ons" is checked (which is by default). What should be caused by this, is that users are upgraded later than without, but that IMHO is not that time critical anyway if compared against the time some Linux distributions take.
kriegaex wrote:Your perfectionism is honoured, but pragmatism would be more helpful here.
I understand that claiming to supported all minor releases would help with the situation you perceive, but, as said before, that is not my responsibility. On the other hand doing so could lead to a situation which IIRC led to -safe-mode being created in the past (which seems, despite being listed in the menu, to be known by relatively few people).
kriegaex wrote:BTW, upgrade orgies just because a minor version number changes are pointless.
Updating compatibility information doesn't require any upgrade, those should be received during the daily update check (extensions.update.interval) and being applied to the local extensions.rdf immediately.

Bonhomme7h wrote:
dorando wrote:
Bonhomme7h wrote:It is possible to create one different shortcut for each of my favorite search engine to search highlighted text?
Try
Code: Select all
var ss = Cc["@mozilla.org/browser/search-service;1"].getService(Ci.nsIBrowserSearchService);

var submission = ss.getEngineByAlias("keyword").getSubmission(getBrowserSelection(), null);

if (submission)
 getBrowser().loadOneTab(submission.uri.spec, null, null, submission.postData, null, false);    
. Change keyword to a keyword you assigned through the Manage Search Engines dialog.
Thank you! :D The only inconvenience is that it's open in the background instead of the search box who open in the foreground. It is possible to correct it?
Try
Code: Select all
var ss = Cc["@mozilla.org/browser/search-service;1"].getService(Ci.nsIBrowserSearchService);

var submission = ss.getEngineByAlias("keyword").getSubmission(getBrowserSelection(), null);

if (submission)
 getBrowser().loadOneTab(submission.uri.spec, null, null, submission.postData, false, false);  

ChrisCairns
 
Posts: 107
Joined: March 12th, 2009, 12:58 am

Post Posted March 18th, 2009, 5:23 am

dorando wrote:
ChrisCairns wrote:can someone please write a code which helps me change the shorrcut for "Move to frame" which by default is F6
F6 is, like some others, defined in a way which can't currently be supported by keyconfig, so you won't be able to change/disable it. If you wanted to add an alternative shortcut you can Add a new key (button on the lower left on the keyconfig screen) with:
Code: Select all
var utils = commandDispatcher.focusedWindow.QueryInterface(Components.interfaces.nsIInterfaceRequestor).
getInterface(Components.interfaces.nsIDOMWindowUtils);

utils.sendKeyEvent("keydown", KeyEvent.DOM_VK_F6, 0, 0);
utils.sendKeyEvent("keypress", KeyEvent.DOM_VK_F6, 0, 0);
utils.sendKeyEvent("keyup", KeyEvent.DOM_VK_F6, 0, 0);  
which should simulate pressing F6. Also note that functions for keyconfig provides f4kc_FocusNextFrame which also might be what you want.

Many thanks, Dorando for writing the script. And even more thanks for pointing to the functions for keyconfig. Basically, i want a shortcut to "focus to the web page". So just like there is a shortcut for Brief_focus searchbar, can a shortcut be set for "focussing on the web page". By using F6 or a substitute for it i have to move one by one frame until i reach web page which is not very good.

kriegaex
 
Posts: 26
Joined: October 11th, 2006, 4:17 am

Post Posted March 18th, 2009, 5:30 am

Despite your well-founded arguments, the fact remains that in my Thunderbird 2.0.* keyconfig gets deactivated each time I apply a product upgrade. I really do not want to wait for you to update keyconfig before applying the TB upgrade, just because it might disable your little add-on. A security update, for instance, is much more important to me. Let us close this discussion. If you absolutely refuse to listen to your users, it is rather pointless to continue this conversation. Continue cooking your own soup (as we say in Germany) instead of following common practice among add-on producers. *shrug*

Return to Extension/Theme Releases


Who is online

Users browsing this forum: No registered users and 2 guests