How I Switched to DVP Dvorak Keyboard Layout as a Linux EXWM Emacs User

Table of Contents

My heavy emacs use was both the motivation and the obstacle to switching to a new keyboard layout. Motivation because my life is keyboard driven, so there are healh and efficiency reasons to want to make the best of my keyboard experience. Obstruction because so much of my emacs and typing proficiency is in my muscle memory, and this might be lost if I make a drastic change. Well, rather than Colemaks or QwertZ, which aim to maintain most of your muscle memory, I decided to go whole hog and do Dvorak. While I was at at, I chose Programmer’s Dvorak, which emacs already had bindings for. I’ll give more of the reasons elsewhere, but here I’ll give the method and process I’ve followed for this journey.

Steps

  1. Practiced on my phone for a few years, making my phone Dvorak on the gboard app.1
  2. Set emacs to switch to DVP input on a single key press2. This allows your muscle memory of emacs shortcuts to remain unchanged
    • Certain commands such as I-Search and things that open an input area, may have issues when you do this.
  3. Print a color-coded image of key locations and position it to be available without moving my head.3
  4. Practice until basically touch-typing
    • Journaling and TRANSCRIPTION, email writing (things without a big time constraint)
    • Coding
    • Utilize instructional web apps4
  5. When I had all the emacs alpha numerics figured out, I will take the final step and switch system-wide.

ALERT: get your passwords figured out!

Take it from me: before you switch your system to Dvorak you need to make sure all your local passwords (and probaby your online ones too) are known and readily typable in your Dvorak keymap. Since mine resided more in my muscle memory than my brain, I actually locked myself out of my computer for a day before I remembered that I hadn’t changed my sudo pw yet and was able to use it for recovery. The password problem is especially bad if they include numbers and you are switching to DVP, where the whole numrow is vastly different. In particular, I had to take special care of the following:

  • user login
  • sudo password
  • password manager master password (I use kwallet and KDE)
  • GPG master password, which I use to encrypt several crucial files on my system

Implementing system-wide

Use this to verify which maps you want. I see us-dvp is present.

localectl list-keymaps

From well-aged intructions at https://www.kaufmann.no/roland/dvorak/linux.html:

setxkbmap -layout us -variant dvp -option compose:102 -option keypad:atm -option numpad:shift3 -option kpdl:semi

Some of his commands will have added to /etc/vconsole.conf, which makes your terminals respect Dvorak:

KEYMAP=us-dvp
...

Implementing any time

I have an executable script that I have simply named xm in which I previously implemented my capslock-CTRL swicheroo. I just added my Dvorak change-over to that and run it whenever I notice that I’m not in my Dvorak, usually after a reboot.

#!/bin/bash
setxkbmap -layout us -variant dvp -option compose:102 -option keypad:atm -option kpdl:semi

xmodmap ~/.Xmodmap

TODO Implementing Permanently

I actually haven’t been motivated to figure this out yet, for several reasons. First, my xm script is so easy to run5. Second, rather than implement it in the software, once I’m fully comfortable with it, both my current and my next keyboard have ways to just switch to Dvorak at the hardware level, and I will use those eventually.

Footnotes

1 because I use swipe on my [Android] phone, using Dvorak wasn’t as helpful as I had imagined. It turns out that knowing how to Swipe in Dvorak is quite different than knowing which keys you need for typing.

2 By setting (setq default-input-method "programmer-dvorak") then any time you use C-\ (toggle-input-method) you will switch to DVP within emacs. Very easy, very fast. This is also a customizable option, so I don’t actually use setq.

3 My printout of a DVP keymap was this one: img

4 Big thanks to some great recommendations from the Twitter community!

5 I just do M-! xm anywhere in my emacs, and that’s it

Tory Anderson avatar
Tory Anderson
Full-time Web App Engineer, Digital Humanist, Researcher, Computer Psychologist