Creating the Ultimate Developer Keyboard–Part 1

So I’m a big UI guy. The science of great user interfaces has been a subject of my research for over a decade. And I write code. When any task takes more effort, precision, and/or time than what I want (e.g., anything that’s not effortless and instantaneous) I get upset.

And even with a next generation IDE and productivity add-ins, I still get upset while coding. There are still tasks that take too long. If I think “I want to look at the fields section of my class right now”, then I want to actually be there in about 600ms or less. I don’t want to be distracted by having to remember a non-intuitive or complicated shortcut to get me there. And I don’t want to waste time doing stupid tricks (such as finding a nearby field and executing Jump to Definition) to get me close.

In programming, there are loads of small little tasks like this one. Like moving from method to method while keeping your relative position within each method. Or navigating structurally through the code (parent/children/siblings). However dedicating unique shortcuts to these little navigations is troublesome for a few reasons. First, you have the additional burden on memory and the associated learning curve. And second, because so many shortcut bindings have already been taken by the IDE (for me, it’s Visual Studio), if you do manage to find something easy to remember that isn’t already used, chances are the next version of your IDE will take that shortcut and use it for a different feature.

So it is in the spirit of approaching effortless and instantaneous that I embark on this multi-part blog series to try to build the ultimate programmer’s keyboard. Adding important navigation, refactoring, code-creation and testing shortcuts that are easy to discover. The keyboard will be easily configurable and have a price point of about $200. And while I’ll be using Visual Studio and CodeRush as the software hosts for this keyboard, the steps I document here should be easily portable to other IDEs.

Getting Started

As I mentioned, this will be a multi-part series. In each post we’ll build or integrate a feature into the keyboard, discussing good design along the way. Each feature and key will be justified in terms of savings to you, the developer. And there will be opportunities for you to go down a different path and place different keys.

My prototype for the finished keyboard currently looks something like this:

KeyboardPrototype

This is just a prototype. Some of the improvements I want to build are theoretical and need to be tested in actual code production. There may be refinements as we move forward. It is important however that every key holds its weight – each key’s feature needs to bring significant value to the developer.

The Hardware

There are several customizable USB keyboards to choose from. My constraints for a good customizable keyboard include:

  1. Solid, reliable key presses. The keys have to be easy to hit. It has to feel right.
  2. Sufficient keys to hold the functionality I want to add. We need about fifty keys.
  3. The ability to add double-wide or double-tall keys for important, frequently-accessed functionality (the bigger the key, the easier it is to hit).
  4. The ability to block out keys. I intend to use this for tactile feedback, so you know where you are on the keyboard without looking.
  5. Reasonably priced (e.g., <US$250).
  6. Small enough to be portable. We’re building something that can be placed on either side of the keyboard you’re already using.

My top three contenders:

Keyboard1 Keyboard2 Keyboard3
XK-80 XK-60 X-keys Professional (58 keys)
$229.95 $199.95 $189.95

These are all from the same company. If you know of or find any other contenders, let me know. I have a feeling this search for the perfect developer productivity keyboard will be an iterative journey over the coming years. Especially since I haven’t actually placed my hands on any of these yet. I’m hoping the quality of the key presses matches expectation.

I chose the X-keys Professional, on the right. While the other two keyboards offered an intriguing feature – the ability to optionally programmatically backlight any key with a glowing red or blue LED, I chose the non-illuminating version because of the thinner border between the key groupings. The thicker border on the XK-60 matches key size, and for me at least resulted in a visual ambiguity that I found distracting and less appealing.

Also, at this point I don’t see a compelling reason for the backlighting in the scenarios I’m envisioning.

The X-keys Professional is listed as “Legacy” hardware, so it may be discontinued or unavailable in the future. If that’s the case, the XK-60 and XK-80 would be my second and third choices, respectively. You can click any of the pictures above to learn more about these keyboards. If you’re nervous about that Legacy label, I bet you can easily substitute the XK-60 for the X-keys Professional I intend to use in this blog.

Accessories

The X-keys Professional comes with a key extractor, two double-tall keys and one double-wide key:

KeyExtractor

For my prototype, I need two double-wide keys and two double-tall keys. I also need the ability to block out eight keys for that eyes-on-the-screen textile feedback I want. So in addition to the X-keys Professional, I also purchased:

CherryMxBlockers
Cherry MX Switch Key Blockers – 10 for US$5

GrayWideKeyCaps
Gray wide keycaps – 10 for US$5

 

You can also purchase colored keyscaps, which could be used to emphasize important keys.

 DifferentKeyCapColors             

For my prototype, I’m simply going to print out the key labels and affix them to each key, so the colored keys aren’t necessary.

Functionality Preview

The prototype has a number of developer-centric features and is designed for fast, one-handed access. The features are organized so similar or related features are grouped together. Also, the keyboard labels are designed to be consistent and easy to read/understand. The functional sections are previewed below.

Refactoring, Code Declaration, Wizards, and Navigation

CodeRushSection

The double-wide CodeRush key provides access to the Refactor/Code menu, listing available refactorings, declarations, and wizards available in the given context (determined by the selected code and/or the code surrounding the caret).

The double-tall green Transporter key on the right provides access to context-sensitive navigation options (such as jump to Ancestor, Overloads, Instantiations, etc.).

This section also includes arrow keys (for quick menu navigation) and the Enter key for activating selected menu items. Everything you need for fast one-handed feature access with minimum finger travel distance. And the blocked-out keys above the arrows help you line up your fingers without taking your eyes off the screen.

Marker/Recent Edits Navigation

MarkerNavigation

These keys allow you to drop stack-based markers, collect them (with Esc), swap the current caret position with the last marker position (leaving a marker where you were, allowing for fast nearly simultaneous editing in two different places in the code), and navigate forward and backward through recently-changed blocks of code. Other features (both on this keyboard and in CodeRush) can drop markers automatically (so you can quickly get back to where you navigated away from).

Structural Navigation

StructuralNavigation

Code has structure, and these keys let you navigate from the current node to parent, first child, and sibling nodes.

Selection

SelectionKeys

The double-tall plus (“+”) key increases the selection by logical blocks. The minus (“-“) key decreases the selection. The swap key exchanges the caret position with the anchor, and the selected to marker key selects from the caret position to the last marker dropped. You can also extend the selection by combining the shift key with other navigation keys on this keyboard, such as the structural navigation keys shown above.

Camel Case Navigation

CamelCaseNavKeys

Quick access to camel case navigation. You can combine these keys with the shift key to select a portion of an identifier (frequently used when renaming).

Reference Navigation

ReferenceNav

Navigate forward and backward through all the references to the symbol at the caret throughout your entire solution.

Smart Method Navigation

SmartMethodSiblingNav

Navigate across sibling methods keeping the same relative position in each method.

Smart Pairs

SmartBraces

Quick access to characters that often show up as pairs in programming. Any of these keys gives you a complete pair, however the keys in the right column place the caret after the closing delimiter. The keys in the left column place the caret between the two characters (with a field that gets you outside when you press Enter) so you can add the code you need and get out quickly.

Pressing either key when there is a selection embeds the selection in the pair, with the caret placed on the side of the selection corresponding to which of the two buttons was pressed (left or right).

Section Navigation

SectionNav

Quickly jump to sections of interest inside your class or struct. Want to get to where Fields are declared? Just press the Fields button. These keys cycle through multiple sections (in case you have fields scattered throughout your class). These keys are also designed to serve a dual filtering purpose when UIs that present members are onscreen (such as CodeRush’s Quick Nav feature or Visual Studio’s Intellisense), so if you want to see only properties listed, it’s as simple as pressing the Property key. I’m also strongly considering a third functionality – hold down Ctrl and press one of these keys to quickly declare a field, method, property or event, regardless of where the caret is in the code.

Navigate to File, Symbol, Declaration

GoToFileSymbolDefinition

These keys get you quick access to recent files, solution symbols, and an improved version of Visual Studio’s Go To Definition feature that drops a marker before drilling in (so you can get back quickly with Escape).

Repeat Last Test Run

RepeatLastTestRun

The CodeRush test runner offers a number of flexible ways to test your code. You can run one or a group of tests. After you run and make changes to the code, this button will immediately repeat the last test (or group of tests) run.

Visual Clipboard History

ClipboardHistory

One-key access to the Clipboard History.

CodeRush Options

CodeRushOptions

One-key access to the CodeRush Options dialog.

It’s a Prototype

As mentioned already, this design is expected to be iterative. As I write this, I’m already thinking about changes I might make, so we’ll see where this goes. For example, I think it makes a lot of sense to add one-key toggle access to CodeRush’s Debug Visualizer (suddenly now do the background LEDs make sense?) and the Unit Test Builder. Of course, this is the beauty of this approach. If you decide to follow along with me and build this, you can swap more suitable functionality for anything that doesn’t appeal to you.

Some of these keys will simply map into existing functionality in Visual Studio and/or CodeRush. Other keys will require new features to be built. Don’t worry, I’ll take you through all the steps so you can follow along and build them yourself if you like.

If you’re working in Visual Studio without CodeRush, or you’re working in another IDE, you still should be able to create any missing functionality with a plug-in for your environment (so the concepts here still apply so you can still enjoy the productivity gains offered).

And if you don’t want to build this yourself, stay tuned because I expect we’ll give away fully-configured versions of the final keyboard sometime in the near future.

Next Time

OK, I’ve ordered my keyboard and I’m just waiting on it to arrive. While we wait, we can start writing the new features we’ll need. Look for those in tomorrow's post.

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.
No Comments

Please login or register to post comments.