W

VIM-ify All Things with the Drop Alt Keyboard

January 11, 2020

Vim all the things with the Drop Alt Keyboard. After writing code for the better part of five years in Vim and various code editors with Vim keybindings, I went back to a job where I spend a fair chunk of my time writing and editing in Outlook, Word and Excel. As I worked in these other apps I would often wish I had Vim navgiation keys. Microsoft applications do have navigation helpers with the CTRL + arrow keys but they require you to move your hand which, ergnomically, taxes my shoulder. While the thought about how to “Vimify” Office apps kept popping up more and more, I went down the rabbit hole of mechanical keyboards. That’s when I stumbled on to the Drop Alt Keyboard.

The Alt Keyboard is a 65%, RGB backlit, mechanical keyboard that has a couple tricks up its sleeve. First, it has hot swappable switches. Given that I just discovered mechanical keyboards, I thought testing out different switches would be cool. The RGB backlit keys are cool if you’re a gamer but unicorn vomit didn’t interest me. However, the feature that did interested me was that you could program the Alt Keyboard's QMK firmware.

The Drop Configurator allows you to configure the keymapping and RGB lighting of each key. The keys are configurable by layer. You can have up to 15 layers and configure the keymapping and lighting of each key in each layer. I bought the keyboard with the intent to set up one layer that just mapped h, j, k, and l to emulate Vim navigation. After I realized how easy it was to update the firmware, I decided to program the keyboard for shortcuts I use (or forget to use) in the Microsoft applications I commonly use at work.

I ended up using four layers:

  • Layer 0 - This is the normal keyboard layer.
  • Layer 1 - This is the default Alt Keyboard layer has the LED Controls and maps the number keys to function keys.
  • Layer 2 - The Vim layer. On this layer I mapped the Vim navigation keys to the arrow keys and ended up adding helpers for Word and Outlook.
  • Layer 3 - The Excel layer. Here I mapped some shortcuts that often use the mouse for and could never remember the shortcut for.

Layer 0 - Default Layer

Default Layer

Toggle Keys

  • CapsLock (Yellow) - toggles VIM layer
  • Fn (Orange) - holding down this key activates the Led / function keys. You need to hold down this key to use a key in Layer 1.
  • Right Alt (Lime) - toggles Excel layers just for the next key press. Toggles back to layer from which it was called.

Keymapping

The is pretty much a default keyboard layout except for the layer toggles.

Layer 1 - LED / Fn Layer

Layer 1

Colors

  • Blue - The default configuration is to have the Del, PgUp, PgDn and ]} key control music volume.
  • White - Active keys. The number keys are function keys on this layer. I made f4, f5, f8 and f9 lime because they have functionality in Excel.
  • Yellow - These keys control the default led patterns in of the keyboard. The B is red because it’s the key you need to press in order to update the firmware.

Keymapping

  • Left-Shift = capslock (I remapped caps lock to this layer since I don’t really use it and so I could use the caps lock to toggle into the Vim layer)
  • Application-key = alt + f4 (Closes a window)

Layer 2 - VIM / Word / Outlook Layer

Layer 2

Toggle Keys

  • CapsLock (Yellow) - toggles back to Default layer.
  • Right Alt key (Lime) - toggles Excel layer for next key press.

Colors

The yellow and orange are kind of hard to distinguish in the photos.

  • Orange / Yellow - Navigation
  • Violet - Outlook shortcuts
  • Light Blue - Word navigation

Keymapping

Vim

  • J = down arrow
  • K = up row
  • H = left arrow
  • L = right arrow
  • Y = page up
  • N = page down

Word Helpers

  • U = ctrl + page up (Beginning of paragraph)
  • M = ctrl + page down (End of paragraph)
  • W = ctrl + right arrow (Navigates to next word)
  • B = ctrl + left arrow (Navigates to previous word)
  • 4$ = ctrl + home (Navigates to start of line)
  • 0) = ctrl + end (Navigates to end of line)

I tried to figure out a way to navigate sentences but I didn’t want to write VB macros.

Excel Helper

  • V = ctrl + shift (With the Vim navigation mappings I can expand a selection by just holding down this key instead of ctrl + shift)

Shortcuts

Outlook

  • 1, 2, 3 = ctrl + function key (These map to custom labels I have set up to organize my emails)
  • Q, Z = ctrl + shift + tab (Takes you to the folders pane)
  • A = backspace (Archives email. I remapped they key here so I don’t have to move my right hand while navigating the inbox)
  • X = del (Deletes an email)
  • R = ctrl + r (Reply)
  • T = ctrl + shift + r (Reply all. Colored red for obvious reasons)
  • F = ctrl + f (Forward email)

Word

  • .> = shift + f5 (Cycle through last 4 edits)
  • /? = ctrl + f (Opens search dialog box)

Layer 3 - Excel Layer

Layer 3

Toggle Keys

The Drop configurator has an option to toggle a layer for one keypress. I use this to toggle this layer from the Default layer and the Vim layer. After I press a shortcut, the keyboard reverts back to the previous layer.

Colors

  • Violet - Formatting keys
  • Lime (looks like yellos in the photo) - Excel commands
  • Orange - Excel navigation

Keymapping

Formatting

  • Esc = ctrl + shift + ` (Formats number as General - 1000.00)
  • 1! = ctrl + shift + 1 (Formats number as Number - 1,000.00)
  • 2@ = ctrl + shift + 2 (Formats number as Time - 4:30 PM)
  • 3# = ctrl + shift + 3 (Formats number as Date - Dec-25-86)
  • 4$ = ctrl + shift + 4 (Formats number as Currency - $1,000.00)
  • 5% = ctrl + shift + 5 (Formats number as Percent - 99%)
  • 6^ = ctrl + shift + 6 (Formats number as Scientific - 2.34E+02)
  • F = ctrl + 1 (Opens format dialog box)

Excel Commands

  • V = ctrl + alt + V (Opens paste special dialog box)
  • R = ctrl + R (Fills cells to the right of the selected cell)
  • D = ctrl + D (Fills cells below the selected cell)
  • I = shift + f3 (Insert formula)
  • M = ctrl + f3 (Opens name manager)
  • N = ctrl + n (Create new worksheet)
  • - = ctrl + - (Delete row)
  • + = ctrl + + (Delete column)
  • ;: = ctrl + ' (Copies formula from the above cell)
  • '" = ctrl + shift + " (Copies value from the above cell)
  • Tab = ctrl + ` (Toggles between values and formulas)

Excel Navigation

  • C = ctrl + space (Select column)
  • B = shift + space (Select row)
  • 8* = ctrl + shift + * (Selects the current region around the active cell)
  • [{ = ctrl + [ (Goes to precedent cell)
  • ]} = ctrl + ] (Goes to dependent cell)
  • . = ctrl + . (Jumps to the corners of a selection)
  • Home = ctrl + home (Goes to beginning of sheet)
  • -> = ctrl + end (Goes to end of sheet)

Conclusion

This set up as worked out really well so far. I will probably make a couple tweaks here and there but I’ve gotten used to the layout after a full day’s use. It’s worked out so well I’m considering buying another one for home to replace my dev keyboard, an Apple Magic Keyboard. At $200 shipped, the Alt Keyboard isn’t cheap but what would you pay to finally learn all the Vim keybindings?

Send comments, corrections to waynechoi@gmail.com