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

4.0.10 breaks ESC key for the Quick Filter Bar #232

Open fabianwenk opened 10 months ago

fabianwenk commented 10 months ago

I use Command-Shift-k (on macOS) to activate the Quick Filter Bar to search something in the mail list. Then use cursor down to select the mail I need and then press ESC key twice (first to empty the Quick Filter Bar and second to hide the Quick Filter Bar again). After the update from 4.07 to 4.0.10 this fails completely and the ESC key seems not to work any more. I have not configured ESC in Nostalgy++. Also restarting Thunderbird did not solve this.

My Workaround was a downgrade to 4.0.7 and restart of Thunderbird. Another option would be to add the "Quick Filter" to the Toolbar and use the mouse.

Thunderbird: 115.3.3 macOS: 13.6 (Ventura)

opto commented 10 months ago

yes, there is the 3 pane navigation: esc esc to focus threadtree, esc m to focus message pane, esc f to focus folder tree.

Those are in conflict with your use of esc for quickfilter I am not sure how to solve that yet

If I understand correctly, you need a double esc in threadtree, which then does actions elsewhere, namely in quickfilter

opto commented 10 months ago

if you use 4.0.7, that is not good on suggestions, it misses out most

fabianwenk commented 10 months ago

I am using the 3 pan view.

The first ESC does clear the search entry in the Quick Filter, then it is possible to search for something else, or ESC again and the complete Quick Filter Bar does disappear again (as it takes space away from the mail / thread tree). This functionality was around probably since ever and I am using it together with Nostalgy++ since a very long time. This really breaks my keyboard focused workflows.

Is this ESC functionality in Nostalgy++ new? Or did this now start to interfere with TB 115?

I checked one other occasions in TB where I am used to use ESC, but this still works with 4.0.10. Details: I filter emails out into different folders already on the mail server. So when reading the mails in this folder, I am using n to go the next unread mail, when there are no more unread emails in that folder, there is a dialog (popup window) with "Conform - Advance to the next unread message in ?" and No / Yes (ESC to abort/No and Enter to Confirm/Yes).

Some ideas / thoughts. 1) May it be possible to make this functionality with ESC + something to change the focus into the 3 panes configurable, or to disable it completely? 2) Would it be possible to ignore ESC if the focus still is in the Quick Filter Bar?

PS: Now running with TB 115.4.1

opto commented 10 months ago

Nostalgy has had this since ever. I think TB changed the way how they grab the escape.

I have been thinking about 2, and maybe (if possible) catch esc esc in the threadtree and then empty and close the filter.

Making an extra option and pref and the UI feels to much hassle. Maybe I will make an 4.0.12 for those who don't want the escape stuff and have 4.1 uploaded to ATN (and in a future version add the extra handling inside the filter)

fabianwenk commented 10 months ago

Currently it looks like that Nostalgy++ already does catch the first ESC (which I am used to clear the Search and then search for something else). So with your proposal to do a clear and close of Quick Filter Bar on ESC ESC may still break only clearing the search.

Should we maybe create a bug report at Mozilla for the ESC behavior? Maybe they can fix it, that ESC can not be grabbed from an extension when the focus is in the Quick Filter Bar.

But else, sure the option with an 4.0.12 sounds perfect for me, until a clean solution is possible.

Thank you very much for your efforts.

eengstrom commented 10 months ago

TB natively can clear the search field with the ESC key. One ESC to clear; a second to close the Quick Filter bar. I don't think Nostalgy should be overriding that feature, and if you need some key prefix for navigation, then you should choose something else.

I'm back on version 4.0.7 until the default ESC functionality is restored.

xbergade commented 10 months ago

I think it would be better if we could map the 3 focus functions to whichever key we want, that is have those in the "key" tabs of the Nostalgy preferences?

eengstrom commented 10 months ago

If I understand @xbergade correctly, adding a custom prefix key preference is a good idea, but I still think that overriding default behavior (e.g. the ESC key) in TB is probably going to cause more grief than not. @opto stated that "Nostalgy has had this [functionality] since ever", which is interesting since I never remember running across it, and I've used QuickFilter in TB since well before 115.

@opto - I really appreciate your efforts, and have donated to the cause, but there is no way I can use any version of Nostalgy that doesn't allow me to use the built-in TB ESC functionality - it's way to ingrained into my muscle memory. Also, I use it when the focus is in and out of the QuickFilter pane - notably, when I'm done with the filter, and my focus is in the message pane or in the thread tree, I simply hit ESC to clear that. So, I implore you to please add some way to allow users to select what key(s) are used for the pane navigation.

Thanks, and keep up the good work.

opto commented 9 months ago

https://github.com/opto/nostalgy-xpi/releases/tag/v4.1.1

use ctrl shift k to get into quickfilter, use it as normal, esc to clear, another esc to close. Should do the same with expression search searchbox, but not tested yet

xbergade commented 9 months ago

Thanks, works :)

fabianwenk commented 9 months ago

So far it also works for me. But as you mention, the focus needs to be in QuickFilter (my suggestion 2 from above). I did not realize back then, that most of the time I hit ESC ESC, that I have the focus already on a selected email. So I have to do an additional Cms-shift-f (ctrl-shift-f) to bring the focus back into QuickFilter and then ESC ESC. At least no mouse interaction is needed any more. Hopefully there will be a better solution in the future.

eengstrom commented 9 months ago

@opto - thanks for the release of a new version (4.1.2), but it is still the case that the extension is overriding ESC, which for some of us is problematic. Any thoughts on allowing us to modify the "meta" key from ESC, as some of us have discussed earlier?

xbergade commented 9 months ago

That would be awesome, I think Esc conflicts with too many things.

bbailleux commented 9 months ago

Duplicate with #235 ?

eengstrom commented 9 months ago

Duplicate with #235 ?

IMO, not exactly duplicate, but definitely related.

opto commented 9 months ago

so, the current workaround is: focus quickfilterbar by ctrl shift k, then use esc as before.

In your locale, would anything speak against (if it would actually work):

ctrl ctrl ctrl shift ctrl alt

instead of using the esc versions?

opto commented 9 months ago

@eengstrom .." Nostalgy having this forever..." I don't remember whether it actually worked recently, but it is in the help file forever

eengstrom commented 9 months ago

@opto - yes, the workaround to focus into the quickfilter bar does work, but is exceedingly cumbersome, in my opinion. Certainly we could try to come up with some other key sequence that does not conflict, e.g. your ctrl ctrl suggestion, but I think that is not the best solution. To accommodate everyone regardless of locale, the best solution is to add two features to the extension configuration dialog:

  1. selection of key sequence for the "meta" key (e.g. esc or ctrl or whatever) to begin the 3-pane keyboard navigation actions.
  2. a simple checkbox to entirely disable that feature. Perhaps even have it turned off by default?

In that way, all default behavior of TB (using esc) is retained for those who want it, and your extension is widely accessible to everyone regardless of locale or platform.

Somewhat separately, I'm quite happy to help contribute to this effort with time, if you will consider PRs. Just let me know what branch of the Git repo to fork and I'll work on it ASAP.

xbergade commented 9 months ago

I would imagine that that ctrl ctrl would create even more problems and interfere in unexpected ways with other built-in shortcuts, happy to be proven wrong.

opto commented 9 months ago

on my German win 11 they do nothing, it is only ctrl + letter that has an action associated (or alt + letter)

eengstrom commented 9 months ago

on my German win 11 they do nothing, it is only ctrl + letter that has an action associated (or alt + letter)

That may be true, but in other locales, on different OS versions, or even different OSes entirely, the keyboard shortcuts are different. In my case, I'm on MacOS 14.x. Even if we had a sufficient sampling of users, we'd still miss someone likely, which is why I still think the best option is what I said earlier:

  1. make the meta-key or key-sequence be user-definable, and
  2. turn off the feature entirely by default.

I reiterate my offer to help with the code if you can point me at the appropriate git branch to fork and start work.

ftjuh commented 8 months ago

Long term user and supporter, here, would love to see this resolved.

Any chance of getting back the old "ESC clears filter from anywhere" behavior? The current state is a major hassle in my workflow, too.

Jan

Izwbusr commented 6 months ago

I would also like to see Nostalgy NOT override the standard function of the ESC key. In my case, I use ESC a lot to close email windows during my workflow. I open email with ENTER and close with ESC. This is very quick. It is very problematic not to be able to do this when Nostalgy is installed. Thanks!