[kdevplatform] Add keyboard shortcut for "Switch Header/Source"
ClosedPublic

Authored by antonanikin on Sep 13 2016, 3:27 PM.

Details

Reviewers
kfunk
Group Reviewers
KDevelop
Summary

Related bug: https://bugs.kde.org/show_bug.cgi?id=359136

Main question for all reviewers - default shortcut. Now it set to F2 - is it acceptable?

Test Plan

Works without problem on 'master' branch.

Diff Detail

Repository
R33 KDevPlatform
Lint
Lint Skipped
Unit
Unit Tests Skipped
antonanikin updated this revision to Diff 6699.Sep 13 2016, 3:27 PM
antonanikin retitled this revision from to [kdevplatform] Add keyboard shortcut for "Switch Header/Source".
antonanikin updated this object.
antonanikin edited the test plan for this revision. (Show Details)
antonanikin added a reviewer: KDevelop.
antonanikin set the repository for this revision to R33 KDevPlatform.
Restricted Application added a subscriber: kdevelop-devel. ยท View Herald TranscriptSep 13 2016, 3:27 PM
brauch added a subscriber: brauch.Sep 13 2016, 3:28 PM

QtCreator uses F4 but hm, we have that for "next error" already ... F2 sounds ok to me.

apol added a subscriber: apol.Sep 13 2016, 3:32 PM

We use F2 for rename usually.

Code looks fine to me otherwise.

Yes we use F2 for rename, but only if focus is on the projects toolview or so ... in the document, F2 is unused, so I still don't think it's a bad choice.

apol added a comment.Sep 13 2016, 5:55 PM
In D2762#51487, @brauch wrote:

Code looks fine to me otherwise.

Yes we use F2 for rename, but only if focus is on the projects toolview or so ... in the document, F2 is unused, so I still don't think it's a bad choice.

F2 would be spot on for symbol rename then.

F2 would be spot on for symbol rename then.

Ok, I understand your opinion about 'meaning conflict' for F2 button. Your suggestions about new shortcut?

kfunk added a subscriber: kfunk.Sep 14 2016, 8:13 AM
In D2762#51534, @apol wrote:
In D2762#51487, @brauch wrote:

Code looks fine to me otherwise.

Yes we use F2 for rename, but only if focus is on the projects toolview or so ... in the document, F2 is unused, so I still don't think it's a bad choice.

F2 would be spot on for symbol rename then.

Note: +1 for not "overloading" F2. Don't know about a better default shortcut either, though.

Note: +1 for not "overloading" F2. Don't know about a better default shortcut either, though.

Ok. What about Meta+S for default?

Dunno, for me personally Meta is the "window manager control" key and I don't see it used in shortcuts much. I'd suggest Alt+^ which is quite similar to Ctrl+Tab from the positions of the keys, but I guess ^ is not on the same place on other keyboards ... :/

What are you think about Ctrl+/?

With this we will have by default:

Ctrl+, - Jump to Definition (quickopen plugin)
Ctrl+. - Jump to Declaration (quickopen plugin)
Ctrl+/ - Switch Header/Source (switchtobuddy plugin)

All keys are grouped "by keyboard" and "by actions". Looks to be a good choice.

Well on my keyboard that would be Ctrl+Shift+7 ... but yeah, go for it, I will change it anyways.

Well on my keyboard that would be Ctrl+Shift+7 ... but yeah, go for it, I will change it anyways.

Oops, didn't know that German keyboard layout is strongly different from "classic" English/Russian/etc :)

Also we can use Ctrl+Y - last free Ctrl+Letter shortcut. If not, I suggest to push the code with Ctrl+/ and anyone can change it later to a suitable combination.

apol added a comment.Sep 15 2016, 9:38 AM
In D2762#51861, @brauch wrote:

Well on my keyboard that would be Ctrl+Shift+7 ... but yeah, go for it, I will change it anyways.

+1

Well on my keyboard that would be Ctrl+Shift+7 ... but yeah, go for it, I will change it anyways.

+1

Ok.

But I have last small question - to which branch I should push the patch? Since is not public API it can by safely pushed to 5.0?

From the technical POV yes, but it's a feature, not a fix ... so maybe we should start doing feature development in master again now?

Sorry, I push the patch with wrong review ID in comment :(
Accept it, please, I can't close the revision.

kfunk accepted this revision.Sep 16 2016, 3:44 PM
kfunk added a reviewer: kfunk.
This revision is now accepted and ready to land.Sep 16 2016, 3:44 PM
kfunk closed this revision.Sep 16 2016, 3:44 PM