opto / nostalgy-xpi

nostalgy addon updated for Thunderbird 68 and now Thunderbird 78 - 115. Original code by Alain Frisch.
Other
117 stars 9 forks source link

Inconsistent key shortcuts #253

Open blerner opened 6 months ago

blerner commented 6 months ago

On Ubuntu 20.04, Thunderbird 115.6.0. Nostalgy++ just updated to version 4.1.4, and some but not all of my keyboard shortcuts have broken. This may be related to #249, may be a dupe entirely, but since this seems to be a regression between 4.1.1 and 4.1.3, that might help narrow down the problem.

My Thunderbird setup has three accounts, Account1, Account2, Account3, followed by Blogs & News Feeds. I have two custom keyboard shortcuts:

With v4.1.1, both keys work reliably. With v4.1.3 (and 4.1.4), Alt-I does not work to go to Account1. I have tried

and none of those changed anything. I've downgraded to https://github.com/opto/nostalgy-xpi/releases/tag/v4.1.1 for now and paused automatic updates, though obviously I'd like to keep up to date with the newest bugfixes!

opto commented 6 months ago

so how about using the new one with alt-s, etc?

We do know that TB sometimes overrides our key handling, they have changed soething but don't tell what. So we now have the official webextension shortcuts. alt-s may work or not, depending on whether your OS uses alt-s. You need by trial and error find combinations of alt, shift, ctrl and letters and enter them at extra-addons-cog symbol-shortcuts

Those then are designed (theoretically) that they are not overridden by TB.

blerner commented 6 months ago

I tried changing the hotkey to something else that I knew would work (I stole it from the one that went to Account 2), and it didn't. The only difference I could see was going to Account 1 instead of Account 2.

opto commented 6 months ago

did you do that for the original Nostalgy shortcuts or for the new webextension shortcuts with alt?

blerner commented 6 months ago

These were two custom shortcuts that I created in the Keys tab of the Nostalgy options dialog. I noticed that neither shortcut appeared in the Webextensions hotkeys list for Nostalgy, so I couldn't edit them there.

One of the two custom shortcuts successfully goes to Account2/Inbox. The other (which is supposed to go to Account1/Inbox) does not.

Happy to try some additional debugging ideas or suggestions when I get back to my computer later today.

opto commented 6 months ago

in a way, you can consider the old shortcuts obsolete. They work, or not.

The newly supported should work, once you find letter combinations that are not taken by the operating system. They are totally independent from the old letters. You can set them at extra menu-adons-cog symbol-last menu shortcuts

blerner commented 6 months ago

Is it the case that "creating custom keyboard shortcuts" at all is obsolete? (I.e. not rebinding existing defined shortcuts to new letters, but the bottom bit of the Options dialog where I can create new shortcuts altogether?) Or is it just currently the case that those custom shortcuts aren't getting added to the Webextensions list of shortcuts for some reason?

opto commented 6 months ago

the old is not totally obsolete.

In TB 115 TB "grabs" its own letters in a different way than before. I haven't yet found a way to get in between. Previously, one was notified of the letter being typed and could override (deny) the default action.

TB 115 no longer notifies me of S being pressed and directly jumps into star.

Other letters are still ok, on a German keyboard, I can replace S and others by V and others (trial and error, which letter does nothing in TB).

That is on Windows. In Linux, TB's key handling could be different.

opto commented 6 months ago

that is why I implemented the new double-letters. They are supposed to work (but for some, alt-f, for example, opens the file menu in Windows/English

blerner commented 6 months ago

Sure, I appreciate that. As far as I know, Ctrl+I (whups: I'm wrong, see below; also, I knew this apparently, since my actual keyboard shortcut is Shift-I) and Alt+I do not do anything (and haven't done anything before, and I haven't updated Thunderbird so it's not like they could suddenly be doing something!), and both shortcuts have worked with Nostalgy up to v4.1.1. As far as I can tell, though, it's not the shortcut letters themselves so much as it is the target of the shortcut: I can't seem to make a hotkey jump directly to a folder in Account1, anymore. I can still type G, then the path to that folder, and Enter, and that will go to the folder. But the direct jump doesn't seem to work.

In other words, I'm not sure whether this issue is more about hotkeys themselves, or about handling paths to folders in different accounts. But since your recent changes have been around hotkey handling and not (as far as I know) around folder jumping, I'm not certain which thing is causing the problem I'm seeing.

opto commented 6 months ago

I didn't test jump to folder by hotkey, so there might be a bug. But if, then it should be there over the full TB 115 versions, I didn't change anything there

opto commented 6 months ago

in win 11, setting a letter for a go works. ügoes into the inbox of my second account, o into a subdirectory called bugzilla in the first account

mdonz commented 6 months ago

As far as I know, Ctrl+I and Alt+I do not do anything (and haven't done anything before, and I haven't updated Thunderbird so it's not like they could suddenly be doing something!)

Ctrl+I here on TB115, Ubuntu, English language opens a tab to create a new event - as it is stated in the Thunderbird (shortcut) help (for English): https://support.mozilla.org/en-US/kb/keyboard-shortcuts-thunderbird?redirectslug=keyboard-shortcuts&redirectlocale=en-US#w_miscellaneous

blerner commented 6 months ago

You are correct, and I simply wrote the wrong thing in my report above. Not sure how that thinko happened... I use Alt+I and Shift+I, and both shortcuts work with v4.1.1 of Nostalgy and do not in v4.1.3, and it still seems to be independent of the shortcut key used instead of Alt+I.

opto commented 6 months ago

the bottom part will be somehow transfered to the new system. For the old system, if I have letters that are not in use by TB, it works consistently. Some letters are grabbed by TB depending on context, that mightexplain why it works sometimes, but not always. It would be good to observe: where is the focus: folder tree,message tree, elsewhere?

blerner commented 6 months ago

In v4.1.1, it doesn't seem to matter much -- the folder tree, the message list, or the message pane all seem to work with both keys.

In v4.1.4, I tried navigating to a message, and I think the focus was on the message pane at the time -- whatever it was, pressing Alt+I did nothing, but pressing Shift-I in that exact same setting did work.

liar666 commented 5 months ago

Hi,

ThB 115.8.1 & Nostalgy 4.1.4 here.

I can confirm that under LinuxMint 21.3 ( ~Ubuntu 22.04) keys are not working.

Simple keys, like G or D, do strange things and ctrl-Z/Edit>Undo does not undo them :( Thus it does not seem to fallback to the default ThB behavior (or it is buggy :'( ).

Combinations, like "Alt-...", are opening ThB's menus. (a.g. Alt-f opens "File" menu, Alt-m "Message" menu, etc.).

I tried to change alt-G to alt-D, which is not an existing menu. It did nothing. I changed to Shift-D and got same behavior as single keys: definitively lost some emails again :(

So for the moment, big warning to Linux users: be careful with Nostalgy++, you might definitively lose email playing with the wrong keys.

acolomb commented 5 months ago

I think what would really help is to clarify whether the new keyboard shortcuts manager is in use or the bindings in Nostalgy's preferences window. For me, disabling the 'n' shortcut didn't work for example. I set it to disabled in the preferences window, but it comes back to enabled when re-opening them. I unset it in the shortcut manager, and it stays unset there. The only way to get the default 'n' behavior back (next unread message) was to assign some other combination to Nostalgy's "new rule" shortcut in its own preferences window.

So how exactly do these two configuration places relate to each other?

liar666 commented 5 months ago

@acolomb : I'm sorry, but I only know the way using Nostalgy++'s setting/configuration. How do you access the other way of doing things ("keyboard shortcuts manager")?

acolomb commented 5 months ago

It's found here in the Add-On and Extension settings: image

And it looks like this: image

opto commented 4 months ago

at the moment, both the new and the old key manager are active. n may be hardwired, I have to check, and also I have to check whether I included into the new webextention key handler.

If you don't want to use the old one, you can disable or set to an unused key. I think you can even set several to the same key, I think the original Nostalgy did not test for that.

opto commented 4 months ago

I just had a look at the code. I don't think key being disabled was ever honored, there just is no code for that, even from the times before I started to take care of Nostalgy.