MozillaZine

keyconfig 20110522

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

Post Posted November 12th, 2013, 2:29 am

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<

tonymec

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

Post Posted November 12th, 2013, 1:22 pm

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

Post Posted November 12th, 2013, 10:01 pm

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:

tonymec

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

Post Posted November 13th, 2013, 9:48 am

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

Post Posted November 15th, 2013, 12:33 pm

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

Post Posted November 16th, 2013, 4:01 am

Ty for this info!

Zoolcar9

User avatar
 
Posts: 2225
Joined: November 9th, 2004, 6:45 pm
Location: Jakarta, Indonesia (UTC+7)

Post Posted November 16th, 2013, 4:48 am

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

Post Posted November 16th, 2013, 9:16 pm

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: 187
Joined: August 30th, 2013, 3:50 pm

Post Posted November 16th, 2013, 10:44 pm

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

Springtime
 
Posts: 68
Joined: November 8th, 2013, 8:59 pm

Post Posted November 17th, 2013, 2:40 am

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: 187
Joined: August 30th, 2013, 3:50 pm

Post Posted November 17th, 2013, 10:25 am

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

Post Posted November 17th, 2013, 6:57 pm

Works perfectly now, thanks :)

avada
 
Posts: 1880
Joined: February 10th, 2008, 6:30 am
Location: Hungary

Post Posted November 22nd, 2013, 4:46 pm

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?

WildcatRay

User avatar
 
Posts: 7480
Joined: October 18th, 2007, 7:03 pm
Location: Columbus, OH

Post Posted November 22nd, 2013, 4:51 pm

@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: 1880
Joined: February 10th, 2008, 6:30 am
Location: Hungary

Post Posted November 22nd, 2013, 5:00 pm

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.

Return to Extension/Theme Releases


Who is online

Users browsing this forum: No registered users and 5 guests