Bug 400486 - Display keyboard shortcut for switching Input modes
Summary: Display keyboard shortcut for switching Input modes
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: application (show other bugs)
Version: unspecified
Platform: Other All
: NOR wishlist
Target Milestone: ---
Assignee: Gaurav Pant
URL:
Keywords: junior-jobs, usability
Depends on:
Blocks:
 
Reported: 2018-10-30 15:54 UTC by Tore Havn
Modified: 2019-09-12 14:32 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.63


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tore Havn 2018-10-30 15:54:17 UTC
I just learned that Ctrl+Shift+V switches between Normal and Vi input modes.

It would be very useful to display this keyboard shortcut in Kate's menu, just like Ctrl+Shift+B is diplayed for the «Block Selection Mode».
Comment 1 Nate Graham 2018-11-01 19:54:55 UTC
Yeah, makes sense.
Comment 2 Vidhyanshu Jain 2018-12-12 08:33:28 UTC
I am just getting Started. I think this could be a good place to start with.
Comment 3 Vidhyanshu Jain 2018-12-15 08:08:32 UTC
I was trying to understand the code. I also understand that all the options of the toolbar are added in the kateui.rc file. But I don't know in which part of the code I will add the keyboard shortcut
Comment 4 Lothar 2018-12-29 12:53:49 UTC
> But I don't know in which part of the code I will add the keyboard shortcut
Perhaps it may help when you study these ones
https://phabricator.kde.org/D17661
https://phabricator.kde.org/D17609
Comment 5 Unknown 2019-09-01 06:19:58 UTC
I am completely new to KDE and found this Junior Job. I'd like to know: Is somebody still working on this? Because if not I'd really like to do it.

I have looked into the issue and don't really know how to solve it. Looking at the way the other options are implemented, they either have a selector (like the **Input Mode** Option discussed here) *OR* a checkbox with the Keyboard-Shortcut shown to the right of the options text. None of the "selectable" options have a keyboard shortcut shown in their respective entry.

Should I go ahead and make the *Input Mode* Option a toggle option like e.g. *Block Selection Mode*?
I'm asking because the source code reads as if the current behavior on *Input Mode* was intentional to the extent that further input modes be added (some day in the future), which would be incompatible with the "toggle" option.

Any advice, anyone?
Comment 6 Dominik Haumann 2019-09-12 14:24:38 UTC
Git commit 03d1100d8b3497f19d2e609cd948ec836630eb35 by Dominik Haumann.
Committed on 12/09/2019 at 14:24.
Pushed by dhaumann into branch 'master'.

Add keyboard shortcut for switching Input modes to edit menu

M  +4    -2    src/view/kateview.cpp

https://commits.kde.org/ktexteditor/03d1100d8b3497f19d2e609cd948ec836630eb35
Comment 7 Tore Havn 2019-09-12 14:28:39 UTC
Andreas Hartmann:

Sorry, the bug itself was somewhat complicated for a junior job. Simply changing the menus weren't straightforward, but we just managed to fix it now. Hope you find some other worthwhile bugs to fix. :)
Comment 8 Dominik Haumann 2019-09-12 14:32:32 UTC
The bug is fixed by adding the "Switch to next Input Mode" to the submenu as can be seen in this screenshot: https://i.imgur.com/WcX7pvG.png