advertisement
Premier Club Log In/Registration
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   SKILLBUILDING  |   TIP BANK  |   SOURCEBANK  |   FORUMS  |   NEWSLETTERS
Browse DevX
Partners & Affiliates
advertisement
advertisement
Tip of the Day
Average Rating: 2/5 | Rate this item | 2 users have rated this item.
Expertise: Beginner
Language: VB.NET
October 19, 2004
Creating Custom Keyboard Shortcuts in VS.NET
Keyboard shortcuts are extremely useful when you use a particular option repeatedly—like when you select menus or toolbars manually. Sometimes, the default shortcut is cryptic and you cannot remember it. Otherwise, the shortcuts do not exist at all. Here is how you can assign your own custom shortcuts to the actions you use very often.
  1. Start Visual Studio.
  2. Choose Tools—>Customize.
  3. Click on the button Keyboard.
  4. A complex looking dialog will appear.
  5. The left section lists the various items which are customisable. Keyboard will be selected in this case.
  6. The settings you change may interfere with settings of other users who may share your machine. To avoid this, save your settings as a collection of named settings. Before you customise anything, click on Save As and choose a different name for your collection of settings.
  7. Type part of the menu or toolbar button for which you would like to assign a shortcut key in the textbox Show Commands Containing. This launches a substring search on all the commands and returns a filtered list. Browse the set of commands and locate the one you want.
  8. If the command already has a key assigned, view it. It is possible that there is a shortcut key that is not shown in the menus. If this is the case, memorise the shortcut and exit this dialog. No customisation is required.
  9. If there's no shortcut, or you dont like the default shortcut, customise it. Locate the command and go to the Press shortcut key(s) textbox. Press the required combination. VS understands which keys you pressed and puts their names there. Remember that you can specify multiple shortcuts for a single command.
  10. It's possible that the keyboard shortcut that you are trying to use is already used by VS.NET for some other existing command. If so, this command will be listed. You can override this shortcut and map it to the command selected by you. If you dont want to disturb the current assignment, type a new keyboard shortcut. Remember to delete the existing shortcut before you type the new one.
  11. Click on Assign.
This can dramatically increase your productivity and efficiency while working on VS.NET.

Note: It is possible that you need different types of shortcuts depending upon the type of project (winform/Webform) or the type of file being edited. For such custom requirements, save your shortcut settings under different names and load the appropriate collection as per your needs.

Varun Gupta
If you have a hot tip and we publish it, we'll pay you. However, due to accounting overhead we no longer pay $10 for a single tip submission. You must accumulate 10 acceptable tips to receive payment. Be sure to include a clear explanation of what the technique does and why it's useful. If it includes code, limit it to 20 lines if possible. Submit your tip here.
Please rate this item (5=best)
 1  2  3  4  5
advertisement
advertisement
Advertising Info  |   Member Services  |   Permissions  |   Contact Us  |   Help  |   Feedback  |   Site Map  |   Network Map  |   About

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs