Shortcuts, Who You Foolin’

Keyboard shortcuts!  Sure they save you from having to use your mouse, but come on, does it really save you that much time?

That’s definitely a question that I’ve been able to understand more and more the past few months.  As far as using the mouse for almost everything, I’m what you would call a once popular, but now cancelled wrestling pay-per view event, “Guilty As Charged”!  I mean, I would hear from other developers, online, and blogs mention that you should use keyboard shortcuts because they save you a lot of time and allow you to be more productive.  I thought to myself, “Really! Come on, man, I’m pretty fast with the mouse so I don’t think using shortcuts would save me much time at all.”

Then slowly but surely, I started using keyboard shortcuts, to see what all the fuss was about. Not going to lie, it still didn’t sink in.  I would still constantly move my right hand and grab that mouse over and over and over again.  To help me overcome this, I had to be more conscience and work on making it a habit to refrain from grabbing that mouse.  Easier said than done, for sure.

So I started using more shortcuts outside of Visual Studio just to get more comfortable and practice with moving my fingers around the keyboard.  I know what you’re thinking, “Practice, come on, you’re talking about practice.  Not the game itself, but practice”.  A famous quote by an ex-NBA star.  But I will tell you, as silly as it may sound, most if not all of us have to teach our hands to instinctively stay on the keyboard and not venture off.

Another issue with shortcuts is that you have to remember the keyboard combination and what action it performs.  That in itself can definitely hinder and stop shortcut usage dead in its tracks.  So to deal with this, I would work on learning one to two shortcuts each week so that I could retain and apply them instead of feeling overwhelmed with having to learn so many combinations.

I must say, this helped a lot!  It started the pattern to wire my hands to stay on the keyboard whenever possible.  Because of this, I was able to use more shortcuts for Windows Explorer, Chrome, SSMS, and especially Visual Studio.

Some of my most frequently used shortcuts are listed below and I may have accidentally left some out, but I can assure you, the list will continue to grow.

  • Windows Explorer
    • Alt+D Move focus to the address bar for the current path.
    • Ctrl+W Close the current window.
    • Shift+F10 Open shortcut menu for current selection (same as mouse right-click)
  • Text
    • Shift+Left or Right Arrow Select characters one at a time.
    • Shift+Ctrl+Left or Right Arrow Select words one at a time.
  • Visual Studio / ReSharper
    • Ctrl+B Go to definition.
    • Ctrl+Shift+N Find file or folder.
    • Ctrl+Alt+F7 Go to usages.
    • Shift+Alt+L Locate current file in Solution Explorer.
    • Ctrl+L Cut current line.
    • Ctrl+D Duplicate line or selection.
    • Alt+Insert Generate code (ctors, properties, etc.)
    • Ctrl+W Select current word/line, then each additional Ctrl+W selects the next indention level and so on.
    • Ctrl+Shift+V Cycle through clipboard
    • many, many more.
    • If certain key combinations don’t work or if I want to add new ones, I go to Tools > Options > Keyboard and then see what the keyboard shortcut I’m trying to use is mapped to.
  • SSMS
    • Tools > Options >Keyboard:
      • Map a new entry for “View.ObjectExplorer”, so you can jump between the object explorer details and the object explorer.

So to journey back to the question at hand, “Do shortcuts really help your productivity?”, I would say yes.  By how much though, well that’s a whole other topic altogether.  I guess it really depends.  For me, I had a recent incident where my ReSharper license was in limbo due to an upcoming contract update, which did not provide access to Visual Studio 2017.  Those couple of days felt like I was in withdrawal.  Ok, not really, but I was getting frustrated when I couldn’t hit Ctrl+Alt+F7 to go-to usages for a particular class, or even Ctrl+Shift+N to find a particular file, or any of the other shortcuts that I had in my arsenal.  I know there are Visual Studio related shortcuts, but I didn’t want to learn a new set of shortcuts just for a day or two.  But that incident did help me get back to using the ‘Alt’ key in to display all keyboard shortcuts for the application to keep me from going back to my mouse time and time again.

In conclusion, in the beginning, I really didn’t think shortcuts were very beneficial over using a traditional mouse, but now I catch myself from time to time trying to find or map new keyboard shortcuts while using different applications.  When this first occurred, a grin did appear across my face and I thought to myself, “This is what all the fuss was about…I see now”!  Being more productive, check!