MozillaZine

keyconfig 20110522

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

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


tonymec

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

Post Posted November 23rd, 2013, 4:57 am

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

Post Posted November 27th, 2013, 2:13 pm

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

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

Post Posted November 28th, 2013, 5:28 am

@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: 4100
Joined: February 3rd, 2009, 6:29 pm

Post Posted November 28th, 2013, 6:44 pm

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

Post Posted November 29th, 2013, 9:01 am

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

Zoolcar9

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

Post Posted November 29th, 2013, 10:33 am

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

Post Posted November 29th, 2013, 8:06 pm

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

Post Posted December 14th, 2013, 8:16 am

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: 4100
Joined: February 3rd, 2009, 6:29 pm

Post Posted December 14th, 2013, 2:40 pm

@Cooperdale

Try this:

Code: Select all
if (gFolderTreeView.mode == "unread") {
  gFolderTreeView.mode = "all";
} else {
  gFolderTreeView.mode = "unread";
}

Kenosis
 
Posts: 65
Joined: November 11th, 2011, 5:43 am

Post Posted December 15th, 2013, 1:36 pm

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

Post Posted December 15th, 2013, 1:52 pm

Reload:
Code: Select all
BrowserReload();


POS1:
Code: Select all
goDoCommand('cmd_scrollTop');

Kenosis
 
Posts: 65
Joined: November 11th, 2011, 5:43 am

Post Posted December 15th, 2013, 3:33 pm

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

Post Posted December 17th, 2013, 1:32 pm

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

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

Post Posted December 17th, 2013, 6:07 pm

@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."

Return to Extension/Theme Releases


Who is online

Users browsing this forum: No registered users and 1 guest