Saurabh's Blog

Help Integration | Windows Forms | Managed VSIP Integration | Random Rants

Keyboard Shortcut Consistency

One fine day, I get a call to help in investigating failures in few of the automated tests. After some investigation, we figured that failures were happening because somebody decided to assign “F2” as a keyboard shortcut to build. What is wrong with that? Doesn't it simplify the keyboard shortcut compared to VS 2003's Cntrl+Shift+B? Well, it turns out that F2 is typically used for rename and test was relying on this fact.

However, tests are not the only ones who rely on facts like this. Most users also assume/wish/want that keyboard shortcuts are consistent across applications (and with the operating system). It reduces the learning curve and makes them more productive. Consider the amount of chaos if Word decided to rebind “Cntl+C” to something other than “Copy”. One should know about “standard” keyboard shortcut before picking one for commands in their application. If a command exposes standard functionality (like copy); it should have a standard shortcut (like Cntl+C). This makes your application consistent with the OS. You can read about various WinXP keyboard shortcuts at http://www.microsoft.com/enable/products/KeyboardSearch_XP.aspx. You can read about keyboard shortcuts of various applications at Keyboard Assistance site (VS is not on that list :-(). Raymond has also posted a tip on why one should not use “Cntl+Alt” as modifiers. In addition, one should avoid creating of accelerators (or shortcuts) that override system accelerators. It is mentioned in “Accelerator Keystroke Assignment” section in About Keyboard Accelerators.

I know VS is inconsistent. We have too many shortcuts exposed and we break many rules. Help is really notorious. However, I don’t know if we will fix each one of these instances. There are many legacy issues around it. For e.g., consider the scenario if we fix VS so that F10 activates the menu (essentially what “Alt” does). People will start complaining because we changed keystroke of one of the most used command of VS, the “step” debugger command.

Hence my advice is more applicable to new application instead of legacy ones as you would be infuriating users by changing the shortcuts without enough justification.

Published Tuesday, June 01, 2004 8:06 PM by saurabhjain

Comments

 

Kevin Dente said:

So is the build shortcut changing back to ctrl-shift-b? A one key shortcut for build would be nice, but the conflict with rename is pretty major. What happens if you highlight a file in the project explorer and hit F2 to rename it? Does it do a build?
June 1, 2004 9:27 PM
 

Saurabh Jain said:

I don't believe if we have settled the debate on keyboard shortcuts. However, if you have played around with various settings file in CTP, you would have noticed that we have been experimenting with the shortcuts. One setting has bound it to F6, other one has F7 assigned to it and some settings still have "Cntl+Shift+B". The lockdown hasn't happened so log, blog or just rant. We are listening ;-).
June 2, 2004 12:18 AM
 

Ron said:

At this point, I'm used to Ctrl + Shift + B. I could get used to another, but I might be just as likely to remap back to the original if the new mapping conflicts with one of my own personal shortcuts.
June 2, 2004 7:26 AM
 

Anon said:


It looks like the keyboard is now the only safe place to be ..

http://bink.nu/DesktopModules/ArticleDetail.aspx?ArticleID=1952
June 2, 2004 8:30 AM
 

Chris Nahr said:

The XP shortcut list on the "Enable" site contains a lot of duplicate entries. Perhaps a better list of shortcuts for Windows XP can be found under Q301583:

http://support.microsoft.com/default.aspx?scid=kb;en-us;301583
June 2, 2004 11:47 PM
 

Keyboard Shortcut Consistency said:

November 28, 2007 11:55 AM
Anonymous comments are disabled

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker