keyconfig 20110522

Announce and Discuss the Latest Theme and Extension Releases.
Post Reply
Springtime
Posts: 68
Joined: November 8th, 2013, 8:59 pm

Re: keyconfig 20110522

Post by Springtime »

Also, as this is the right thread for it: I'd like to suggest the ability in Firefox/keyconfig to add mnemonic keyboard shortcuts.

For example: by creating the shortcut "p,i,n" (p followed by i followed by n) one could toggle Pinning a tab. It's an incredibly useful feature Opera 12 has as a side-effect of being able to manually enter shortcut commands by typing them out. Naturally they are disabled while a textbox is focused.

It makes remembering shortcuts (and adding far more of them) easy and there are many different uses for them, including tab commands, opening pages, toggling stylesheets, preferences, etc. Perhaps if there isn't an inherent limitation to Firefox shortcut entering this could be considered as an advanced option [-o<
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 »

Springtime wrote:Also, as this is the right thread for it: I'd like to suggest the ability in Firefox/keyconfig to add mnemonic keyboard shortcuts.

For example: by creating the shortcut "p,i,n" (p followed by i followed by n) one could toggle Pinning a tab. It's an incredibly useful feature Opera 12 has as a side-effect of being able to manually enter shortcut commands by typing them out. Naturally they are disabled while a textbox is focused.

It makes remembering shortcuts (and adding far more of them) easy and there are many different uses for them, including tab commands, opening pages, toggling stylesheets, preferences, etc. Perhaps if there isn't an inherent limitation to Firefox shortcut entering this could be considered as an advanced option [-o<

I may be wrong, but I think it is a limitation of keyconfig: it remembers shortcuts for one key at a time (or one key with a set of modifiers such as Shift / Ctrl / Alt on Windows and Linux, IIRC on the Mac they are called Shift / Cmd / Option / Ctrl). The advantage of this is that it never has to wait for the keyboard while remembering what you typed just before. And what should happen if you started with p then i and continued otherwise? With Ctrl+PgDn maybe, which changes tabs, or Ctrl+W which closes the current one?

As you say, if you wanted to create a shortcut for "p then i then n" on Firefox it would of course have to be disabled in input boxes and textareas — another distinction which, IIUC, keyconfig doesn't make.

Sounds to me like what you're asking for would require a complete overhaul, maybe even a rewrite from scratch, of the extension.
Best regards,
Tony
Springtime
Posts: 68
Joined: November 8th, 2013, 8:59 pm

Re: keyconfig 20110522

Post by Springtime »

tonymec wrote:I may be wrong, but I think it is a limitation of keyconfig: it remembers shortcuts for one key at a time...The advantage of this is that it never has to wait for the keyboard while remembering what you typed just before. And what should happen if you started with p then i and continued otherwise?


In Opera's case you manually type out the shortcut in a textbox, rather than the app listening for your keyboard input, thus the ability to add whatever combinations you like. Works very well.

tonymec wrote:Sounds to me like what you're asking for would require a complete overhaul, maybe even a rewrite from scratch, of the extension.


Oh well, I can dream :wink:
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 »

Springtime wrote:
tonymec wrote:I may be wrong, but I think it is a limitation of keyconfig: it remembers shortcuts for one key at a time...The advantage of this is that it never has to wait for the keyboard while remembering what you typed just before. And what should happen if you started with p then i and continued otherwise?

In Opera's case you manually type out the shortcut in a textbox, rather than the app listening for your keyboard input, thus the ability to add whatever combinations you like. Works very well.

I didn't mean when you define it, but when you use it. If you could have that "pin" shortcut defined, then every time you hit the p key (other than in an input box) in the browser, keyconfig would have to intercept it, remember that it has been received, and wait for the keyboard to see if the next thing you typed was the i key. Nowadays, all keyconfig shortcuts are single-key actions (possibly with modifiers), so when you hit one of them, keyconfig immediately knows what to do, and does it.
Best regards,
Tony
rayrayray
Posts: 10
Joined: February 20th, 2012, 2:29 am

Re: keyconfig 20110522

Post by rayrayray »

Hi,

I need to find the hotkey that toggles the button for the "History disable button" addon:
https://addons.mozilla.org/en-US/firefo ... le-button/

Thanks so much in advance!
Sklep
New Member
Posts: 1
Joined: November 16th, 2013, 3:58 am
Contact:

Re: keyconfig 20110522

Post by Sklep »

Ty for this info!
Zoolcar9
Posts: 2225
Joined: November 9th, 2004, 6:45 pm
Location: Jakarta, Indonesia (UTC+7)
Contact:

Re: keyconfig 20110522

Post by Zoolcar9 »

rayrayray wrote:I need to find the hotkey that toggles the button for the "History disable button" addon:
https://addons.mozilla.org/en-US/firefo ... le-button/

See `oncommand` attribute in https://addons.mozilla.org/files/browse/132440/file/chrome/content/ff-overlay.xul#L15, line #15.
My Firefox information | Add-ons | GitHub

"With great power, comes great desire to show it off."
Springtime
Posts: 68
Joined: November 8th, 2013, 8:59 pm

Re:

Post by Springtime »

What code can be used to toggle the Find bar (Ctrl+F)? Using it once brings it up but the same shortcut doesn't hide it again (useful if the find bar isn't focused).

Searched and couldn't find anything relevant except this old code which didn't seem to work:

Zoolcar9 wrote:

Code: Select all

var findToolbar = document.getElementById("FindToolbar");
if(typeof gFindBar == "object") { //Bon Echo 2.0a3
  if(findToolbar.hidden) gFindBar.onFindCmd();
  else gFindBar.closeFindBar();
} else {
  if(findToolbar.hidden) onFindCmd();
  else closeFindBar();
}
pintassilgo
Posts: 200
Joined: August 30th, 2013, 3:50 pm

Re: keyconfig 20110522

Post by pintassilgo »

Code: Select all

document.getAnonymousElementByAttribute(document.getElementById('content'), 'anonid', 'panelcontainer').getElementsByTagName('findbar')[0].close()
Springtime
Posts: 68
Joined: November 8th, 2013, 8:59 pm

Re: keyconfig 20110522

Post by Springtime »

pintassilgo wrote:

Code: Select all

document.getAnonymousElementByAttribute(document.getElementById('content'), 'anonid', 'panelcontainer').getElementsByTagName('findbar')[0].close()


Set up a new shortcut using this, but it doesn't appear to work, either :? . Is it Windows-specific?
pintassilgo
Posts: 200
Joined: August 30th, 2013, 3:50 pm

Re: keyconfig 20110522

Post by pintassilgo »

This is to close, not to toggle.

To toggle:

Code: Select all

gFindBar && !gFindBar.hidden ? gFindBar.close() : gFindBar.onFindCommand();


Only tested in Windows.
Springtime
Posts: 68
Joined: November 8th, 2013, 8:59 pm

Re: keyconfig 20110522

Post by Springtime »

Works perfectly now, thanks :)
avada
Posts: 1934
Joined: February 10th, 2008, 6:30 am
Location: Hungary

Re: keyconfig 20110522

Post by avada »

Hello!
I want a shortcut for the quickfind bars. (The ones that are opened by default with / and ') They both have the additional ability to open a link while pressing enter. The issue is that they are not really quick because on my non-english keyboard I can only type the shortcuts awkwardly. (shitft+1, shift+6)
Can anyone tell me what code to add to a custom hotkey?
User avatar
WildcatRay
Posts: 7484
Joined: October 18th, 2007, 7:03 pm
Location: Columbus, OH

Re: keyconfig 20110522

Post by WildcatRay »

@avada, does your keyboard have an F3 key? It is another built-in keyboard shortcut for the quickfind bar.
Ray

OS'es: 4 computers with Win10 Pro 64-bit; Current Firefox, Beta, Nightly, Chrome, Vivaldi
avada
Posts: 1934
Joined: February 10th, 2008, 6:30 am
Location: Hungary

Re: keyconfig 20110522

Post by avada »

WildcatRay wrote:@avada, does your keyboard have an F3 key? It is another built-in keyboard shortcut for the quickfind bar.

That's the next result function the same as ctrl+g. It won't bring up the findbar if you previously searched for something and closed it without emptying it. Otherwise it bring up the bar but enter doesn't open links, but jumps on the next result.
The actual quickfind bar always opens links with enter. While the other variant only searches link text.
Post Reply