MozillaZine

keyconfig 20110522

Announce and Discuss the Latest Theme and Extension Releases.
firefoxuse
 
Posts: 1013
Joined: November 8th, 2011, 12:06 pm

Post Posted November 16th, 2012, 8:33 pm

thanks!!

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

Post Posted November 18th, 2012, 12:19 am

something a bit off-topic:

this addon seems very powerful for key bindings, wouldnt there be nice to have one for clicks and gestures ? (i am aware of the current implementations, but ofcourse they dont offer the power of coding to the end-user)

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

Post Posted November 18th, 2012, 2:37 am

by the way, instead of having a forum thread of people asking CODE for various functions, why dont you include the CODE of all the possible functions in the addon itself?

dorando
 
Posts: 1203
Joined: January 9th, 2004, 9:57 am

Post Posted November 18th, 2012, 4:31 am

firefoxuse wrote:this addon seems very powerful for key bindings, wouldnt there be nice to have one for clicks and gestures ? (i am aware of the current implementations, but ofcourse they dont offer the power of coding to the end-user)
Try FireGestures.
firefoxuse wrote:by the way, instead of having a forum thread of people asking CODE for various functions, why dont you include the CODE of all the possible functions in the addon itself?
Neither does a finite number of functions exist (Add-ons and new Application versions can add more, remove others) nor does a finite number of possible combinations of those (or their parameters). But including some commonly sought code and providing tools to get others more easily, would be an option.
Support mozilla.dorando.at through donations/contributions.

Linkintones
 
Posts: 3
Joined: February 5th, 2010, 4:59 am

Post Posted November 18th, 2012, 2:14 pm

Is it possible to add a hotkey for unloading all tabs like Firefox does when resuming a saved session?

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

Post Posted November 20th, 2012, 2:47 am

i have added in keyconfig a binding:
F1 = BrowserOpenTab();
but it doesnt work
maybe something overrides it?
any solution?
thanks!

morat
 
Posts: 2442
Joined: February 3rd, 2009, 6:29 pm

Post Posted November 20th, 2012, 8:03 am

I rewrote the getCommand code snippet with a confirm dialog to copy the command.

viewtopic.php?p=12486071#p12486071 =D>

Code: Select all
function getCommand(aEvent) {
  window.removeEventListener("command", getCommand, true);
  aEvent.preventDefault();
  aEvent.stopPropagation();
  as.showAlertNotification(image, title, "event listener is removed");
  var win = null;
  var label = aEvent.explicitOriginalTarget.getAttribute("label") ||
    aEvent.originalTarget.getAttribute("label");
  if (label) {
    title = title + " : " + label;
  }
  var description = aEvent.originalTarget.getAttribute("oncommand") ||
    aEvent.originalTarget.getAttribute("onclick");
  description = description.search(/\x29$/) > -1 ?
    description + ";" : description;
  description = description.replace(/\s\s+/g, " ");
  var flags = ps.BUTTON_POS_0 * ps.BUTTON_TITLE_IS_STRING +
    ps.BUTTON_POS_1 * ps.BUTTON_TITLE_IS_STRING +
    ps.BUTTON_POS_2 * ps.BUTTON_TITLE_IS_STRING;
  var button0 = "Copy";
  var button1 = "Cancel";
  var button2 = null;
  var message = null;
  var state = {value: false};
  if (description) {
    var choice = ps.confirmEx(win, title, description, flags,
      button0, button1, button2, message, state);
    if (choice == 0) {
      var ch = Components.classes["@mozilla.org/widget/clipboardhelper;1"].
        getService(Components.interfaces.nsIClipboardHelper);
      ch.copyString(description);
    }
  }
}
var as = Components.classes["@mozilla.org/alerts-service;1"].
  getService(Components.interfaces.nsIAlertsService);
var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].
  getService(Components.interfaces.nsIPromptService);
var image = "chrome://mozapps/skin/places/defaultFavicon.png";
var title = "Get Command";
window.addEventListener("command", getCommand, true);
as.showAlertNotification(image, title, "event listener is added");

It is possible to create an event to use with a command that has an event as a parameter.

Example:

* execute code
* left click "View" menu
* left click "Reload" menu item

Code: Select all
BrowserReloadOrDuplicate(event);

Code: Select all
// skip cache
// create a shift key command event
var commandEvent = document.createEvent("XULCommandEvent");
commandEvent.initCommandEvent("command" /* type */,
  true   /* bubbles     */,
  true   /* cancelable  */,
  window /* view        */,
  0      /* detail      */,
  false  /* ctrlKey     */,
  false  /* altKey      */,
  true   /* shiftKey    */,
  false  /* metaKey     */,
  null   /* sourceEvent */
);
BrowserReloadOrDuplicate(commandEvent);

Code: Select all
// duplicate tab
// create a middle button mouse event
var mouseEvent = document.createEvent("MouseEvent");
mouseEvent.initMouseEvent("click" /* type */,
  true   /* bubbles       */,
  true   /* cancelable    */,
  window /* view          */,
  0      /* detail        */,
  0      /* screenX       */,
  0      /* screenY       */,
  0      /* clientX       */,
  0      /* clientY       */,
  false  /* ctrlKey       */,
  false  /* altKey        */,
  false  /* shiftKey      */,
  false  /* metaKey       */,
  1      /* button        */,
  null   /* relatedTarget */
);
BrowserReloadOrDuplicate(mouseEvent);

@firefoxuse

There may be a problem with another extension.

http://kb.mozillazine.org/Standard_diagnostic_-_Firefox

PS,

I edited my post in the close per filter thread, not sure if you saw it.

viewtopic.php?p=12457661#p12457661

The solution should work with the keyconfig extension.

hamelg
 
Posts: 3
Joined: November 20th, 2012, 1:50 pm

Post Posted November 20th, 2012, 2:14 pm

Hello,

When I follow a link which open a new window, keyconfig doesn't work in the new window.
Steps to reproduce the issue :
0. open the firefox preference, choose Tabs, uncheck "Open new windows in a new tab instead"
1. open keyconfig panel
2. add a new shortcut (ie: ZoomIn on Shift+3 key with code FullZoom.enlarge()) and check the global flag.
3. click here
4. Test the shortcut Shift+3 => it does nothing
5. Return in this windows
5. Test the shortcut Shift+3 => it works fine

Is it a bug ?

rahul
 
Posts: 25
Joined: January 25th, 2006, 12:00 pm
Location: the tealest city

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

dorando wrote:Maybe it was caused by the patch for Bug 492931 - Case change algorithm in DOM should use ASCII upper/lowercasing (Firefox 13) which was partly backed out in Bug 776075 - Command keys using upper-case non-ASCII characters are broken (Firefox 16).


thanks for looking into it. Option-keys appear to be working properly as of FF17 regardless of letter/symbol notation so bug 492931 was indeed the likely culprit.

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

Post Posted November 24th, 2012, 5:33 am

is it possible by pressing ALT to click GO button, only when focus is inside address bar?

thanks

rick7
 
Posts: 266
Joined: July 16th, 2005, 5:33 am

Post Posted November 25th, 2012, 10:05 am

Is there a way to assign a keystroke to go to the inbox of specific mail account? I use three or four mail accounts and it would be nice to go to a particular inbox with a single keystroke.

tonymec

User avatar
 
Posts: 703
Joined: October 15th, 2004, 2:58 am
Location: Schaerbeek (near Brussels, Belgium)

Post Posted November 25th, 2012, 1:37 pm

rick7 wrote:Is there a way to assign a keystroke to go to the inbox of specific mail account? I use three or four mail accounts and it would be nice to go to a particular inbox with a single keystroke.

The following goes to the Global Inbox (Inbox of Local Folders) and makes the thread pane current. You ought to be able to go to any mail folder by changing the second line.
Code: Select all
SetFocusThreadPane();
SelectFolder('mailbox://nobody@Local%20Folders/Inbox');
SetFocusThreadPane();
Best regards,
Tony

rick7
 
Posts: 266
Joined: July 16th, 2005, 5:33 am

Post Posted November 25th, 2012, 1:53 pm

Thank you! So I would just substitute the name of my mail account where your code has "Local%20Folders"?

tonymec

User avatar
 
Posts: 703
Joined: October 15th, 2004, 2:58 am
Location: Schaerbeek (near Brussels, Belgium)

Post Posted November 26th, 2012, 1:53 am

rick7 wrote:Thank you! So I would just substitute the name of my mail account where your code has "Local%20Folders"?

Find out the mailbox URL for the server in question, it doesn't necessarily start with nobody@. Maybe by finding out where an attachment or a message is "copied from" when using Save As, I'm not sure.
Best regards,
Tony

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

Post Posted November 26th, 2012, 4:25 am

firefoxuse wrote:is it possible by pressing ALT to click GO button, only when focus is inside address bar?

thanks


anyone????

Return to Extension/Theme Releases


Who is online

Users browsing this forum: No registered users and 6 guests