Bug 442188

Summary: Tooltip on "maximize", "move to new tab" and "close" buttons should display their shortcut
Product: [Applications] konsole Reporter: ratijas <me>
Component: split-viewAssignee: Konsole Developer <konsole-devel>
Status: CONFIRMED ---    
Severity: minor CC: felixernst, nate, tcanabrava
Priority: NOR    
Version: 21.08.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description ratijas 2021-09-08 19:08:27 UTC
SUMMARY
Actions represented by the buttons on a split view's header (toolbar?) have a (default) shortcut, but tooltips of those buttons do not display it. This is inconvenient, and is a bad discoverability.

STEPS TO REPRODUCE
1. Open Konsole window.
2. Split at least in two views.
3. Hover over e.g. "Maximize terminal" button.

OBSERVED RESULT
Text-only tooltip.

EXPECTED RESULT
Tooltip with a shortcut, just like regular toolbar buttons.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.2
Kernel Version: 5.13.13-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-6700HQ CPU @ 2.60GHz
Memory: 15.6 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 970M/PCIe/SSE2
Comment 1 Nate Graham 2021-09-08 19:10:05 UTC
With the new tooltip code in a recent frameworks version, this should be happening automatically if the widget is associated with a QAction that has a shortcut set, IIRC.
Comment 2 Felix Ernst 2021-09-10 10:37:52 UTC
>Actions represented by the buttons on a split view's header (toolbar?)
>have a (default) shortcut, but tooltips of those buttons do not display it.
It seems like there are actually two different actions logic-wise:

1. Actions that deal with the currently activated view (these have keyboard shortcuts)
2. Buttons on the header area that deal with the view they are attached to (these don't)

>This is inconvenient, and is a bad discoverability.
I agree. Though if we simply display the keyboard shortcut there, this could be potentially misleading. For example imagine we have the main window split in two views (left and right).

The left view is currently active and a user wants to close the right view so they hover the close button of the right view. If we simply display the shortcut for "Close current session" there, the user might use it and close the left view by accident.

This could be solved in a number of ways:

1. We could be explicit with the wording: "Close Terminal. The keyboard shortcut for closing the currently active session is (Ctrl+Shift+W)." or "Close Terminal. To close any terminal view using the keyboard, first switch to it using (keyboard shortcut), then close the currently active view using (Ctrl+Shift+W)."
2. We could only display the shortcut in the tooltips of the currently active view
3. We could number the views and have a specific shortcut for closing each of them that we could then display. (This one seems too complicated to me.)
4. ?

From these I prefer the first wording but maybe there is some better solution I currently can't come up with.