On keyboards

Typing all day long, one has preferences.

I use linux and openbsd on thinkpads, with their respective built-in keyboard or an external ergodox/mouse set, all with the dvorak keyboard layout.

I mostly write in french and english.

The ergodox is fantastic and customizable just as much as one could wish for, thanks to their QMK firmware.

The built-in keyboard on thinkpad are great-ish but customization has to happen at the OS level.

1 Dvorak layout

I don't recall when I first started learning dvorak, most probably around 2003. It would take a few years until it became my main layout. I remember clearly that I was attracted then and maybe even today by everything not-shiny but better-even-if-not-used. "Toujours du coté des minorités".

I also chose linux, OpenBSD, handtool woodworking, film photo before it was cool and elitist, because it felt somehow rustic and good. Then it became a bit elitist and I stayed because it felt good?

Dvorak is a good alternative layout to QWERTY or in my case AZERTY. As everything keyboard, so things are meant to remain unchanged even if broken by design. I have no interest in layout theories nor in whether dvorak is actually better than X or Y. There are many alternatives to QWERTY and AZERTY today, with colemak, bépo, workman …

1.1 time and effort

Learning Dvorak wasn't quite as frustrating as learning to touch type which I did at the same time.

Dvorak is good for touch typing since it was designed to encourage this behaviour BUT:

  • there is no proof that touch typing is inherently good for anything but productivity
  • once your learned typing with 3 fingers, jumping around the keyboard at warp speed, touch typing with still hands is a bit weird and feels slow even if actually much faster. ENERGIZE.
  • Dvorak was not designed for french, for coding, for gaming, for … it was optimized to type english words on a typewriter. Accents, CUA bindings, combos, … all these are not optimized.

1.2 change and adaptation

On computers, I use dvorak. On mobile, I use either QWERTY or AZERTY. Sometimes, I need to type on AZERTY keyboards, and it's just fine. Weird how the brain works.

1.3 writing prose

In english, it's perfect. In french, it sucks the same way qwerty does, for accents.

1.4 coding

Everything is just as useful as with qwerty, the same symbols are accessible in different places.

In vim, HJKL are scattered :( The rest is just as practical.

2 Ergodox

Get teensy loader to update the keyboard firmware : https://www.pjrc.com/teensy/loader_linux.html or install packages:

sudo apt-get install gcc unzip wget zip gcc-avr binutils-avr avr-libc dfu-programmer dfu-util gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi teensy-loader-cli

Eventually update the udev rules:

wget https://www.pjrc.com/teensy/49-teensy.rules
sudo cp 49-teensy.rules /etc/udev/rules.d/49-teensy.rules

Build the keymap using:

# make <keyboardname>:<keymapname>
make ergodox_ez:dvorak_jeromenerf

Flash using:

teensy_loader_cli -mmcu=atmega32u4 -w ergodox_ez_dvorak_jeromenerf.hex

2.1 single tap vs. combo

Of all the QMK firmware goodness, my favorite feature has to be the possibility to map different actions on a key, depending on whether it has been used in a combo or simply tap'd and released.

For instance, the capslock key can be repurposed as both a Escape on press and a Control key when combo'ed with another.

The xcape or doublekey programs are meant to replicate the ergodox firmware feature but I found them annoyingly introducing delays and inconvenience with other system tools, such xmodmap.

2.2 On using two thumbs but one spacebar

The ergodox keyboard, like many other split mechanical keyboard, features a thumb cluster of keys where the traditional typewriter inspired laptop keyboard only present the user with a large space bar, for the two most potent fingers.

I use the left thumb for space/ALT (and an extra SPACE/SHIFT) and the right one for return/SHIFT and an extra DEL on the ergodox and mimicked that on my laptop, repurposing the key right of spacebar to be an additional return. I love it but I rarely use it actually, habits die hard.

I only use two keys per thumb. The other 4 are useless / hard to reach, and I reserve them for media controls.

2.3 On using dvorak, to write french prose and english code

Dvorak is all around great, but it lacks some dedicated keys for accented letters, when writing in french. Moreover, the layout is not as brilliant when it comes to the keys distribution for the little and weak fingers for french writing.

Of course, there is a french specific layout that is supposed to bring the same value as dvorak, which is called bépo. It is however a really bad layout for english and tech work.

Dvorak has one sensible advantage too: it's very easy to convert a QWERTY keyboard to dvorak by just swapping out keys. The apple keyboard are actually very nice for this, all keys being identical in size and shape. Thinpads aren't as practical, keys being different is shape, size and underlying hooks.

2.4 On using the Compose key for accents and specal symbols

Dvorak or QWERTY –and as a matter of fact pretty much everything except AZERTY and bépo– are pretty annoying for french writers, providing no dedicated keys for the most common accented letters. Typically the AVERTY layout provides é, è, ù and ç plus ` , ¨ and ^ dead keys to cover ~90% of the most common scenarios.

The Compose key is analog to a generic dead key modifier: instead of just typing ^ then o for ô, you would type in compose key+shift+^ then o and get ô. It seems a bit tedious, but it actually makes the approach generic and repeatable. This comes in handy for accented capitals and rarely used accented letters.

Then, the Compose key is also used to enter special characters, coming from other alphabets, for mathematics or schematic notations … such as , , , Ω, Σ, etc. Or (╯°□°)╯︵ ┻━┻) or course.

Fn ? Compose Alt Space Return Compose

2.5 On making noise!

Keyboard clicks are great triggers to stimualion, as feedback loop, and even relaxation.

Programs, like bucklespring can emulate the keyboard sound (venerable IBM bucklespring) but also leverages OpenAL which allows for location and stereo!

3 Planck

[2020-10-01 Thu]

The planck is a strange beast. An incredibly small form factor, without even a number row, but lots of layers, accessible through layer modifiers.

It's quite fine to use but a bit difficult to migrate to at first.

The layer system is indeed a good idea, I would not have suspected it would be so easy to pick. I had much more difficulties working with the ergodox, which had the exact same capabilities but didn't really require them, since it had so many keys.

What's good on the planck is exactly what I found tiring on the ergodox: you don't need to stretch to reach. I have large hands and yet using the large ergodox was not as comfortable as using this small keyboard. This is mostly a personal thing.

cd ~/src/github.com/sza/qmk_firmware
make planck/ez:dvorak_jeromenerf && wally-cli planck_ez_dvorak_jeromenerf.bin

3.1 DONE 10 fingers typing is a must

OK so let's start with the obvious. It's not as easy as an ergodox to get used to, and that's quite something to say.

The ergodox is vast, and you can easily accomodate duplicate keys, move your hands around. The planck puts far more constraints on your hands placement.

I use dvorak as a layout, which already enforces steady hands, but the planck is on another level for sure.

I realized my hands position is shifted to relieve the pinkies, squatting the shift keys.

3.2 NOGO move weak fingers keys to the center

This may not be the brigthest idea ever. It wokked great with the ergodox because the keyboard is huge. I was thinking that the planck being small, it would be great to separate hands a little bit.

Dvorak is rather hard on the right pinky with the very common L and S keys. The left pinky is left with the easy custody of A, quotes and colon. A much easier job.

' , . p y ESC DEL f g c r l
CTRL/a o e u i CTRL/TAB CTRL/- d h t n CTRL/s
SHIFT/; q j k x +/= / b m w v SHIFT/z

In fact, once a I tried to move all the first and last columns to the center, it was actually difficult to reach those keys. For sure the pinkies were static, but the index was two keys away from its resting position.

ESC ' , . p y f g c r l DEL
CTRL/TAB a o e u i d h t n s CTRL/-
SHIFT/= ; q j k x b m w v z SHIFT//

DEL and the other pinky keys are actully really easy to reach with my hands size, with no discomfort or excessive extension. They are just one key away.

The SHIFT/CTRL symmetry is comfortable AND mandatory, since these keys are double duty, using the tap vs long press feature of QMK. Which is the best thing since lasagna.

3.3 DONE Do as much as possible with the thumbs and the rolling fingers

Haaa thumbs. I wonder why spacebar is still a standard.


Some people like to use the outmost keys as palm keys. It doesn't work for me, I must have too large hands for that, my palms are nowhere near the corners of the board. Oh, and I use a palm rest.

Some people also like to put a DEL key in the thumb area, which I did with the ergodox, but I don't find it as interesting with the plank. The top corners are easily accessible with the pinkies at my hand size.

That being said, I would love to get a SHIFT key down there too, but I couldn't find a way to fit that.

3.4 DONE tap hold delays

Double duty keys works with a customizable delay, 200ms by default.

If you press a key for more than 200ms, then the "hold" keycode would be used instead.

It comes in handy for the thumb keys, which are usually slapped with energy (SPACE, BACKSPACE, RETURN) but can be a bit finicky for pinkies, which seem not quite as quick.

Anyway, I tried using a longer delay, but then using upcasing using SHIFT-key gets a little error prone.

3.5 DOING easy symbols and accents access

I usually compose accentuated letters using the COMPOSE key on linux. Accents and many other symbols by the way. Such as math symbols, greek letters or emojis.

The compose key work by issuing a key sequence such as COMPOSE+' e to get é or COMPOSE+g SHIFT+p to get pi Π.

On dvorak, most of the usual accents are accessible on the top right corner, either `"', but ^, which requires a nofun COMPOSE+RAISE+f o or COMPOSE+LOWER+SHIFT+f o to get the ô of Jérôme.

I was hoping for QMK to support to send directly some unicode sequence for the most common or maybe the most annoying to type letters. The QMK unicode documentation is pretty good on this subject but I have yet to configure iBus on linux to report if things are working as expected.

3.6 DONE Custom firmware flashing tools

See wally-cli

Teensy is available in debian but doesn't handle the planck.

QMK comes with a flashing command gmk flash that I have not tested yet.

3.7 DOING feedback

3.7.4 DONE I can't really get used to SPACE not in the middle

I duplicated the SPACE to both the 2u key and the left next one

3.7.5 TODO I still get some errors with the tap / hold feature

I would need a cancellation period longer than the activation I guess. I am sometimes too quick for shifted keys but too slow for compose / raise / lower

4 Linux

4.1 Mod fest

Linux is quite a mess regarding modifiers:

  1. there are keys, with printed labels, like control, altrg, etc
  2. those are often renamed in the X11 system, with mod1 (usually alt), mod2, multi key (the compose key), etc. Those are related to "layers". The first layer being the shifted key, then the mod1'd, then the shifted mod1'ed key.
  3. some programs also use alternative names, such as Meta in Emacs

The ones I need:

mod where function
SHIFT everywhere everything, typing, shortcuts, …
COMPOSE everywhere Typing
CTRL in apps app shortcuts
ALT everywhere special chars, shortcuts, and emacs ?
OS window manager window manager and general shortcuts

4.2 Per keyboard settings

By default, all keyboards are treated the same: one layout for all.

It's possible to tweak keyboard settings, using different methods though.

  • using xkb setxkbmap by adding overlays on top of existing layouts
  • using xmodmap (mostly deprecated and quite obscure really)
  • using xinput with XKB to target a specific device

xmodmap is the easy way out but a pain when using different keyboards.

See this askubuntu post for different alternatives.

4.3 Accents, symbols, unicode and other misc

QWERTY and DVORAK have no keys dedicated to accents, which are mandatory in french, compared to AZERTY or BÉPO

There are many ways to add them though.

4.3.1 Dead keys

4.3.3 Compose key

Compose is great and generic, if not a bit slow for some case, with ^ which is a three finger chord.

4.3.4 ibus unicode input

C-S-u + 1234 where 1234 is the unicode number of the character. Not usable right away but a good building block or automation.

4.3.5 QMK "unicode" features

QMK uses ibus for unicode input on linux. Just program the sequence to send and QMK will add the relevant prefix for it to work on linux, mac or windows.