rubberduck-vba / Rubberduck

Every programmer needs a rubberduck. COM add-in for the VBA & VB6 IDE (VBE).
https://rubberduckvba.com
GNU General Public License v3.0
1.91k stars 300 forks source link

HotKey mappings #866

Closed retailcoder closed 7 years ago

retailcoder commented 8 years ago

When the SmartIndenter branch gets merged into [next], Rubberduck will be supporting hotkeys.

Let's determine what hotkeys will map to which features by default (not all of these are currently implemented, and not all of these might need a hotkey):

I would love to use Ctrl+R for all refactor commands so that Ctrl+R,R triggers refactor/rename like in Visual Studio.

But Ctrl+R brings up the Project Explorer, so using that for a 2-step hotkey woud disable that native functionality; of course we could just re-map the Project Explorer hotkey to whatever Visual Studio has that brings up the Solution Explorer, but there are harder ones to keep in mind, like Ctrl+I which displays "info" tooltip, so using Ctrl+I,M to indent the current module would hide that native hotkey... but then again we could probably just re-map it as well.

Thoughts?

rubberduck203 commented 8 years ago

It's a little cumbersome, but it appears that Ctrl + Shift + [Key] combinations aren't used. (At least, they're not used often.) So, if we can use those, I recommend we go with whatever R# uses, only Ctrl + Shift instead of Ctrl.

retailcoder commented 8 years ago

@ckuhn203 that would be the best compromise. Smart Indenter uses Ctrl+P and Ctrl+M to indent current procedure and current module, respectively. I'd change that to Ctrl+Shift+I,P and Ctrl+Shift+I,M, respectively. What do you think?

retailcoder commented 8 years ago

@ckuhn203 updated with R#-like hotkeys, not sure I like it though.

Vogel612 commented 8 years ago

Coming from Java-IDEs these commands are rather intuitive. I'm more used to Alt + Shift keystrokes, but that seems to be a Java thing.

re: code inspections: I'd say that running inspections whenever the parser is idle makes for a cleaner UX, but you should be able to "manually" run them anyways. This would obviously have to wait for the parser to get the necessary results ready, but you'd get a Progress indicator with that then ... :+1: ?

rubberduck203 commented 8 years ago

I for indent sounds right to me. Should we also Ctrl + Shift + T for find symbol? Just for consistency?

retailcoder commented 8 years ago

@ckuhn203 well R# has Ctrl+T for go to anything.. and I'm trying real hard, I can't seem to find a consistency there. Some are Ctrl+key, some are Ctrl+Shift+key, some are Alt+Shift+key, and then we even got some Ctrl+Shift+Alt+key in there... I completely agree with increasing the level of consistency.

How about a "scheme"?

That'll take some thinking to get right, but then it will be much easier for users to remember the hotkeys.

ThunderFrame commented 8 years ago

There should be a default mapping, but we should absolutely make the mappings user-configurable.

ThunderFrame commented 8 years ago

@retailcoder Re Chords. I can't remember which 3rd party UI had it, but I remember using a UI that let me define my own keyboard shortcuts by actually using the shortcut to define the shortcut. There were no arcane ^P entries, but instead the user placed the cursor in a textbox next to the Name of the action that required a shortcut, and pressed the desired key combination, and the TextBox detected the key-presses, and displayed the combination in friendly terms, eg. `Ctrl-Shift-P'.

Such a UI would make it intuitive for users to enter shortcuts, would make custom shortcuts possible so that Rubberduck doesn't authoritatively define shortcuts that might conflict with a user's other add-ins/preferences, and it should be able to handle chords too.

retailcoder commented 8 years ago

Ok, I've made a decision: 2-step "chords" hotkeys will be for a later release - 2.0 will have hotkeys, but only "normal" ones. This will allow me to move on to more pressing issues.