mikehardy / thunderlink

Link to your Thunderbird emails!
Mozilla Public License 2.0
42 stars 14 forks source link

Keyboard shortcuts not working #36

Closed dmusican closed 5 years ago

dmusican commented 5 years ago

The ctrl-alt-number keyboard shortcuts seem to have stopped working for me. Thunderlink 1.2.7, Thunderbird 60.2.1, Ubuntu 18.04.1. I've verified that my window manager isn't intercepting the shortcuts by successfully getting another app to receive them. Did something change recently either in Thunderlink or in Thunderbird regarding those shortcuts?

mikehardy commented 5 years ago

In fact something appears to be broken - and I just reproduced it yesterday after @kgorlen reported it as a comment here https://github.com/mikehardy/thunderlink/issues/23#issuecomment-454179276 but it should be a first-class issue, yes, so thank you for logging it.

The breakage is not intentional and I am hoping to fix it today - sorry it happened

In the meantime, all the old releases are available on both add-ons main site as well as here in the releases section - I do not believe 1.2.6 had the problem but I am not 100% sure - if you could try and report back that would be useful for others https://github.com/mikehardy/thunderlink/releases

MarioKusek commented 5 years ago

Hi Mike,

I have looked the code and in thunderlink-overlay.xul are keys mapped to call ThunderLinkChromeNS.CopyCustomTlStringToClp. This function no longer exist it is changed to: ThunderLinkChromeNS.ActivateCustomTlString.

dmusican commented 5 years ago

Thanks, @mikehardy, for taking a look. I just rolled back to 1.2.6: yep, the keyboard shortcuts still work in 1.2.6.

MarioKusek commented 5 years ago

I have created fix in https://github.com/MarioKusek/thunderlink/tree/fix/shortcutfix @mikehardy to which branch you want me to create pull request?

mikehardy commented 5 years ago

@MarioKusek that is great - thank you so much! Go ahead and create the PR for master. I am okay with packaging this with multi-select to get the fix out.

@dmusican thanks for checking 1.2.6 - until 1.2.8 gets approved (sometimes takes a few days) this will help me support anyone else

mikehardy commented 5 years ago

(and in the meantime, I need to figure out some way to make this kind of a "build break" so it can't happen again in the future - the xul <-> js connection isn't lintable I guess, but I need to investigate)

mikehardy commented 5 years ago

This was resolved with #37 and 1.2.8 has been tagged and submitted for review, it will be published as soon as thunderbird.net approves it

mikehardy commented 5 years ago

Sorry - was called away before I could post this, but anyone affected may install the release directly before it is approved. This is the exact same binary that I submitted to add-ons.thunderbird.net https://github.com/mikehardy/thunderlink/releases/download/1.2.8/thunderlink-1.2.8-tb.xpi

mikehardy commented 5 years ago

Apologies for the spam but this was all reported and fixed so quickly the communication timeline is compressed. They just approved it so 1.2.8 is out through official channels. That was amazingly quick.

kgorlen commented 5 years ago

1.2.8 fixed the ctrl-alt shortcuts on Win10, but "Copy Subject + TL to clipboard" is still broken.  Here are my preferences:

user_pref("extensions.thunderlink.custom-tl-string-1-title", "Copy thunderlink to clipboard"); user_pref("extensions.thunderlink.custom-tl-string-2", ""); user_pref("extensions.thunderlink.custom-tl-string-2-title", "Copy executable + TL to clipboard"); user_pref("extensions.thunderlink.custom-tl-string-3", "\n"); user_pref("extensions.thunderlink.custom-tl-string-3-title", "Copy Subject + TL to clipboard"); user_pref("extensions.thunderlink.open-tl-behaviour", "openInNewTab");

I think I had to edit these by hand a while back to get TL to work after a TB update broke it and TL was no longer supported.

Thanks.

On 1/15/2019 9:16 AM, Mike Hardy wrote:

Apologies for the spam but this was all reported and fixed so quickly the communication timeline is compressed. They just approved it so 1.2.8 is out through official channels. That was amazingly quick.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mikehardy/thunderlink/issues/36#issuecomment-454474148, or mute the thread https://github.com/notifications/unsubscribe-auth/AQY6y9SKNitQP0OvF7is-oYhQk6UZLiVks5vDgzfgaJpZM4aBCA6.

mikehardy commented 5 years ago

@kgorlen I want to help but I just can't reproduce the problem with <subject>\n<thunderlink> on my linux or windows tests. You can see the console (ctrl+shift+J in thunderbird) and how it saw the format I copied from your preference, decoded it, and then at the bottom that was me just pasting the clipboard into the window after I did a right-click and selected the message, then selected the 3rd preference. It worked with Ctrl+Alt+3 as well. ???

I want to be clear - I'm sure there is a problem somewhere I just don't know where. Maybe you could try clearing your thunderlink preferences and reconfiguring? (or just putting a fresh attempt at subject+TL in an unused slot)?

screenshot from 2019-01-15 14-36-59

kgorlen commented 5 years ago

I reverted to thunderlink-1.2.2-beta2-tb.xpi to get Ctrl+Alt+3 working again.

On 1/15/2019 11:41 AM, Mike Hardy wrote:

@kgorlen https://github.com/kgorlen I want to help but I just can't reproduce the problem with |\n| on my linux or windows tests. You can see the console (ctrl+shift+J in thunderbird) and how it saw the format I copied from your preference, decoded it, and then at the bottom that was me just pasting the clipboard into the window after I did a right-click and selected the message, then selected the 3rd preference. It worked with Ctrl+Alt+3 as well. ???

I want to be clear - I'm sure there is a problem somewhere I just don't know where. Maybe you could try clearing your thunderlink preferences and reconfiguring? (or just putting a fresh attempt at subject+TL in an unused slot)?

screenshot from 2019-01-15 14-36-59 https://user-images.githubusercontent.com/782704/51205335-abbd8080-18d3-11e9-95c6-fb7f0658ee52.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mikehardy/thunderlink/issues/36#issuecomment-454524102, or mute the thread https://github.com/notifications/unsubscribe-auth/AQY6yzMkHe3-Cu6p_UbfgaOHoeGP28gTks5vDi75gaJpZM4aBCA6.

mikehardy commented 5 years ago

Sorry that didn't work out for you. If you try the current version again send a screenshot of the Javascript cinsile after trying your shortcut and ill take a look

kgorlen commented 5 years ago

The problem was that I separated and with a carriage return.  Changing this to a space got it working. JS console screenshot attached.

Thanks.

On 1/20/2019 2:45 PM, Mike Hardy wrote:

Sorry that didn't work out for you. If you try the current version again send a screenshot of the Javascript cinsile after trying your shortcut and ill take a look

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mikehardy/thunderlink/issues/36#issuecomment-455909746, or mute the thread https://github.com/notifications/unsubscribe-auth/AQY6y2rH8KWcMOiySF9BhSwudKNO0IPGks5vFPGDgaJpZM4aBCA6.

mikehardy commented 5 years ago

Just as a note - your screenshot didn't come through, you have to upload those using github's actual web ui. However, if you look at my console screenshot, I had actually tried (what I thought was) your shortcut with \n in it, so I'm still confused a bit, but I'm happy you got it working enough to stay up to date on the plugin. With 1.2.9 we just hit a point where as far as I know there are no more regressions and it'll work up to Thunderbird 65 so you'll be future-proof (for a while at least)

kgorlen commented 5 years ago

Maybe the characters causing the problem are CR+LF, since this is on Windows?

On 1/22/2019 11:13 AM, Mike Hardy wrote:

Just as a note - your screenshot didn't come through, you have to upload those using github's actual web ui. However, if you look at my console screenshot, I had actually tried (what I thought was) your shortcut with |\n| in it, so I'm still confused a bit, but I'm happy you got it working enough to stay up to date on the plugin. With 1.2.9 we just hit a point where as far as I know there are no more regressions and it'll work up to Thunderbird 65 so you'll be future-proof (for a while at least)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mikehardy/thunderlink/issues/36#issuecomment-456525758, or mute the thread https://github.com/notifications/unsubscribe-auth/AQY6y2DomxDM4hd3EICzoiLWtxfcWoD9ks5vF2LhgaJpZM4aBCA6.

mikehardy commented 5 years ago

Maybe the characters causing the problem are CR+LF, since this is on Windows?

That's a good guess - I was just using '\n' and maybe '\r\n' would do it, but what I don't understand is why your preference said this when you pasted it in above:

user_pref("extensions.thunderlink.custom-tl-string-3","<subject>\n<thunderlink>");

...and when I literally copy/pasted your preference string into my copy it didn't work. 🤔

kgorlen commented 5 years ago

Using the "Enter" key in the custom setting:

results in: user_pref("extensions.thunderlink.custom-tl-string-3", "\n"); in prefs.js, and that fails. Using "\n" in the custom setting, as is now documented: \n results in: user_pref("extensions.thunderlink.custom-tl-string-3", "\\n"); in prefs.js, which works. Many thanks for maintaining this essential add-on! On 1/23/2019 12:14 PM, Mike Hardy wrote: > > Maybe the characters causing the problem are CR+LF, since this is > on Windows? > > That's a good guess - I was just using '\n' and maybe '\r\n' would do > it, but what I don't understand is why your preference said this when > you pasted it in above: > > |user_pref("extensions.thunderlink.custom-tl-string-3","\n");| > > ...and when I literally copy/pasted your preference string into my > copy it didn't work. 🤔 > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > , > or mute the thread > . >
mikehardy commented 5 years ago

Ah ha! Glad to have the final info on that, thanks for trying one more time so we could know for the future. I'll remember the escapes in the future, and I'm glad you like it - I'm completely addicted to this add-on myself so I'm happy to help :-). Cheers