CodeRush 21.2.5 for Visual Studio – Caps as a Shortcut Modifier

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.

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

  1. Run the CodeRush Setup Wizard.



  2. On the Caps as a Modifier setup page, check the "Enable Caps as a Modifier" checkbox:



  3. 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.

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:


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:

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:

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.

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.

Binding New Shortcuts

To bind a new Caps shortcut to Visual Studio or CodeRush feature, follow these steps:

  1. 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.
  2. Bring up the CodeRush Shortcuts options page.
  3. Create a new folder to keep your custom shortcuts organized (if you haven't done this already).
  4. Click the Add a new shortcut toolbar button.
  5. 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:

  6. More on creating custom shortcuts.

Your Feedback Matters

Please comment below and let us know what you think about using Caps as a Modifier and the new Learning CodeRush solution. If you have specific questions or need assistance with CodeRush, feel free to contact us through our Support Center (support@devexpress.com).

Free DevExpress Products – Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We’ll be happy to follow-up.
Martin Pelletier
Martin Pelletier

Love the new Caps Lock shortcut. And the Learning Solution is well made. I know it would be a lot of work, but need more Coderush tutorial like that.


15 December 2021
Mark Miller (DevExpress)
Mark Miller (DevExpress)

Thanks Martin. I agree and I hope to see more interactive CodeRush tutorials inside Visual Studio in the coming year.

16 December 2021
Temoc Navarro
Temoc Navarro
This is one of the most annoying notifications. It pops up every time VS gains focus and it beeps. Please make it stop.
4 February 2022
Mark Miller (DevExpress)
Mark Miller (DevExpress)

Hi Temoc,

Thanks for your comments. The toast notification should only appear if Caps Lock is engaged when you give Visual Studio focus. If Caps Lock is off, you should not see any notifications when you give Visual Studio focus  

When the notification appears, there should be a gear icon in the upper right. Click that icon and you should be able to configure settings such as sound, alerts, etc.

Let me know if this helps or if you have any other questions. 

4 February 2022

Please login or register to post comments.