Bug 195749 - Ctrl+Tab don't switch over edited files
Summary: Ctrl+Tab don't switch over edited files
Status: RESOLVED FIXED
Alias: None
Product: krusader
Classification: Unclassified
Component: krviewer (show other bugs)
Version: 2.3.0-beta1 "New Horizons"
Platform: Ubuntu Packages Linux
: NOR minor with 60 votes (vote)
Target Milestone: ---
Assignee: Nikita Melnichenko
URL:
Keywords:
: 375797 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-06-09 10:25 UTC by Tom
Modified: 2018-02-24 06:13 UTC (History)
9 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 Tom 2009-06-09 10:25:04 UTC
Version:           2.0.0 (using KDE 4.2.4)
OS:                Linux
Installed from:    Ubuntu Packages

When I'm editing 2 and more files, Ctrl+Tab (Shift+Ctrl+Tab) don't switch over edited files but indent actual row.
Comment 1 Wladimir Palant 2017-02-01 11:23:01 UTC
*** Bug 375797 has been marked as a duplicate of this bug. ***
Comment 2 Wladimir Palant 2017-02-01 11:25:00 UTC
This issue is still reproducible with my build from Git master (Krusader 2.5.1-beta, revision 5056272).
Comment 3 Martin Kostolný 2017-02-04 15:22:43 UTC
Temporary workaround is to set KrViewer Shortcuts explicitly for changing tabs to Ctrl+Tab and Ctrl+Shift+Tab.

But on Arch linux this is working fine without a need for these changes. My guess (not tested) would be that this is fixed in newer versions of KF5. I have KF 5.30 on Arch linux now.

Wladimir, can you please re-test this issue on your newer Ubuntu 16.10?
Comment 4 Wladimir Palant 2017-02-04 19:42:29 UTC
I did and the issue is still reproducible on Ubuntu 16.10 (KF 5.26).
Comment 5 Toni Asensi Esteve 2017-02-05 15:08:57 UTC
The issue is also reproducible on Kubuntu 16.10 (KF 5.26).
Comment 6 Miroslav Milanović 2017-08-25 09:46:19 UTC
Hello,

As far as I know Krusader uses the standard settings for changing tabs. Please check your system settings (https://userbase.kde.org/System_Settings/Shortcuts_and_Gestures#Standard_Keyboard_Shortcuts) what shortcut is defined there and change it when needed.

Therefor, I think this is not a bug.

Best regards
Comment 7 Wladimir Palant 2017-08-25 10:07:52 UTC
For me, the problem isn't the keyboard shortcut settings. The keyboard shortcut works just fine as long as you are merely viewing files. If you are editing them however, Kate will handle Ctrl-Tab itself and insert a tab into the text.
Comment 8 Miroslav Milanović 2017-08-27 09:42:53 UTC
(In reply to Wladimir Palant from comment #7)
> For me, the problem isn't the keyboard shortcut settings. The keyboard
> shortcut works just fine as long as you are merely viewing files. If you are
> editing them however, Kate will handle Ctrl-Tab itself and insert a tab into
> the text.

Hi,

maybe I did not got your point, sorry.

I can confirm that Ctrl-Tab changes the tab while viewing a file but - at least using Tumbleweed - the default shortcut (see comment above) for changing tabs is CTRL-, and CTRL-.
These shortcuts are working fine for me when editing a file.

Have you changed the default shortcuts to CTRL-TAB?

BR
Comment 9 Wladimir Palant 2017-08-27 13:09:40 UTC
It seems that you are right, changing the Lister's keyboard shortcut settings makes Ctrl+Tab work both when viewing and editing. Then I wonder why it isn't the default, that's quite unexpected.
Comment 10 Wladimir Palant 2017-08-27 13:11:47 UTC
For reference, I'm on Ubuntu so I wouldn't know how to access KDE's global keyboard shortcut settings. The Lister's local shortcut configuration works however.
Comment 11 Nikita Melnichenko 2018-02-18 07:57:49 UTC
I also confirm. KrViewer works fine if all tabs are Lister or other read-only mode tabs. If there are Editor tabs, you can switch between tabs normally until it switches to an Editor tab where Ctrl+Tab and Ctrl+Shift+Tab seem to be captured by Katepart.

I looked at shortcuts in KrViewer, it shows Ctrl+Pagedown as primary shortcut for Next Tab and Ctrl+] as Alternate (Global and Global Alternate are empty) - this must be default settings as I didn't change them previously. Ctrl+Pagedown claims itself as ambiguous (don't really understand why). Ctrl+] works fine for all tabs. Does it mean we don't officially support Ctrl+Tab in Krusader?
Comment 12 Martin Kostolný 2018-02-20 21:03:24 UTC
> Does it mean we don't officially support Ctrl+Tab in Krusader?

I believe so. I checked again on my Arch linux and it seems the behaviour is the same as for everyone here. When using default settings, Ctrl+tab inserts a tab in editor. (So my previous comment was wrong, my apologies.)

This issue is either a modification request - if we agree on that, we can change the default keyboard bindings of KrViewer. Or it a resolved-invalid since changing tabs in KrViewer works correctly according configured shortcuts.

My personal opinion is we should change the default settings to Ctrl+Tab and Ctrl+Shift+Tab.
Comment 13 Nikita Melnichenko 2018-02-21 07:38:06 UTC
+1 for making Ctrl+Tab and Ctrl+Shift+Tab as primary shortcuts in KrViewer.
Comment 14 Toni Asensi Esteve 2018-02-21 12:28:20 UTC
> > My personal opinion is we should change the default settings to Ctrl+Tab and Ctrl+Shift+Tab.
> > [...]
> +1 for making Ctrl+Tab and Ctrl+Shift+Tab as primary shortcuts in KrViewer.

I also consider that this is the best idea. Thanks!
Comment 15 Nikita Melnichenko 2018-02-24 06:13:27 UTC
Git commit 26c4b148a18bbd6ccce69dd5dbbaf86a471f9cc5 by Nikita Melnichenko.
Committed on 24/02/2018 at 05:50.
Pushed by melnichenko into branch 'master'.

KrViewer: reenforce QTabWidget shortcuts for tab switching

FIXED: [ 195749 ] Ctrl+Tab don't switch over edited files

Ctrl+Tab and Ctrl+Shift+Tab are actually default QTabWidget shortcuts
that are implemented via keyPressEvent method. When editor is placed on
a tab, it intercepts the key presses for itself. This is why KrViewer
understands the shortcuts fine if all tabs are Lister or other read-only
tabs. If there are Editor tabs, you can switch between tabs normally until
you hit an Editor tab and then it acts as Tab and Shift+Tab correspondingly.

This change enforces the shortcuts through
KActionCollection::setDefaultShortcuts which take precedence over
the editor shortcuts.

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

M  +9    -3    krusader/KViewer/krviewer.cpp

https://commits.kde.org/krusader/26c4b148a18bbd6ccce69dd5dbbaf86a471f9cc5