Bug 414587 - Set F4 shortcut to open the terminal in Kate like in Dolphin
Summary: Set F4 shortcut to open the terminal in Kate like in Dolphin
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 19.08.3
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Nate Graham
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-27 21:14 UTC by postix
Modified: 2019-12-08 16:50 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 20.04.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description postix 2019-11-27 21:14:41 UTC
SUMMARY

In Dolphin the user opens and closes the internal terminal with F4.
It would be convenient to be able to do the same in Kate. I use it for e.g. to quickly compile LaTeX code.

It would then also be convenient if the focus moved to the terminal when opening and by closing back to the last known cursor position in the text area.
Comment 1 Matthias 2019-11-30 15:28:37 UTC
Currently, F4 closes the Terminal. It does not open it again, a simple fix in the shortcuts dialog does fix this. I also recommend setting this to the default setting, due to consistency.
Comment 2 Nate Graham 2019-12-02 20:56:22 UTC
For me, F4 already does show the terminal view just like in Dolphin. What am I missing? Do you have the "Terminal Tool View" plugin enabled?
Comment 3 postix 2019-12-02 22:09:28 UTC
(In reply to Matthias from comment #1)
> Currently, F4 closes the Terminal. It does not open it again (...)

(In reply to Nate Graham from comment #2)
> For me, F4 already does show the terminal view just like in Dolphin. What am
> I missing? Do you have the "Terminal Tool View" plugin enabled?

Currently F4 opens it only for me, but does not close it again as in Dolphin.
I have not enabled anything special, at least not intentionally. 

Under "Extra" there's a context menu entry saying "Take the focus from the terminal (F4)" but it does not nothing if I press it and the terminal was focused.
Comment 4 Nate Graham 2019-12-02 22:23:15 UTC
(In reply to Postix from comment #3)
> Currently F4 opens it only for me, but does not close it again as in Dolphin.
> I have not enabled anything special, at least not intentionally. 
This is actually intentional in Kate. F4 opens the Konsole panel and thereafter, switches focus between the Konsole panel and the main text editing view.

> Under "Extra" there's a context menu entry saying "Take the focus from the
> terminal (F4)" but it does not nothing if I press it and the terminal was
> focused.
This is fixed in Konsole 19.12 by https://cgit.kde.org/konsole.git/commit/?id=bbdf27cc9fee4cf40e7f2551769445b2146ec20c

Can you verify that the above is working properly once you have Konsole 19.12 or from git master?
Comment 5 postix 2019-12-02 22:26:37 UTC
> Can you verify that the above is working properly once you have Konsole 19.12 or from git master?

I'll do that!

However, I wonder why you prefer such inconsistency with Dolphin?
Why not not a different shortcut to take the focus away?

Or maybe I will have to get used to Yuakake instead, where I can both show and hide it F12.

Having the terminal displayed all the time just takes too much space away, if it's not needed.
Comment 6 postix 2019-12-02 22:29:58 UTC
(Sorry for a second post, I would really like to just edit my old one ...)

I come from Vim, and I find it handy to only use the keyboard, that's why I also like to take and give the focus (in practical show or hide) from or to the terminal just by a hotkey without any mouse movement. ;-)
Comment 7 Nate Graham 2019-12-02 22:36:51 UTC
It's a good point that the two apps are inconsistent: Dolphin has no keyboard method to focus/de-focus an open terminal panel, while Kate has no keyboard method to close an open terminal panel. We should fix that.

Can you open a Phabricator Task about this and tag Dolphin and Kate? It would make more sense to discuss it there than in a bunch of disjointed bug reports.
Comment 8 postix 2019-12-02 22:41:35 UTC
> Can you open a Phabricator Task about this and tag Dolphin and Kate?

I can surely do that. Maybe tomorrow I will look into it.
Comment 9 Matthias 2019-12-03 00:55:10 UTC
I doubt that long-time Dolphin users would get excited when you change their beloved Dolphin shortcuts. 

Why not simply go the easy way and add that obvious shortcut to Kate?

Where is the downside?
Comment 10 postix 2019-12-03 12:17:55 UTC
(In reply to Postix from comment #8)
> > Can you open a Phabricator Task about this and tag Dolphin and Kate?
> 
> I can surely do that. Maybe tomorrow I will look into it.

Nate, an apology for changing my mind, but can you please do it for me? Due to lack of time*, I don't think I can adequately supervise this task. 


*reporting bugs already takes a lot of my little spare time. :)
Comment 11 Nate Graham 2019-12-07 22:39:01 UTC
Will be fixed with https://phabricator.kde.org/D25805
Comment 12 Nate Graham 2019-12-08 16:50:23 UTC
Git commit 4fec9bf8a8283bfd00d15707aa1615f438f9ab05 by Nate Graham.
Committed on 08/12/2019 at 16:50.
Pushed by ngraham into branch 'master'.

Open/close and focus/defocus terminal using the same shortcuts as Dolphin

Summary:
Users have complained that Kate's terminal doesn't use the same shortcut as Dolphin to
open and close. This patch makes it do so, using the same shortcuts that dolphin uses
to both open/close and also focus/de-focus:

F4: Open/close
Ctrl+Shift+F4: Focus/de-focus (also open if currently closed)
FIXED-IN: 20.04.0
Closes T12318

Test Plan:
Hit F4 twice -> terminal opens and closes
Hit Ctrl+Shift+F4 twice -> terminal focuses and de-focuses

Reviewers: #kate, cullmann

Reviewed By: #kate, cullmann

Subscribers: cullmann, kwrite-devel

Tags: #kate

Maniphest Tasks: T12318

Differential Revision: https://phabricator.kde.org/D25805

M  +20   -2    addons/konsole/kateconsole.cpp
M  +5    -0    addons/konsole/kateconsole.h
M  +3    -2    addons/konsole/ui.rc

https://invent.kde.org/kde/kate/commit/4fec9bf8a8283bfd00d15707aa1615f438f9ab05
Comment 13 Nate Graham 2019-12-08 16:50:26 UTC
Git commit 4fec9bf8a8283bfd00d15707aa1615f438f9ab05 by Nate Graham.
Committed on 08/12/2019 at 16:50.
Pushed by scmsync into branch 'master'.

Open/close and focus/defocus terminal using the same shortcuts as Dolphin

Summary:
Users have complained that Kate's terminal doesn't use the same shortcut as Dolphin to
open and close. This patch makes it do so, using the same shortcuts that dolphin uses
to both open/close and also focus/de-focus:

F4: Open/close
Ctrl+Shift+F4: Focus/de-focus (also open if currently closed)
FIXED-IN: 20.04.0
Closes T12318

Test Plan:
Hit F4 twice -> terminal opens and closes
Hit Ctrl+Shift+F4 twice -> terminal focuses and de-focuses

Reviewers: #kate, cullmann

Reviewed By: #kate, cullmann

Subscribers: cullmann, kwrite-devel

Tags: #kate

Maniphest Tasks: T12318

Differential Revision: https://phabricator.kde.org/D25805

M  +20   -2    addons/konsole/kateconsole.cpp
M  +5    -0    addons/konsole/kateconsole.h
M  +3    -2    addons/konsole/ui.rc

https://commits.kde.org/kate/4fec9bf8a8283bfd00d15707aa1615f438f9ab05