MozillaZine

keyconfig 20110522

Announce and Discuss the Latest Theme and Extension Releases.
morat
 
Posts: 2277
Joined: February 3rd, 2009, 6:29 pm

Post Posted January 30th, 2017, 5:03 am

@avada

Try something like:

Code: Select all
var url = content.document.location.href;
var localFile = Components.classes["@mozilla.org/file/local;1"].
  createInstance(Components.interfaces.nsILocalFile);
var process = Components.classes["@mozilla.org/process/util;1"].
  createInstance(Components.interfaces.nsIProcess);
var args = ["--incognito", url];
localFile.initWithPath("C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe");
process.init(localFile);
process.run(false, args, args.length);

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

Post Posted January 30th, 2017, 6:00 am

morat wrote:@avada

Try something like:

Code: Select all
var url = content.document.location.href;
var localFile = Components.classes["@mozilla.org/file/local;1"].
  createInstance(Components.interfaces.nsILocalFile);
var process = Components.classes["@mozilla.org/process/util;1"].
  createInstance(Components.interfaces.nsIProcess);
var args = ["--incognito", url];
localFile.initWithPath("C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe");
process.init(localFile);
process.run(false, args, args.length);

Hmmm... Nothing seems to be happening.
I assume I need to change the chrome path to yt-dl's?

Update:
So if I use this code via custom buttons it works

Here's the modified code:
Code: Select all
var url = content.document.location.href;
var localFile = Components.classes["@mozilla.org/file/local;1"].
  createInstance(Components.interfaces.nsILocalFile);
var process = Components.classes["@mozilla.org/process/util;1"].
  createInstance(Components.interfaces.nsIProcess);
var args = [url];
localFile.initWithPath("d:\\Path\\to\\YTDL\\youtube-dl.exe");
process.init(localFile);
process.run(false, args, args.length);


For whatever reason nothing happens with keyconfig. Anyway, it'll serve... Thanks a lot!

superschwul
 
Posts: 1
Joined: February 7th, 2017, 5:01 pm

Post Posted February 7th, 2017, 5:21 pm

Hi. I'm running "dorando keyconfig 2016.2" on Firefox 51 on linux.
I've assigned shortcuts for switching to prev/next tabs and it works great.
But as soon as I switch to a new tab, I can't scroll the page down. I have to wait about a second. Bummer...
This does not happen when using the default firefox shortcut (ctrl+tab).

EDIT: Nevermind. Realized "syndaemon" is the culprit.
It is a daemon that momentarily disables the touchpad after any keypress.

WCityMike
 
Posts: 63
Joined: February 29th, 2004, 10:28 am
Location: Chicago, Illinois

Post Posted March 10th, 2017, 5:28 pm

Have looked rather thoroughly, and have been unable to find this.

Anyone know what code to put into Keyconfig for it to trigger the "Share This Page" toolbar button?

Help greatly appreciated in advance.

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

Post Posted March 10th, 2017, 7:06 pm

@WCityMike

Try this:

Code: Select all
SocialShare.sharePage();

http://dxr.mozilla.org/mozilla-release/search?q=Share+This+Page
http://dxr.mozilla.org/mozilla-release/search?q=sharePageCmd.label

P.S.

You can use the following code to easily extract commands.

Code: Select all
function getCommand(event) {
  window.removeEventListener("command", getCommand, true);
  event.preventDefault();
  event.stopPropagation();
  alert(event.originalTarget.getAttribute("oncommand") ||
    event.originalTarget.getAttribute("onclick"));
}
window.addEventListener("command", getCommand, true);

The trick does not work for all user interface elements.

pintassilgo
 
Posts: 122
Joined: August 30th, 2013, 3:50 pm

Post Posted March 11th, 2017, 12:08 pm

Ctrl + Space not working in Firefox 52

https://bugzilla.mozilla.org/show_bug.cgi?id=1346499

GotA20
 
Posts: 2
Joined: July 11th, 2013, 2:27 pm

Post Posted March 22nd, 2017, 2:20 pm

Dorando keyconfig seems to have stopped working. At least on my computers, the code certificate was only valid until some days ago, and a new installation from addons.mozilla.org fails with the message that the add-on seems to be corrupt.
Is it perhaps possible that trlkly (or some other skilled person) updates the add-on?

Thanks in advance!

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

Post Posted March 24th, 2017, 3:57 pm

hello!

can you tell me please how to:

1) F1 open new tab regardless if cursor is inside a text box
2) F2 close current tab regardless if the cursor is inside a text box
3) q/w back/forward only if cursor is not inside a text box
4) 1/2 go to left/right tab only if cursor is not inside a text box
5) RCTRL close current tab regardless if the cursor is inside a text box
6) Left/Right go to left/right tab only if cursor is not inside a text box
7) 00 type 0192582245 only if cursor is inside a webpage text box (and not if it is inside address bar)

jpfleury
 
Posts: 8
Joined: February 11th, 2009, 11:26 am

Post Posted March 30th, 2017, 12:33 pm

Hi,

I'm trying to create a shortcut key allowing to delete flag (star) if the message is flagged. I can toggle flag status with this:

Code: Select all
goDoCommand('cmd_markAsFlagged');


but if the message is not flagged, this command will flag it, and I want to avoid it. To give an example about what I'm trying to do, here's a functional code about watched thread:

Code: Select all
if (gFolderDisplay.selectedMessageThreadWatched) {
    goDoCommand('cmd_watchThread');
}


Is there a kind of function like "gFolderDisplay.selectedMessageFlagged" allowing to create a condition to run "cmd_markAsFlagged" only if the message is flagged?

Thanks a lot.

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

Post Posted March 30th, 2017, 12:47 pm

@jpfleury

Try this:

Code: Select all
var msgHdr = gFolderDisplay.selectedMessage;
if (msgHdr.isFlagged) {
  goDoCommand("cmd_markAsFlagged");
}

jpfleury
 
Posts: 8
Joined: February 11th, 2009, 11:26 am

Post Posted March 30th, 2017, 12:53 pm

@morat: it works great. Thanks a lot for this very quick answer. Much appreciated! :-)

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

Post Posted March 31st, 2017, 12:42 pm

morat wrote:@jpfleury

Try this:

Code: Select all
var msgHdr = gFolderDisplay.selectedMessage;
if (msgHdr.isFlagged) {
  goDoCommand("cmd_markAsFlagged");
}


morat any idea about my post???

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

Post Posted April 2nd, 2017, 3:25 pm

why no one replies????

nohamelin
 
Posts: 69
Joined: September 3rd, 2013, 4:04 pm
Location: Chile

Post Posted April 2nd, 2017, 4:22 pm

@firefoxuse
They are a bunch of code requests, without providing a single clue if you at least took some time to check older pages in this thread to find something similar. The bigger the request, the greater the patience you need to wait for someone who can take that task for you.

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

Post Posted April 6th, 2017, 3:24 am

Regarding Dorando keyconfig, it states that it's Firefox for Android compatible but after installation there doesn't appear to be any way of accessing the settings. Is the compatibility for Android just an automatic label or is there indeed a way of using it on mobile?

Asking as I've been seeking a way to add hotkeys to the Firefox for Android browser, since I have a Blackberry physical keyboard and I'm used to the native browser hotkeys of 'T' for scroll to top, 'B' for scroll to bottom, etc. And also as the Firefox for Android toolbar lacks a back button. Would be marvelous to be able to recreate them.

Return to Extension/Theme Releases


Who is online

Users browsing this forum: dbcooper.dk and 2 guests