Bug 382514 - Toggle (dialog) windows with shortcuts
Summary: Toggle (dialog) windows with shortcuts
Status: RESOLVED FIXED
Alias: None
Product: kstars
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Csaba Kertész
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-19 17:59 UTC by Jean-Claude
Modified: 2017-08-11 18:33 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Claude 2017-07-19 17:59:47 UTC
For the end user toggling or reversibility in keyboard shortcut is a very handy thing especially during the exploration of the software : we can pop up a dialog or make it disappear with the same gesture.
For instance the Ekos button and the INDI Control Panel button in the toolbar : we click to show the dialog, we click to hide it.
The same should apply with keyboard shortcuts : Command-K to show the Ekos dialog and Command-K to hide it.
This is not the case
Comment 1 Csaba Kertész 2017-08-09 21:38:50 UTC
The implementation is pretty easy and I also think it is very handy idea. It will make the work with KStars much easier on laptops.

I will implement it soon.
Comment 2 Csaba Kertész 2017-08-11 18:16:56 UTC
Fixed in master:

https://commits.kde.org/kstars/29811be0c679598cc61705b70d815bc7da443330

How I implemented:

Affected windows: Ekos and INDI control panel
    
How does it work?
- Their shortcuts toggle these windows by default.
- If the window is visible, but not on the top, the shortcut raises it.
Comment 3 Jean-Claude 2017-08-11 18:20:51 UTC
(In reply to Csaba Kertész from comment #2)
> Fixed in master:
> 
> https://commits.kde.org/kstars/29811be0c679598cc61705b70d815bc7da443330
> 
> How I implemented:
> 
> Affected windows: Ekos and INDI control panel
>     
> How does it work?
> - Their shortcuts toggle these windows by default.
> - If the window is visible, but not on the top, the shortcut raises it.

Thank you Csaba. 
I'll be waiting the next KStars release.
Comment 4 Csaba Kertész 2017-08-11 18:26:59 UTC
Jean-Claude,

you can also let us know later if you would like the same behavior for other windows. I thought about the different dialogs/windows for some time and I only implemented the toggling for Ekos+INDI control panel because these are the main windows what I use personally to switch back and forth during a telescope session.

By default, Escape key (does it exist on Apple keyboard?) hide an active window/dialog, so there is a way to hide an active window quickly if you used for a moment after showing with a shortcut.
Comment 5 Jean-Claude 2017-08-11 18:33:18 UTC
I'll let you know of course.
The Escape key exists on Apple keyboards and I didn't know it could hide dialogs.
I tried it : it works on the Ekos dialog but not on the INDI Control Panel dialog.