Reply to topic

Kate: spacebar does not work with Document Preview

User avatar Kresimir
Registered Member
Posts
12
Karma
0
When using Document Preview in Kate, pressing spacebar does not type a space, and shortcut Ctrl+S to save file does not work. The error message with the latter is:
Ambiguous shortcut detected

The key sequence 'Ctrl+s' is ambiguous. Use 'Configure Shortcuts' from the 'Settings' menu to solve the ambiguity.
No action will be triggered.

I can't see anything in the 'Configure Shortcuts' dialog that I could change to "solve the ambiguity", the only action that Ctrl+S is assigned to is 'Save'. Resetting the shortcuts to default does not solve the issue, either.

When I close the Document Preview spacebar and the shortcut Ctrl+S work again, so I assume that it is somehow conflicting with Okular's shortcuts, but I have no idea how to fix it. There is no such problem when I use Kile, which also uses Okular to preview documents.

I am using KDE Applications 19.08.2 on Manjaro Linux.

Please help.

EDIT: Ctrl+C is also affected, possibly some other shortcuts, too.
User avatar Kresimir
Registered Member
Posts
12
Karma
0
It appears it is a bug with Kate and Okular:
https://bugs.kde.org/show_bug.cgi?id=405488

I hope it gets fixed soon, it's potentially a great feature, but atm completely broken.
User avatar Kresimir
Registered Member
Posts
12
Karma
0
Still broken in KDE Applications 20.04 :(
Clancularius
Registered Member
Posts
40
Karma
0
I fixed this by going into Okular and opening up the Configure Keyboard Shortcut window in the Settings menu. "Scroll page down" is set to space bar. I changed this shortcut, restarted Kate and the problem was fixed.
User avatar Kresimir
Registered Member
Posts
12
Karma
0
Thanks for the reply!

Disabling all of the keyboard shortcuts in Okular is a workaround, though a not very practical one, because it is not sufficient to disable spacebar for scrolling, other conflicting shortcuts are Ctrl+A, Ctrl+B, Ctrl+C, Ctrl+F, Ctrl+G, Ctrl+S, Ctrl+Shift+S,... Ctrl+Shift+, , F3, F5, F6, F7... and probably many others.

If it were only spacebar, that would be manageable, but applying this workaround consistently cripples the functionality of Okular on its own, or makes it tedious to switch the settings all the time. I guess I could make different shortcuts schemes and apply them manually whenever I use Kate... This should not be necessary, because Kile uses Okular for document preview and there are no conflicting shortcuts there, so the bug is probably somewhere in the way Kate embeds Okular.

Interestingly, there are no conflicts with keys like Page Up/Down, which are used for scrolling in both applications, Ctrl+P for printing, and a few others.
Clancularius
Registered Member
Posts
40
Karma
0
If you look at the plugin, there is a burger menu and I am guessing all the conflicting controls can be found on there and the problem is input is being sent both to kate and that menu. I don't think there is anyone currently maintaining the kate plugin as per this post https://kate-editor.org/post/2019/2019- ... er-wanted/ so workarounds are all that can be done at the minute.
Clancularius
Registered Member
Posts
40
Karma
0
Another workaround of sorts is not to use the plugin but to have the document also open in the main Okular program. When you save the file it automatically refreshes in okular if you have "reload document on file change" selected in the Configure menu. That way you don't get the conflicts with the keyboard shortcuts.
User avatar Kresimir
Registered Member
Posts
12
Karma
0
Clancularius wrote:Another workaround of sorts is not to use the plugin

Yes, that's an obvious workaround. Use different software. How did I not think of that? :P

You're missing the point. This is an obvious bug in an otherwise excellent program. The point of this topic is to document it in hopes of it getting attention from someone who can fix it. There are a million obvious workarounds to this broken functionality. You can use Vim and Zathura in a tiling window manager like i3 or dwm, for example - it will work flawlessly. But that's not the point here.

 
Reply to topic

Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], dbergstein, Don B. Cilly, dualkem, farid, Google [Bot], Ico_dY, ipwizard, koffeinfriedhof, ostroffjh, shurato, Sogou [Bot]