MozillaZine

keyconfig 20110522

Announce and Discuss the Latest Theme and Extension Releases.
WildcatRay

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

Post Posted February 24th, 2014, 1:40 pm

Zoolcar9 wrote:
WildcatRay wrote:Are you getting something copying to the clipboard?

Yes.

Thanks. At least now I know it is something on my end.
Ray

OS'es: 4 computers with Win10 Pro 64-bit; Current Firefox, Beta, Nightly, Chrome, Vivaldi

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

Post Posted February 24th, 2014, 8:14 pm

@Leopoldus

Toggle HTML does not work like you said. The extension permanently changes the preferences.

http://www.thunderbird-forum.de/3464-to ... -1-13.html

P.S. I had to "fix" the file to view the source using PKZIP.

Edit:

I did not see bege's post. I guess the Allow HTML Temp extension does what you want.
Last edited by morat on February 25th, 2014, 7:08 am, edited 1 time in total.

tonymec

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

Post Posted February 25th, 2014, 3:24 am

bege wrote:
Leopoldus wrote:Hi!

Is there any ready-made code for a hotkey to toggle on/off HTML view? There was an add-on HTML View toggle, but it has stop working many TB versions and many years ago.
Thanks!

I am using "Allow HTML Temp" extension.

and (this time) the extension author did not forget to target also SeaMonkey in his install.rdf. I feel that this deserves a mention, even if I'm not going to install that extension (I already have more than 50, and in this case the "View → Message Body As" menu is good enough for me).
Best regards,
Tony

rbfye14
 
Posts: 26
Joined: April 9th, 2012, 8:23 am

Post Posted February 25th, 2014, 12:23 pm

rbfye14 wrote:How can I emulate keyup and keydown event for Alt key?

What about my question?
No ideas?

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

Post Posted February 26th, 2014, 10:28 am

@rbfye14

Try this:

Code: Select all
var utils = document.commandDispatcher.focusedWindow.
  QueryInterface(Components.interfaces.nsIInterfaceRequestor).
  getInterface(Components.interfaces.nsIDOMWindowUtils);
utils.sendKeyEvent("keydown",  KeyEvent.DOM_VK_ALT, 0, 0);
utils.sendKeyEvent("keypress", KeyEvent.DOM_VK_ALT, 0, 0);
utils.sendKeyEvent("keyup",    KeyEvent.DOM_VK_ALT, 0, 0);

Leopoldus
 
Posts: 353
Joined: April 8th, 2008, 4:29 am

Post Posted February 27th, 2014, 3:13 am

@morat
@tonymec
@bege
I guess the Allow HTML Temp extension does what you want.

Yes and no. Yes, this extension does allow temporarily enable/disable HTML view for the current message being view.
No, it does not let do what I need. At the first, it works only in the event, that the default view mode is NOT original HTML, but plain text or Simple HTML (not my case) - see the description https://addons.mozilla.org/en-US/thunde ... -html-temp . The second, it works only via toolbar buttons and does not allow assign a hotkey (if I have not missed anything). But I surely prefer a keyboard to mouse, at least, for such type of toggle operations (well, I suppose the most of guys in this topic are keyboard maniacs as me).

So my request is still actual.

hungerburg
 
Posts: 16
Joined: September 19th, 2003, 3:23 am

Post Posted February 27th, 2014, 3:56 am

hungerburg wrote:A hopefully simple question:

Can I use the keyconfig addon to make "Ctrl-Shift-F" in thunderbird preselect "body" as the initial term (instead of subject)?


If so, would you please tell me, how?

Kind regards

Peter

bege
 
Posts: 115
Joined: January 23rd, 2009, 9:14 pm
Location: Germany

Post Posted February 27th, 2014, 10:20 am

Leopoldus wrote:@morat
@tonymec
@bege
I guess the Allow HTML Temp extension does what you want.

Yes and no. Yes, this extension does allow temporarily enable/disable HTML view for the current message being view.
No, it does not let do what I need. At the first, it works only in the event, that the default view mode is NOT original HTML, but plain text or Simple HTML (not my case) - see the description https://addons.mozilla.org/en-US/thunde ... -html-temp . The second, it works only via toolbar buttons and does not allow assign a hotkey (if I have not missed anything). But I surely prefer a keyboard to mouse, at least, for such type of toggle operations (well, I suppose the most of guys in this topic are keyboard maniacs as me).

So my request is still actual.


Allow HTML Temp has a staturbar menu in the compose window. This menu shows three display options.
Original HTML oncommand
Code: Select all
MsgBodyAllowHTML()

Simple HTML oncommand
Code: Select all
MsgBodySanitized()

Plain text oncommand
Code: Select all
MsgBodyAsPlaintext()


So I think that someone can make a shortcut to toggle between these options. (I am sorry, I don't have a clue.)

liquider
 
Posts: 4
Joined: October 30th, 2008, 1:00 pm

Post Posted February 28th, 2014, 1:54 pm

does anyone following this thread for long enough please care to elaborate dafuq's the reason this add-on, the single one that actually works, is not listed on addons.mozilla.org ??

rbfye14
 
Posts: 26
Joined: April 9th, 2012, 8:23 am

Post Posted March 1st, 2014, 10:33 pm

morat wrote:Try this:
Code: Select all
var utils = document.commandDispatcher.focusedWindow.
  QueryInterface(Components.interfaces.nsIInterfaceRequestor).
  getInterface(Components.interfaces.nsIDOMWindowUtils);
utils.sendKeyEvent("keydown",  KeyEvent.DOM_VK_ALT, 0, 0);
utils.sendKeyEvent("keypress", KeyEvent.DOM_VK_ALT, 0, 0);
utils.sendKeyEvent("keyup",    KeyEvent.DOM_VK_ALT, 0, 0);

morat,
thank you for your reply!
But this code doesn't do what I expected it would :(
I thought it's possible to emulate keydown and keyup event for Alt key and select part of link. Without really pressing the Alt key.

Zoolcar9

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

Post Posted March 2nd, 2014, 2:34 am

liquider wrote:does anyone following this thread for long enough please care to elaborate dafuq's the reason this add-on, the single one that actually works, is not listed on addons.mozilla.org ??

Because he never submitted it.
My Firefox information | Add-ons | GitHub

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

liquider
 
Posts: 4
Joined: October 30th, 2008, 1:00 pm

Post Posted March 2nd, 2014, 11:28 am

Zoolcar9, thank you, that's exactly what I was looking for.

Does dorando still frequent this thread?

If so, I find his 5-year-old arguments outdated and/or easily refuted, and I would like to appeal to him to reevaluate his position.

Leopoldus
 
Posts: 353
Joined: April 8th, 2008, 4:29 am

Post Posted March 4th, 2014, 1:16 am

bege wrote:So I think that someone can make a shortcut to toggle between these options. (I am sorry, I don't have a clue.)

Hey, dear someone! Could you please add with the code of the proper hotkey, as bege has suggested?
Many thanks id advance!

ddong
 
Posts: 128
Joined: August 25th, 2013, 2:04 am

Post Posted March 8th, 2014, 8:01 pm

I don't know how it came, but recently i got a very strange issue with keyconfig. What's happening is on one the firefox opened window, most used keyboard shortcuts are messed/mixed up.

Well, after trying things, it appears that it's the shortcuts containing the shift keys that are affected. It's not a specific window : no matter how many i have opened, one of them will always have this issue.

So copying all of its urls i a brand new one didn't help. If i close/reopen that window, all's fine again, but after i quit/restart firefox, issue's back. I tried removing/reinstalling the extension, didn't help. Any ideas how to fix this?

troypst
 
Posts: 16
Joined: March 15th, 2013, 5:19 am

Post Posted March 11th, 2014, 1:34 pm

Hi,
is there any way to convert this bookmarklet to keyconfig code?

Goo.gl URL shortener:

Code: Select all
javascript:var%20uri=window.location.href;xhr=new%20XMLHttpRequest();xhr.open('POST','https://www.googleapis.com/urlshortener/v1/url',false);xhr.setRequestHeader('Content-Type','application/json');xhr.send(JSON.stringify({longUrl:uri}));var%20json=xhr.responseText;var%20obj=JSON.parse(json);alert(obj.id);


Thanx.

Return to Extension/Theme Releases


Who is online

Users browsing this forum: No registered users and 2 guests