keyconfig 20110522

Announce and Discuss the Latest Theme and Extension Releases.
Post Reply
Zoolcar9
Posts: 2225
Joined: November 9th, 2004, 6:45 pm
Location: Jakarta, Indonesia (UTC+7)
Contact:

Re: keyconfig 20110522

Post by Zoolcar9 »

Cattleya wrote:Many thank, Zoolcar, you helped me so much :)

I've updated the code viewtopic.php?p=12911411#p12911411
My Firefox information | Add-ons | GitHub

"With great power, comes great desire to show it off."
bege
Posts: 153
Joined: January 23rd, 2009, 9:14 pm
Location: Germany

Shortcut for tab context menu commands

Post by bege »

Hi,
I tried to create new shortcuts in keyconfig with the oncommand entrys in MenuManipulator. But it doesn't work with such commands like "close right tabs" gBrowser._closeRightTabs(TabContextMenu.contextTab); "close left tabs" gBrowser._closeLeftTabs(TabContextMenu.contextTab); and "close this tree" from TreeStyleTabs add-on TreeStyleTabService.removeTabSubtree(TreeStyleTabService.getTabBrowserFromChild(this).mContextTab);

Can you, please, help what I need to do to accomplish this?
chirpy_7
Posts: 165
Joined: March 19th, 2007, 6:24 am

keyconfig stops working (until FF restart)

Post by chirpy_7 »

keyconfig stops working (until FF restart)

Hi again,

For about 1 week or 2 I've noticed that occasionally (and so far unpredictably) the single-stroke keyconfig keys stop working (until I restart FF).

Anyone else experiencing this? How to debug? The keys don't pop up in the error-console... any other place to look for something helpful?

thx.

ps: signing out of gmail brought keyconfig back to life once, but not since...

pps: plz PM me (too) if you reply to this; for now I'm unsubscribing from this thread...
Last edited by chirpy_7 on July 31st, 2013, 5:35 am, edited 1 time in total.
OlegYch
Posts: 13
Joined: June 7th, 2013, 9:58 pm

Re: keyconfig 20110522

Post by OlegYch »

hi
thanks for the great extension
i have a problem with it though - if i add or change shorctut to e.g. ctrl-alt-z and switch keyboard layout to russian the shortcut stops working (unless i also add ctrl-alt-я shortcut - я is at the same key as z on russian keyboards)
can this be fixed?
User avatar
tonymec
Posts: 734
Joined: October 15th, 2004, 2:58 am
Location: Ixelles (Brussels Capital Region, Belgium)
Contact:

Re: keyconfig 20110522

Post by tonymec »

OlegYch wrote:hi
thanks for the great extension
i have a problem with it though - if i add or change shorctut to e.g. ctrl-alt-z and switch keyboard layout to russian the shortcut stops working (unless i also add ctrl-alt-я shortcut - я is at the same key as z on russian keyboards)
can this be fixed?

I think it's intentional, or, “'t ain't a bug, it's a feature”: it's because of the same “feature” that Ctrl+A on a French “AZERTY” keyboard (at far left in the top alphabet row) does the same thing as Ctrl+A on a “QWERTY” keyboard (at far left in the home row), not as Ctrl+Q on QWERTY (which is the same key as Ctrl+A on AZERTY).

If you want Ctrl+Alt+Z (when your keyboard sends Latin letters) and Ctrl+Alt+Я (when it sends Cyrillic letters) to do the same thing, IIUC you will have to define the same action for both key chords. OTOH, you can, if you want, duplicate Ctrl+Alt+Z as Ctrl+Alt+З instead (not the digit three but Cyrillic zeh), which has the same sound but is elsewhere on the keyboard: it would also work, it's just a question of which keys you want to hit to get what.
Best regards,
Tony
OlegYch
Posts: 13
Joined: June 7th, 2013, 9:58 pm

Re: keyconfig 20110522

Post by OlegYch »

Thanks Tony

The fact that I need to pay attention to current keyboard language is annoying to say the least, it kills the keyboard driven workflow as i need to constantly be finding out what the current layout is.

When I add ctrl-alt-я shortcut all hell breaks loose - e.g. firefox starts trying to bookmark current page when i press tab or escape.

Aleh
firefoxuse
Posts: 1086
Joined: November 8th, 2011, 12:06 pm

Re: keyconfig 20110522

Post by firefoxuse »

what's the code to duplicate tab please?
thanks!
Zoolcar9
Posts: 2225
Joined: November 9th, 2004, 6:45 pm
Location: Jakarta, Indonesia (UTC+7)
Contact:

Re: keyconfig 20110522

Post by Zoolcar9 »

firefoxuse wrote:what's the code to duplicate tab please?

Code: Select all

gBrowser.selectedTab = gBrowser.duplicateTab(gBrowser.selectedTab
My Firefox information | Add-ons | GitHub

"With great power, comes great desire to show it off."
bege
Posts: 153
Joined: January 23rd, 2009, 9:14 pm
Location: Germany

Re: keyconfig 20110522

Post by bege »

Zoolcar9 wrote:
firefoxuse wrote:what's the code to duplicate tab please?

Code: Select all

gBrowser.selectedTab = gBrowser.duplicateTab(gBrowser.selectedTab) 


Perfect! That's the answer to my question also.
E.g. "Close right tabs" works with

Code: Select all

gBrowser.selectedTab = gBrowser._closeRightTabs(gBrowser.selectedTab);


The other requested commands work respectively.
Thank you.
nigelle
Posts: 117
Joined: June 9th, 2005, 8:30 am
Location: France

Re: keyconfig 20110522

Post by nigelle »

To check why sometimes code for short-cut did not work as I intended I have used the FireFox debugger to see the results of some codes executed in javascript.
I have been surprised to see that codes that execute perfectly in short-cuts give an error message as "not defined" e.g. the code of the standard find command ctrl+F wicch is defined as "gFindBar.onFindCommand();" in keyconfig gives :
Exception: gFindBar is not defined
@Scratchpad/1:10
or "gFindBar._findField.getAttribute("status")" which says "notfund" or the reverse. I assume that they are not javascript function but something else in Firefox.
If I change scope/environment from the default "content" to "browser" they execute !

How can I use them in a javascript piece of code ? Maybe by changing the scope but how ?
Zoolcar9
Posts: 2225
Joined: November 9th, 2004, 6:45 pm
Location: Jakarta, Indonesia (UTC+7)
Contact:

Re: keyconfig 20110522

Post by Zoolcar9 »

keyconfig runs in 'browser' scope.
'content' is for web pages.
My Firefox information | Add-ons | GitHub

"With great power, comes great desire to show it off."
nigelle
Posts: 117
Joined: June 9th, 2005, 8:30 am
Location: France

Re: keyconfig 20110522

Post by nigelle »

To Zoolcar9
You confirm what I was thinking : "keyconfig runs in 'browser' scope".
In fact I am trying to execute with a short cut a JavaScript function built on the fly : this function seems to execute in "content" scope. How to force it to execute in 'browser' scope ? Is there a variable to set or instruction(s) to include in the function ?
How Keyconfig or the JavaScript part of debugger set the scope to 'browser' ?
Zoolcar9
Posts: 2225
Joined: November 9th, 2004, 6:45 pm
Location: Jakarta, Indonesia (UTC+7)
Contact:

Re: keyconfig 20110522

Post by Zoolcar9 »

My Firefox information | Add-ons | GitHub

"With great power, comes great desire to show it off."
nigelle
Posts: 117
Joined: June 9th, 2005, 8:30 am
Location: France

Re: keyconfig 20110522

Post by nigelle »

To Zoolcar9
I have read twice your link
https://developer.mozilla.org/en/docs/W ... hrome_code
I am probably too much ignorant : I don't know how to use it !
Please explain how I can use it to change, in the on the fly built function, the scope to 'browser' or at least access "gFindBar.onFindCommand();" or "gFindBar._findField.getAttribute("status")" from the "content" scope of the screen ?
Zoolcar9
Posts: 2225
Joined: November 9th, 2004, 6:45 pm
Location: Jakarta, Indonesia (UTC+7)
Contact:

Re: keyconfig 20110522

Post by Zoolcar9 »

@nigelle You can't. But you can use non-standard (Gecko only) window.find() command.
My Firefox information | Add-ons | GitHub

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