Welcome to MSDN Blogs Sign in | Join | Help

JoeN's Blog

XNA Shaman
So why did the C# keybindings change? (Part 2)

So who would have thought that keybindings would have been a contentious issue? J Thanks for all the great comments and ideas, I’ll work with our core editing team to see what we can incorporate for VS 2005.

Reading through all the comments and the original blog entry I see that I buried a crucial piece of information:

But while we think the new keybindings are a lot more logical and easier to learn we totally understand that people don’t like gratuitous changes and want to be able to use that muscle memory they have developed. So what we are going to do is make as many of the old keybindings available as well (the new ones will be shown by default but the olds ones will also work).

While we haven’t done the calculations yet I fully expect that 90 to 95% of the keybindings that you use in VS 2002 and 2003 will work as expected in VS 2005 when you choose the C# Profile.

Using the commands from the last blog entry you could access them via two sets of keybindings (VS allows multiple key combinations to be bound to a single command):

  • Solution Explorer  Ctrl+Alt+L      Ctrl+W, S       
  • Class View         Ctrl+Shift+C    Ctrl+W, C
  • Server Explorer    Ctrl+Alt+S      Ctrl+W, L
  • Resource View      Ctrl+Shift+E    Ctrl+W, E
  • Properties Window  F4              Ctrl+W, P
  • Object Browser     Ctrl-Alt-J      Ctrl+W, J
  • Toolbox            Ctrl-Alt+X      Ctrl+W, X
  • Breakpoints        Ctrl+Alt+B      Ctrl+D, B
  • Autos              Ctrl+Alt+V, A   Ctrl+D, A
  • Call Stack         Ctrl+Alt+C      Ctrl+D, C
  • Threads            Ctrl+Alt+H      Ctrl+D, T

Using multiple keybindings allows:

  1. Existing developers retain their existing keybindings and muscle memory
  2. New and existing developers can learn commands more easily and have an overall more consistent keyboard experience.

I’m not sure whether this changes people’s opinions and I apologize for not making clear that the majority of your existing keybindings will continue to work.

I get the impression that we should just scrap this entire idea and simply keep the old keybindings. For new commands in VS 2005 (e.g. refactoring) we should just attempt our best to find logical keybindings in the available spaces (Although I would hate to lose Ctrl+R, R for Refactor.Rename because that keybinding is already taken by Edit.ToggleWordWrap!).

The consequence of this is that new C# developers will have to learn an apparently random set of key bindings but hey perhaps that’s just “paying their dues”.

Some small notes on the numerous comments from the previous blog entry:

  • There will be numerous “old” keybindings available in VS 2005: VC2, VC6, VS2002, VS 2003 etc
  • VS 2005 will allow you to save all your IDE settings into one file which you can then import into an version of VS. Unfortunately there are no current plans to import VS 2002 and VS 2003 settings.
  • I didn’t just dream these changes up J. I worked with our usability team to work on this problem and through most of our usability studies have had the new keybindings in place.
  • Don can continue to program for the next 24 years without worrying.
Posted: Saturday, June 19, 2004 10:33 PM by JoeN
Filed under:

Comments

Joe said:

As well as providing a way to configure VS 2005 to match the VS.NET 2003 key bindings, you should provide a VS.NET 2003 macro to enable VS.NET 2003 to mimic the new bindings.
Many of us will continue to use both for a long time.
# June 19, 2004 11:42 PM

Tony Schreiner said:

One thing I commented on in your last post but didn't emphasize was the reachability of the keys. Mnemonics are a good start (well, at least for one language), but if they lead to finger contortions for frequently used commands then they're useless.

Consider cut, copy, and paste: ctrl x, c, and v. Now, paste *could* have been made "ctrl p", but that would not only require cutting and pasting to be done with different hands, but also prevent (right-handed) users from being able to highlight text with the mouse, copy, move the mouse, and paste, all while keeping the left hand on the keyboard and right hand on the mouse.

I would also suggest that keybindings for things like raw text-manipulation and interactive debugging should be given preference over the ones to do IDE-specific actions like show and hide certain windows. These are more likely be be committed to muscle memory and also less likely to change as the IDE evolves.
# June 20, 2004 10:45 AM

Goran said:

I really can't see the problem here - you're saying that you'll keep the old profiles around and add a new one that (hopefully) makes more sense? Well, go ahead then, I'm +1 for the idea. If it's that hard, let people pick a scheme the first time VS starts up.

I'm looking forward to the new keybindings, the current scheme is just crazy.

Slightly off-topic; Apperently I missed a memo somewhere.. when was "display the solution explorer" appointed the default keybinding example? Is it an internal MS thing, do all the developers there have 14'' screens which doesn't allow them to keep the most important window besides the editor open?

Oh, and if DBox gives you a hard time, remember he used to be (is?) an Emacs user. Chord style shortcuts should suit him perfectly.
# June 20, 2004 1:19 PM

Don Box said:

Goran,

I'm trying desparately to NOT be an emacs user.

I'm also not advocating that VS adopt any emacs-isms except reliability and stability.

DB
# June 20, 2004 3:26 PM

Merak said:

Goran
The keybindings not only display the applicable window, but they also set focus to it.
I use 2 21" monitors, and so always have the Solution Explorer pane visible...but I still use the keybindings to set focus to it when I want to navigate to another project file, etc

Regarding the whole key binding "issue", I can't see why we don't simply have an additional "VS2005 scheme" option that is available alongside a "VS2002 scheme".
Then everyone will be happy.
And if the VS2005 scheme just happens to have both new and old bindings assigned to the most common tasks, the new scheme is probably going to be used more often.
# June 20, 2004 3:39 PM

Orion Adrian said:

One of the things that irritates me now is that most of the keyboard shortcuts are taken. For instance, I do a lot of pasting from word into XML and I end up using PasteAsHTML a _lot_. However when I wanted to assign this command a keyboard shortcut, basically none of the simple keyboard shortcuts were available. Please for the love of all that is holy, please leave a few simple CTRL+ keyboard commands available to me.

As to the issue at hand. Please do keep the new keyboard settings. It'll help drastically with people trying to remember/discover keyboard shortcuts for commands.

A side note: muscle memory doesn't take that long to retrain (IIRC, about 3 weeks).

Orion Adrian
# June 20, 2004 9:18 PM

Cyrus Najmabadi said:

Orion: I ran into this same issue myself when lo and behold I found that ctrl-; and ctrl-l were free. That was about the only thing available (with the bonus that they were right next to each other).
# June 20, 2004 11:21 PM

Craig said:

Ah! You did do this based on research, then. Fantastic - nice job! So often one sees features like this designed randomly.

FWIW, I think going to well thought-out bindings but still supporting the old ones (to a large degree) is the right route. That said, I would echo the point about reacability - for example, ctrl-t is a heck of a lot easier to type than ctrl-pageup.

But then again, I'm an emacs user, too, so perhaps that puts me out on the lunatic fringe. ;)
# June 21, 2004 5:09 AM

Steve said:

Just ensure there is a good way of changing them. There is a good chance that users will have unique preferences as to how keybindings work. Personally, what i cant bind to the F2-F12 keys i dont use a binding for.
# June 21, 2004 6:10 AM

Keith Hill said:

Well if in doubt, there is always usability testing, eh? Anyways, I really like the new keybindings. They are much easier to remember. Besides if folks want to stay with the confusing mess that is the VS.NET 2003 bindings just let them pick that profile. Besides the VS.NET 2003 keybindings don't match the menu accelerators either and when has Ctrl+X/C/V ever matched a menu accelerator. For those of us who are aren't so old that we can't adapt to a better binding scheme, we'll go for the VS 2005 bindings. Was that too much of a dig on the 40 something crowd? :-)
# June 21, 2004 8:41 AM

Jeremy Marsch said:

The only thing that I might request would be a reserved area for user-defined keystrokes. For example, I have a few editor macros that I like to run from keyboard shortcuts. I noticed that ctrl+\ does not seem to be part of any other chords, so all of my defined commands start "ctrl"+"\" to begin the chord -- that way I don't have to worry about finding a combination that isn't taken (unless it was already taken by me).
# June 21, 2004 8:48 AM

Ken Brubaker said:

The Visual Studio team will be changing the C# text editor key bindings once again.
# June 21, 2004 4:59 PM

David said:

I expect that you are already doing this but just to bring it out in the open ...

I noticed that this is described as a C# team level change. Please tell me that every reasonable effort will be made to make these bindings consistent across all the teams.

I applaud you for looking ahead and I support the change. Let's hope we don't have to do this again for a while. The easier it is to see all the key mappings (not just the ones on the menus), the easier it will be to adapt.
# June 21, 2004 4:27 PM

Chris said:

Change is good, let the usability people make our lives better.

I look forward to the new keystrokes!
# June 21, 2004 7:59 PM

TrackBack said:


Knowing .NET
# June 22, 2004 7:22 PM

Jean-Michel Potvin said:

I would like to make a suggestion for the keybinding...

I don't care what is the default keybinding as long as I can change it... The only problem is that I don't want to change it everytime I'm working on a different computer.

What I would like is the possibility to create my Visual Studio profile once (with my preferred keybinding and other settings)and use it on any PC.

And the easiest way for you guys to add it to Visual Studio would be Microsoft Passport. I'm not a big fan of Passport but I think in this case it would be perfect (or almost).

I could go on any PC, start Visual Studio and load my profile from passport or keep the default settings.

Also I would like the possibility to load my profile from passport and save it as the default profile in Visual Studio. So when I start using VS on a new computer, I would just need to logon once, save the profile locally and I would not have to log in Passport every time I want to use Visual Studio.

This would be really usefull on shared computer too...

I hope that will help.

J-M

# June 28, 2004 1:30 PM

AdrianJMartin said:

I don't mind the mapping changing too much, just so long as I can find the new mappings out easily.

Will VS2005 have a decent way of printing out the keymappings? Using a printout of the MSDN page is arkward as it is a staight table.

How about a nice wall chart for my cubie wall?

Pershaps even a vsto app to drive Visio......
# July 2, 2004 2:06 AM
Anonymous comments are disabled
Page view tracker