ysard / mintrayr

Mozilla extension: Minimize windows into the system tray (Firefox, Thunderbird, Seamonkey, Instantbird)
https://addons.thunderbird.net/en-US/thunderbird/addon/minimizetotray-reanimated/
Mozilla Public License 2.0
130 stars 14 forks source link

Key Shortcut #23

Closed markusb68 closed 5 years ago

markusb68 commented 5 years ago

Is it possible to add the possibility to define a key shortcut (like WIN-y) for maximizing and closing to tray?

ysard commented 5 years ago

Hi, this shortcut will be available only on Windows and MacOS and only for a minimization to tray (maximization is driven by the desktop/OS manager). For GNU/Linux OS the choice of the Ctrl modifier seems risky to me so I don't implement it yet.

markusb68 commented 5 years ago

Hmm, sad to hear. I'm looking for a Thunderbird-Tray replacement. TB-Tray could minimize to tray and also maximize with a system wide shortcut.

ysard commented 5 years ago

Here are some explanations.

With JavaScript (the language used for the addon), under Windows and Mac the meta key ("Windows" or "Command") is a modifier that can be used in combination with another key. On Linux with JavaScript, this key is recognized as a separate key and cannot be used in combination with another key.

The use of the Ctrl key is already often reserved for actions such as Ctrl + Y (Redo), Ctrl + Z (Undo). So I don't recommend its hard-coded implementation in an addon because it could disrupt Thunderbird's working.

In addition, window minimization/maximization actions are managed by the desktop manager more than the software itself. Under Windows it can be complex to remap key combinations for that, which is why I accepted the proposal, but under Linux it is excessively simple. Here is an example under KDE: image

Going through this manager will also prevent you from overwriting an existing system shortcut.