MozillaZine

keyconfig 20110522

Announce and Discuss the Latest Theme and Extension Releases.
tonymec

User avatar
 
Posts: 731
Joined: October 15th, 2004, 2:58 am
Location: Ixelles (Brussels Capital Region, Belgium)

Post Posted August 25th, 2013, 4:45 pm

ddong wrote:I have ZERO knowledge... That's why i'm here asking for help. The problem with the original shortcut is that it doesn't work with azerty keyboard. Apparently mozilla team didn't care about that.

Which key combo was it supposed to be? I have some experience with finding strange control characters on an AZERTY keyboard, as mine is also AZERTY (a Belgian one, however, as described here, not a French one).

Edit: Mozilla does care about using their products with non-US keyboards and also for non-en-US languages, and I think I saw a bug somewhere about this problem, only I can't find it back right now.
Best regards,
Tony

ddong
 
Posts: 128
Joined: August 25th, 2013, 2:04 am

Post Posted August 26th, 2013, 5:53 am

Click on a tab in the group you want to switch to and you'll exit the view and be returned to Firefox. The tab you clicked on will be active and only the tabs in that group will be visible.

The keyboard shortcut, Ctrl + ` allows you to go to the next Tab Group and Ctrl + Shift + ` to the previous Tab Group.
That's it! The ` key is avalaible on azerty keyboard but you have to use alt and that, firefox doesn't want.

tonymec

User avatar
 
Posts: 731
Joined: October 15th, 2004, 2:58 am
Location: Ixelles (Brussels Capital Region, Belgium)

Post Posted August 26th, 2013, 4:56 pm

ddong wrote:
Click on a tab in the group you want to switch to and you'll exit the view and be returned to Firefox. The tab you clicked on will be active and only the tabs in that group will be visible.

The keyboard shortcut, Ctrl + ` allows you to go to the next Tab Group and Ctrl + Shift + ` to the previous Tab Group.
That's it! The ` key is avalaible on azerty keyboard but you have to use alt and that, firefox doesn't want.

Have you tried to:
1) Press and hold Ctrl
2) Press and hold AltGr
3) Press the other key(s) needed for `
4) Release everything.

If that doesn't work, then maybe some other Ctrl key combination gives what is Ctrl+` on US-QWERTY. However this is less than certain, since Ctrl+` (where ` is 0x60) is not part of the ASCII control group (which define Ctrl+ anything from 0x3F (?) to 0x5F (_) and explicitly states that Ctrl+uppercase and Ctrl+lowercase are equivalent for letters A to Z). You might then be a victim of that bug I couldn't find back.

You might try Crtl + (the key at top left, left of the digit 1) on the far chance that Ctrl+` might not have moved from US-QWERTY to AZERTY even though ` itself did move. Otherwise, I don't know.

Is there a menu item for going to the next tab group (in the Go menu maybe?)? Then you might trigger the menus by keyboard (Alt+something, then the underlined letter in the menuitem name). Admittedly not an elegant solution. There ought to be a method name that you could call, but someone other than me will have to name it.
Best regards,
Tony

ddong
 
Posts: 128
Joined: August 25th, 2013, 2:04 am

Post Posted August 27th, 2013, 7:18 am

I tried all those keys already of course, i wouldn't be here if it was so easy.. ;)

Kevin Jones
 
Posts: 625
Joined: August 12th, 2009, 10:22 am

Post Posted August 27th, 2013, 8:13 am

Hello,

I have just tried keyconfig, and it is a very nice and useful addon.

I am using Mac, I have observed that when changing to a keybinding which uses the Alt key, when typed into the textbox, the character is translated into a special character. So if I type say, "Alt + S", it enters only ß (does not show Alt symbol). I would expect this behavior in the textbox, since that is what Macs do by default when using the Alt key. However, apparently because of this, keyconfig is not recognizing it as "Alt + S", and so there is no mapping done, and the command does not work. I can put the code <key key="S" modifiers="alt" command="some_command"/> into an overlay and it will work, so I know that that combination is valid on Mac. It is just that I cannot assign it to that using keyconfig.

If, however, the Alt key is combined with another modifier, eg, "Alt + Cmd + S", then "<Alt symbol><Cmd symbol>ß" appears in the textbox. I can assign it, and it will work, however, from then on, "<Alt symbol><Cmd symbol>ß" (with the special character) is what will always appear in the keybinding list.

So in the first case, Alt with no other modifer, keybinding cannot be assigned.

In the second case, Alt with another modifier, keybinding can be assigned, but the special character is used in the keybinding list. (and possibly in the keybinding itself?)

Thank you kindly,

Allasso

Kevin Jones
 
Posts: 625
Joined: August 12th, 2009, 10:22 am

Post Posted August 27th, 2013, 1:44 pm

I get this error when I open keyconfig in FF 26:

JavaScript error: chrome://keyconfig/content/keyconfig.js, line 419: props is undefined
JavaScript error: chrome://keyconfig/content/keyconfig.js, line 424: props is undefined

Just thought you might want to know.

Allasso

morat
 
Posts: 3975
Joined: February 3rd, 2009, 6:29 pm

Post Posted August 30th, 2013, 5:54 am

ddong wrote:Hello, i'm trying to change the next/previous tab group keyboard shortcut. So i ended up downloading this extension. However, even after long searching, i couldn't find the code related to these actions.

viewtopic.php?p=10711937#p10711937

bugblatter
 
Posts: 59
Joined: June 21st, 2005, 12:31 am

Post Posted September 19th, 2013, 1:09 am

Has anyone else noticed that the userChrome.css styles for the keyconfig window do not work anymore? Now all the text looks exactly the same. Is there any way to fix this? It was extremely useful. I noticed it in firefox 24, but it may have happened a few versions earlier and escaped my notice.

I am referring the userChrome.css styles listed on the first page of this thread, listed here again:

userChrome.css:

/* Style different types of keys differently */
#keyconfig-window treechildren::-moz-tree-cell-text(hardcoded) { color: GrayText; }
#keyconfig-window treechildren::-moz-tree-cell-text(disabled) { text-decoration: line-through; }
#keyconfig-window treechildren::-moz-tree-cell-text(user) { font-weight: bold; }
#keyconfig-window treechildren::-moz-tree-cell-text(duplicate) { background-color: rgb(80%, 80%, 80%) !important; color: inherit !important; }
#keyconfig-window treechildren::-moz-tree-cell-text(custom) { font-style: italic; }

Kitefighter

User avatar
 
Posts: 377
Joined: March 10th, 2004, 11:09 pm

Post Posted September 23rd, 2013, 1:09 am

As of https://developer.mozilla.org/en-US/doc ... ing_a_Tree getCellProperties changed with Gecko 22.

In the extension's keyconfig.js the block
Code: Select all
getCellProperties: function(row,col,props) {
  var key = gKeys[row];
  if(key.hardcoded) props.AppendElement(gAtomService.getAtom("hardcoded"));
  if(key.disabled) props.AppendElement(gAtomService.getAtom("disabled"));
  if(key.pref[3]) props.AppendElement(gAtomService.getAtom("custom"));
  if(key.pref.length) props.AppendElement(gAtomService.getAtom("user"));
  if((col.id || col) == "shortcut" && gUsedKeys[key.shortcut].length > 1)
   props.AppendElement(gAtomService.getAtom("duplicate"));
 },

should be changed to
Code: Select all
getCellProperties: function(row,col) {
  var key = gKeys[row];
  if(key.hardcoded){ return "hardcoded"; }
  if(key.disabled) { return "disabled"; }
  if(key.pref[3]) { return "custom"; }
  if(key.pref.length) { return "user"; }
  if((col.id || col) == "shortcut" && gUsedKeys[key.shortcut].length > 1)
   { return "duplicate"; }
 },


This fixed the styling issues for me.

In this file I also changed three lines where the error console reported a warning
Code: Select all
while(target = targets.getNext())

to
Code: Select all
while(target == targets.getNext())

bugblatter
 
Posts: 59
Joined: June 21st, 2005, 12:31 am

Post Posted September 23rd, 2013, 1:47 pm

Thanks for the fix. I tried it and it sort of worked, but the styles still did not look exactly the same. There seems to be a logic problem in that it will only return at most one property whereas the original code could return up to 5 properties.

I tweaked the code here to get the desired result, though I'm not positive it's correct either:
Code: Select all
getCellProperties: function(row,col) {
  var key = gKeys[row];
  var props = "";
  if(key.hardcoded){ props = "hardcoded"; }
  if(key.disabled) { props += " disabled"; }
  if(key.pref[3]) { props += " custom"; }
  if(key.pref.length) { props += " user"; }
  if((col.id || col) == "shortcut" && gUsedKeys[key.shortcut].length > 1)
   { props += " duplicate"; }
  return props;
 },

tonymec

User avatar
 
Posts: 731
Joined: October 15th, 2004, 2:58 am
Location: Ixelles (Brussels Capital Region, Belgium)

Post Posted September 28th, 2013, 12:27 pm

Kitefighter wrote:As of https://developer.mozilla.org/en-US/doc ... ing_a_Tree getCellProperties changed with Gecko 22. [...]


Of course, with Gecko 21 or older (Firefox 21 or older, SeaMonkey 2.18 or older, and, I think, Thunderbird 21 or older), the "older" version of the code should be kept. All these versions are obsolete though AFAIK, except for "17esr" versions of Firefox and Thunderbird.
Best regards,
Tony

meeotch
 
Posts: 53
Joined: November 11th, 2002, 9:16 pm

Post Posted October 1st, 2013, 3:50 pm

Just upgraded to TBird 24, and it appears to have broken some of my keyconfig commands. Specifically, the key I had bound to toggle message view from text<->html now has no effect (and produces no messages in the console). I was using this code:
Code: Select all
pref.getBoolPref("mailnews.display.prefer_plaintext")?MsgBodyAllowHTML():MsgBodyAsPlaintext()

Typing just the pref.getBoolPref("...") part in the console gives a "ReferenceError: pref is not defined" message. And this page https://developer.mozilla.org/en-US/doc ... eleases/24 seems to suggest that the pref object has been removed. But I was unable to get it working with "Services.prefs" as listed (though to be honest, I'm not even sure if that reference applies, or if the scope of the console is the same as keyconfig is seeing). And weirdly, hitting my bound key produces no output, error messages or anything.

Any ideas? (This is windows 7, btw.)

morat
 
Posts: 3975
Joined: February 3rd, 2009, 6:29 pm

Post Posted October 1st, 2013, 4:56 pm

@meeotch

I got it working.

Keyconfig:
Code: Select all
Services.prefs.getBoolPref("mailnews.display.prefer_plaintext") ? MsgBodyAllowHTML() : MsgBodyAsPlaintext();

Error Console:
Code: Select all
top.opener.Services.prefs.getBoolPref("mailnews.display.prefer_plaintext") ? MsgBodyAllowHTML() : MsgBodyAsPlaintext();

Keyconfig 20110522
Thunderbird 24.0
Windows XP SP3

meeotch
 
Posts: 53
Joined: November 11th, 2002, 9:16 pm

Post Posted October 1st, 2013, 5:14 pm

Weird - I'm positive I tried that. Anyway, thanks! Good to know the syntax for testing this stuff in the console, as well.

Now, to track down all the other stuff TB24 broke... ](*,)

60659
 
Posts: 5
Joined: April 17th, 2012, 11:51 pm

Post Posted October 3rd, 2013, 2:02 am

(My problem is solved. Thing was about whole TB, not just keyconfig.)
Last edited by 60659 on October 8th, 2013, 4:26 am, edited 2 times in total.

Return to Extension/Theme Releases


Who is online

Users browsing this forum: No registered users and 2 guests