keyconfig 20110522

Announce and Discuss the Latest Theme and Extension Releases.
Post Reply
avada
Posts: 1932
Joined: February 10th, 2008, 6:30 am
Location: Hungary

Re: keyconfig 20110522

Post by avada »

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 »

avada wrote: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?

(untested)

In the keyconfig preferences, find the line

Code: Select all

Find Text As You Type      +/      key_findTypeText 
and select it. +/ will appear in the input box at the bottom. Clear that, leave the box focused, and hit your preferred shortcut, which should appear in its stead. Now click the [ Close ] button at bottom right and see if it works. (It might or might not work depending on how this function gets its trigger key.)

Another possibility is to make sure that accessibility.typeaheadfind.autostart is set to true, either directly in about:config (where double-clicking toggles), or by means of a checkbox in the "Advanced: Keyboard Navigation" preferences of Firefox (or "Advanced: Find As You Type" in the SeaMonkey preferences). Then you can just start typing (except in an input box, of course) to start matching. See http://www.mozilla.org/access/type-ahead/ for details.
Best regards,
Tony
pintassilgo
Posts: 200
Joined: August 30th, 2013, 3:50 pm

Re: keyconfig 20110522

Post by pintassilgo »

Please, what's the code to switch to last used tab?
avada
Posts: 1932
Joined: February 10th, 2008, 6:30 am
Location: Hungary

Re: keyconfig 20110522

Post by avada »

@tonymec
Hi!
The problem was that these hotkeys are missing from keyconfig. (Apparently they're hard coded: https://bugzilla.mozilla.org/show_bug.cgi?id=942269 )
Anyway I found the code to use to make my own shortcuts:

Code: Select all

gFindBar.startFind(gFindBar.FIND_TYPEAHEAD);

gFindBar.startFind(gFindBar.FIND_LINKS);
morat
Posts: 6403
Joined: February 3rd, 2009, 6:29 pm

Re: keyconfig 20110522

Post by morat »

pintassilgo wrote:Please, what's the code to switch to last used tab?

AFAIK, Firefox doesn't keep a reference to the previous selected tab.

Are you using the Focus Last Tab extension?

Code: Select all

focuslasttab.swap();
Springtime
Posts: 68
Joined: November 8th, 2013, 8:59 pm

Re: keyconfig 20110522

Post by Springtime »

Is it possible to toggle Stylish styles with a keyconfig hotkey? Was wanting to trigger a specific one.
Zoolcar9
Posts: 2225
Joined: November 9th, 2004, 6:45 pm
Location: Jakarta, Indonesia (UTC+7)
Contact:

Re: keyconfig 20110522

Post by Zoolcar9 »

Springtime wrote:Is it possible to toggle Stylish styles with a keyconfig hotkey? Was wanting to trigger a specific one.

It's easier if you know the add-on/style id

Code: Select all

AddonManager.getAddonByID("ENTER STYLE ID HERE", function(style) {
  if (style)
    style.userDisabled = style.isActive;
})
 

If not, you can use style's name. Just make sure there are no duplicate names.

Code: Select all

AddonManager.getAddonsByTypes(["userstyle"], function(styles) {
  if (!styles.length) {
    alert("No styles installed.");
    return;
  }
  for (var i = 0; i < styles.length; i++) {
    if (styles[i].name === "ENTER STYLE NAME HERE") {
      styles[i].userDisabled = styles[i].isActive;
      return;
    }
  }
})
 
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: keyconfig 20110522

Post by Springtime »

Zoolcar9 wrote:It's easier if you know the add-on/style id


Great, thanks! Found a userstyle that displayed the Style ID in the addons manager page, which made it easier :)
Cooperdale
Posts: 1
Joined: December 14th, 2013, 8:12 am

Re: keyconfig 20110522

Post by Cooperdale »

Hello, I'm new here. I was wondering what I'm doing wrong.

I'd like to have a shortcut to switch between "All Folders" and "Folders with unread messages" views.

I tried the suggestion on the Wiki:

loadFolderView(gCurrentFolderView == 0? 1:0)

using CTRL + Q or ALT + Q as shortcuts, but nothing happens. So, what am I missing?

Thanks guys.
morat
Posts: 6403
Joined: February 3rd, 2009, 6:29 pm

Re: keyconfig 20110522

Post by morat »

@Cooperdale

Try this:

Code: Select all

if (gFolderTreeView.mode == "unread") {
  gFolderTreeView.mode = "all";
} else {
  gFolderTreeView.mode = "unread";
}
Kenosis
Posts: 77
Joined: November 11th, 2011, 5:43 am

Re: keyconfig 20110522

Post by Kenosis »

Hello,

found your addon while I was searching for a solution for my problem. I hope you can help me.

I need to bind F5 (Browser:Reload) + POS1 (don't know the command for it / going back to the top of the page) to a single key, F4 for example. Basicly what pressing CTRL+F5 (Reload (override cache) does but without reloading all cached pics etc.

Thanks in advance.
Miccovin
Posts: 51
Joined: February 9th, 2007, 12:44 am

Re: keyconfig 20110522

Post by Miccovin »

Reload:

Code: Select all

BrowserReload();


POS1:

Code: Select all

goDoCommand('cmd_scrollTop');
Kenosis
Posts: 77
Joined: November 11th, 2011, 5:43 am

Re: keyconfig 20110522

Post by Kenosis »

Omg, that seems to work. Thank you very much. I could kiss you right now.
waydown
Posts: 21
Joined: April 9th, 2012, 4:05 am

Re: keyconfig 20110522

Post by waydown »

Hello there. Another fan of this addon here. I am trying to figure the code which would allow me to basically do what the bookmark star button in the address bar does so I attach it to a key command. Attaching
PlacesCommandHook.bookmarkCurrentPage(false, PlacesUtils.unfiledBookmarksFolderId);
efficiently stores the page into the "unsorted bookmarks" folder but I'd need a code which would ALSO remove the bookmark if it already has a star (or at least launch the -edit this bookmark- window so I remove it manually). The important thing is to have ONE code for both actions (fill or remove star, depending on whether the page is already bookmarked or not) so there's also ONE, common shortcut. Again, pretty much what clicking into the star does. Thank you.
Zoolcar9
Posts: 2225
Joined: November 9th, 2004, 6:45 pm
Location: Jakarta, Indonesia (UTC+7)
Contact:

Re: keyconfig 20110522

Post by Zoolcar9 »

@waydown
See viewtopic.php?p=13080467#p13080467 (to toggle)
My Firefox information | Add-ons | GitHub

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