Caps as a Modifier allows you to use the Caps Lock key as a shortcut modifer inside Visual Studio, just as you would use Ctrl, Shift, or the Alt keys as shortcut modifiers.
Image may be NSFW.
Clik here to view.
As an added bonus, this feature can also prevent accidental triggerings of Caps Lock when inside Visual Studio.
It's a paradigm shift, but a good one, and the end result is more power with less effort.
Here's how it works...
The Basics
Once enabled, the Caps key will start working like any other modifier key.
So for example, to press Caps+A, you just press the Caps key along with the letter A.
It's that simple.
Enabling Caps Lock as a Modifier
- Run the CodeRush Setup Wizard.
Image may be NSFW.
Clik here to view. - On the Caps as a Modifier setup page, check the "Enable Caps as a Modifier" checkbox:
Image may be NSFW.
Clik here to view. - Click Finish and you're done.
New Features
Once you enable Caps as a Modifier, you'll gain access to a host of new features to make development faster and easier. The best way to learn and practice some of these features is with the Learning CodeRush solution.
Image may be NSFW.
Clik here to view.
After the solution loads in a new instance of Visual Studio the "StartHere.cs" file will open with buttons to take you through a guided tour.
In this blog post, we'll take a closer look at some of those new features.
Toggling Code
We have organized a number of functionally-similar refactorings that toggle code (change it from one state into another) into a single shortcut binding, Caps+Space. You can use Caps+Space to compress to or expand from:
- Implicit/Explicit Declarations
- Expression Bodies
- Ternary Expressions
- Null Coalescing Operations
- Initializers
If code can be toggled or converted between two or more states, Caps+Space is the key to use.
Removing Unnecessary Code
Remove unnecessary code with Caps+Delete. Just place the caret on any of the following and press Caps+Delete to remove it instantly:
- Discard Variables
- Redundant Block Delimiters
- Redundant Constructors
- Redundant Destructors
- Unused Locals
- Unused Parameters
- Unused Types
Adding New Code
We've bound powerful code providers to Caps+Insert, for adding new code at the caret:
- Add Missing Constructors (available when the caret is in the class name)
- Add to Interface (available on the name of a new member inside a class that implements an interface)
- Add Parameter (available inside a parameter list to a method declaration or an argument list on a method call)
Single-key Declarations
You can now instantly declare classes, members, and locals with a single keystroke when the caret is on an undeclared class reference, member reference, or unassigned expression:
- Caps+C to declare a class.
- Caps+M to declare a method.
- Caps+P to declare a property.
- Caps+F to declare a field.
- Caps+L to declare a local variable for the unassigned expression at the caret.
- Caps+Q to declare a constant.
Designed to Work Well Together
These shortcut bindings were selected to reduce ambiguity and work well together. Most of the time pressing a Caps-key binding in the right place will result in immediate execution of the refactoring. In some cases when two or more refactorings bound to the same shortcut are simultaneously available, CodeRush will present a menu so you can select the refactoring you want.
Turning Caps Lock On and Off
To toggle between actual Caps Lock and normal keyboard entry, just double-tap the Caps key (press it twice, quickly). You'll hear audible feedback and see toast in the bottom right of Visual Studio alerting you that Caps Lock is now engaged.
Image may be NSFW.Clik here to view.
.png)
To disengage, simply double-tap the Caps key again. Toast will alert you that you have once again returned to the safety of normal keyboard entry.
Image may be NSFW.Clik here to view.

Binding New Shortcuts
To bind a new Caps shortcut to a Visual Studio or CodeRush feature, follow these steps:
- If you're binding to a Visual Studio command, make sure you know the exact text of the VS command before you take the next step. You can get a list of all Visual Studio commands in the VS Options dialog on the Keyboard page.
- Bring up the CodeRush Shortcuts options page.
- Create a new folder to keep your custom shortcuts organized (if you haven't done this already).
- Click the Add a new shortcut toolbar button.
- Specify the properties of the shortcut, including what keys will invoke it, the command to perform when the keys are pressed, and the context under which this binding is valid:
Image may be NSFW.
Clik here to view.
Your Feedback Matters
Clik here to view.