Bug 426276 - Split view: change view shortcuts
Summary: Split view: change view shortcuts
Status: CONFIRMED
Alias: None
Product: konsole
Classification: Applications
Component: split-view (show other bugs)
Version: master
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
: 378458 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-09-07 12:28 UTC by sacha
Modified: 2024-03-17 11:23 UTC (History)
5 users (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 sacha 2020-09-07 12:28:52 UTC
SUMMARY

The new split view feature is really cool and young: there is no shortcuts to change panes view like that we have in tmux.

Usualy I use Konsole split view with the new option "no title bar" in panes ( Bug 409581) but I cannot drag the pane to another position, and I don't know any shortcut to do this.

This could be a logical next feature for this nice split view feature.

Kind regards,
Sacha.
Comment 1 Andrew Shark 2023-10-24 14:51:18 UTC
*** Bug 378458 has been marked as a duplicate of this bug. ***
Comment 2 Bernd Steinhauser 2024-03-10 13:10:43 UTC
I second this. As a workaround, I tend to use the shortcut Ctrl+Tab to toggle between two view panes, but obviously that only works if these two were the last two used, because it actually toggles between the last two used tabs.

I really miss a dedicated shortcut to do that. :(
Comment 3 Alfonso Murolo 2024-03-16 17:30:36 UTC
Hello sacha and Bernd,

if I have not misunderstood your request, after having a look at the source code of the Konsole ViewManager, I believe this feature exists already.
You can try by creating an arbitrarily complex split view and move with the default hotkeys:
CTRL + SHIFT + Arrow [Up, Down, Left, Right]

I am currently unsure if there is a possibility to remap this key combination.
Please let me know if that differs from what you expected.

Cheers
Alfonso
Comment 4 Bernd Steinhauser 2024-03-16 17:40:01 UTC
That's remappable, it's called "Focus Above/Below/Left/Right Terminal".

What at least I meant was something like "Cycle Through Terminals in Current View".
That's of course less specific than the one with arrows, where you can specify the direction, but I rarely split a view into more than two terminals, so it'd be a better fit for me.
Comment 5 Alfonso Murolo 2024-03-16 17:48:05 UTC
(In reply to Bernd Steinhauser from comment #4)
> That's remappable, it's called "Focus Above/Below/Left/Right Terminal".
> 
> What at least I meant was something like "Cycle Through Terminals in Current
> View".
> That's of course less specific than the one with arrows, where you can
> specify the direction, but I rarely split a view into more than two
> terminals, so it'd be a better fit for me.

Interesting, is that also supported in tmux? (I do not have a lot of experience with it).
What I am currently unsure about your formulation, is that your concept implies a linearization and a consequent sorting of the splitted views, in order to cycle through them in a predictable manner. If this feature is already implemented somewhere in a manner which is generally accepted, that would be good to know to take it as reference.
Comment 6 Bernd Steinhauser 2024-03-17 11:23:01 UTC
(In reply to Alfonso Murolo from comment #5)
> Interesting, is that also supported in tmux? (I do not have a lot of
> experience with it).
Neither do I, but here's an excerpt of the manual:
https://www.man7.org/linux/man-pages/man1/tmux.1.html#DEFAULT_KEY_BINDINGS
;           Move to the previously active pane.
n           Change to the next window
o           Select the next pane in the current window.
p           Change to the previous window.
Up, Down, Left, Right           Change to the pane above, below, to the left, or to the right of the current pane.

In terms of tmux, a window is what we call a tab or view for Konsole. A pane is a terminal in that view/tab.
So yes, it does have that capability. Interestingly, it has bindings for cycling through terminals forward, but not backward. For going back, there is only the option to select the last pane, which goes back and forth between the last two used panes.

> What I am currently unsure about your formulation, is that your concept
> implies a linearization and a consequent sorting of the splitted views, in
> order to cycle through them in a predictable manner. If this feature is
> already implemented somewhere in a manner which is generally accepted, that
> would be good to know to take it as reference.

tmux does this by assigning an index to the panes, which is also how I'd propose to do it. It's the simplest (and most common) way of dealing with this issue. Like you also have an index for the tab ordering when cycling through UI elements using the tab key.
In case you want to know, in tmux, you can briefly display the pane index by using Ctrl+b and q.

Also keep in mind that using cursor keys can be ambiguous as well. Say you have one terminal left and two terminals split top/bottom on the right.
Now if you're in the left and you use the shortcut to go right, which should Konsole choose?