rockowitz / ddcui

Graphical user interface for ddcutil - control monitor settings
http://www.ddcutil.com
GNU General Public License v2.0
147 stars 2 forks source link

Register Ctrl+Q (and maybe Ctrl+W) for closing the application (at least in Linux OS'es) #40

Closed stdedos closed 2 years ago

rockowitz commented 2 years ago

CTL-Q is now closes the application in development branch 0.2.2. Note that it is only recognized in the main window, not in the dialog boxes. This is consistent with what I've observed with applications the recognize CTL-Q. I've not found any documentation/specification for use of CTL-Q. Do you know of any?

While many applications seem to recognize CTL-Q, I only found a handful that recognize CTL-W, so did not implement its recognition. If documentation exists that specify use of CTL-W to close the application I would reconsider recognizing it as well.

Note that ALT-F4 also serves to close the application.

stdedos commented 2 years ago

Do you know of any?

Not that I know of, but it is "very widely used":

If documentation exists that specify use of CTL-W to close the application I would reconsider recognizing it as well.

e.g. browsers use it to close tabs, and, as a side-effect, on the last tab, the browser closes too. Hence the maybe.

Note that ALT-F4 also serves to close the application.

"Technically", it's used to close the window in focus. The application closes as a side-effect of not having windows anymore. Apart from https://wiki.gnome.org/Design/OS/KeyboardShortcuts, e.g. Jetbrains IDEs do that, Chrome did that (but Chrome doesn't use the Ctrl+Q shortcut idk why they decided against it - maybe it's too close to Ctrl+1/Ctrl+Tab?), and Sublime does it too

rockowitz commented 2 years ago

Thank you for the links and clarifications.