Solving my RSI issues
— 2024-09-23

  1. breaking up writing sessions
  2. mobility
  3. choosing a keyboard layout
  4. learning a new keyboard layout
  5. using vim movements on a new layout
  6. keyboard layers
  7. hardware
  8. learning a new keyboard layout (again)
  9. conclusion

For the past decade I've struggled with wrist injuries on and off. It's a common occupational injury for us keyboard users, and after my most recent bout this year I decided it was time to actually do something about it. Permanently. I like systemic solutions - they tickle a good part of my brain. And I figured I could apply some of that to my keyboard habits too.

In this post I want to share a little about what my journey to actually fix my wrist issues. Not to be prescriptive for others, but to be descriptive about what I'm doing. Perhaps it'll be useful for others, but mainly because it's fun for me to talk about. I've been making little ASCII cheat sheets for myself, and basically I just wanted to have an excuse to post them publicly.

Breaking up writing sessions

The way I've dealt with my RSI issues for the past eight years is by taking repeated breaks. I've done this using the Time Out app on macOS, and Workrave on Windows and Linux. Both applications bring up a modal pop-up on a set schedule. I have it set to create a short 30-second break every 10 minutes or so, and a 10-minute break every 50 minutes.

While this does not make typing itself any less strenuous, it does break up some of the repetition - which ends up helping a lot. Taking breaks can be a little frustrating though, as it can break up flow. But it's better to have a lot of small breaks than longer-lasting injuries. Shout out to Jacob Groundwater for suggesting this back in 2016 - it's helped me a lot over the years.

Mobility

Another thing I've been doing is mobility issues, specifically for my wrist. I worked with a physio from 2018 to 2020, and I have a stretch routine that helps with flexibility and mobility. I have to admit I've not been keeping that up, but as symptoms flare back up, it's something that I know I can apply when needed.

Where taking breaks helps break up the intensity of the strain, physical exercises help both with symptom relief and building resiliency. It's not perfect, but it's yet another thing I've found that helps me. I'm a little hesitant to provide instructions since I'm not a physio myself though, and it's definitely possible to hurt yourself if you don't do it right.

Choosing a keyboard layout

I started taking regular breaks again in June this year, and it's not helped me as well as it did before. I assume it has something to do with being older now, and recovery just taking longer than it used to. Though I learned how to touch-type when I was in my early teens, I know that using QWERTY layouts aren't particularly good for you. It requires a lot of extra movement in fingers, which leads to a lot of extra strain.

Because I hope to continue to use computers in some capacity for the next fifty odd years, I figured re-learning something I only learned twenty years ago would be well-worth it in the long run. So time to bite the bullet, and learn a new layout. But which one?

I'm lucky that many of my friends are incredibly geekyknowledgeable, and I figured one of them would probably have a good suggestion for what to learn. A quick check online suggested that Colemak Mod-DH would probably be a good choice. So I checked with my friend Sy Brand, who thought it was a good layout - but they suggested something better: Canary.

Canary is a fun little layout based on Colemak Mod-DH but optimizes for something called "rolls". In keyboard terminology a "roll" is a sequence of keys you can type with one hand. A layout which has "high rolls" means it's a layout that has many of those sequences. Here is what the layout looks like on a regular keyboard:

w l y p k z x o u ; [ ] \
 c r s t b f n e i a '
  j v d g q m h / , .

Rolls in QWERTY are fairly uncommon. But with Canary a lot of words incorporate rolls. This might be easier to show rather than explain, so here are some words that incorporate rolls on a QWERTY layout: asimo, werk, wookie. Do you notice how typing those feels kind of flowy? Now imagine nearly all words feel like that. Creating that feeling without causing strain is what the Canary layout was specifically designed for.

Learning a new keyboard layout

Once I'd decided to switch to a new keyboard layout, there was a big "draw the rest of the owl" step to actually being able to use it. When I was a kid my mom paid for me to take after-school classes for a number of weeks to learn how to touch-type. That was 20 years ago though, and I somehow doubt there are in-person classes teaching the Canary layout. So what to do?

It turns out there are lots of great options now. I've been using keybr.com which is free to use, supports various layouts in-browser, and provides different guided trainings to learn how to touch-type with new layouts. I've been using it daily for the past six weeks, and honestly it does everything I could hope for.

To complement keybr I've also started using ngram type which allows you to train "N-grams". These are sequences of characters which are often grouped together. Those high rolls I was talking about earlier? N-grams are the sequences they refer to.

Finally I've also occasionally been using monkeytype which is more focused on leaderboards and good looks. A lot of keyboard influencers (they exist) use this to show off how well they can type or how good their keyboard sounds. I haven't found it particularly useful to learn new layouts with, but it's been fun to play with!

On QWERTY I can comfortably type around 90 words per minute (wpm). When learning Canary it took me a few days to get to 10 wpm (unusable), two weeks to get to 20wpm (better, but still unusable) and about a month to get to 40 wpm (usable but slow). I spent about 10 total hours in keybr, averaging about 30 mins of training a day. I have no sense for whether that's fast or slow, but I was positively surprised that I could rebuild 20 years of muscle memory in a matter of weeks, with a fairly modest time investment.

Using vim movements on a new layout

One thin I knew would be an issue and actually turned out to be an issue was editing code on a new layout. I use vim bindings in all of my editors, and vim motions are just part of me now. I asked Sy about how they switched over to a new layout when they did and deal with this, and well, they didn't. Good on them for not using vim bindings; sucks to be me.

This turned out to be a bit of a stumbling block: while I don't exclusively write code, I do still write a lot of it. And that means that I need to be able to move around an editor. I mean, I know there are other vim movements and I use those too. But heck, not being able to use the base vim motions to navigate? Yeah, I wasn't going to give that up.

I looked into changing key bindings in VS Code, and tried figuring out what others had done - and there didn't seem to be any good solutions. Except one: Miryoku.

Keyboard layers

One of the issues with QWERTY is that you move around your fingers a lot, which causes strain over time. Miryoku is one attempt to define a layout which minimizes the amount of movement your fingers need to make. It's based on two principles:

The way it achieves this is by defining an entire layout which can be accessed from the base position. The entire system is layer-based (modal), with each layer being accessible by pressing down a specific key with your thumb. Numbers, symbols, and navigation each get their own layer. And by putting the arrow keys on the position of the vim bindings, it makes it possible to restore vim-like navigation just by pressing down a single key. Here is what the neutral (base) layer looks like:

w l y p b     z f o u '      ¹esc   ⁴ret
c r s t g     m n e i a      ²spc   ⁵bsp
q j v d k     x h / , .      ³tab   ⁶del
    ¹ ² ³     ⁴ ⁵ ⁶

But once we press and hold the space key (key 2) with our thumb, we engage the navigation layer and the arrow keys become available to us. It's not quite the same position as with vim - but you can configure it that way if you like too. Here's what it looks like by default:

- - - - -     - - - - -
- - - - -     - ← ↓ ↑ →
- - - - -     - - - - -
    ◼︎ - -     - - -    

I thought this was neat and probably the right solution, but I wasn't sure how to engage the thumb keys on a regular keyboard. The space bar is in the way, and there is no thumb cluster for us to press. One solution is to shift your fingers one row up, and remap the keyboard to use the XQCBNM keys as our thumb keys. miryoku_kmonad is a software package for macOS and Linux which allows you to do exactly that. But I tried and failed to get that to work reliably (or well: I lacked the patience to finish debugging it), so I went to find a different solution.

Hardware

So far my plan was to keep using my existing hardware. I like my 60% Vortex Cypher keyboard, and I figured I'd start by switching keyboard layouts and see how far I could get. I tried that and got stuck after a while - so I figured I might as well commit to the bit and invest in hardware.

I ended up going picking up a pre-soldered Chocify keyboard from Beekeeb. This is a 36-key split keyboard which comes with Miryoku pre-installed. I got the bluetooth-based version with the screen which cost a little extra. I did make a mistake by choosing the "Choc Blue" switches which are different from Cherry MX blue switches, so I've got a new set of tactile switches coming in soon (Kaihl Sunset).

Custom keyboards are pretty involved, but well worth it. Some things I didn't know before I got started but had to learn on the way:

Picking up hardware was something I didn't want to do unless strictly necessary - but I think it was the right choice. I've recently also started experiencing shoulder pain after long typing sessions, and I've noticed that having a split ergo keyboard actually helps a lot with that too.

I'm fairly confident this little 36-key keyboard I have is going to become my new daily driver once I get the hang of it. And while that isn't the case yet, that moment is creeping up on me soon.

Learning a new keyboard layout (again)

Oh before I close out, it turns out that the Canary keyboard layout comes in two variants: staggered and ortho. I didn't realize the two were different, so I just pressed "canary" on keybr and started learning. It turns out that was the staggered layout:

w l y p k z x o u ; [ ] \
 c r s t b f n e i a '
  j v d g q m h / , .

On a 30% keyboard that layout ends up looking like this:

w l y p k     z x o u ; 
c r s t b     f n e i a
j v d g q     m h / , .

The layout the Canary authors designed for keyboards like this is the "ortho" layout which looks like this. It's very similar, but not the same:

w l y p b     z f o u '
c r s t g     m n e i a
q j v d k     x h / , .

Oops, I should have paid more attention before I got started. Though in all fairness: I did start learning Canary under the assumption I'd stick with my 60% staggered keyboard. So it makes sense I didn't immediately jump to the ortho layout. Though I probably should have thought to start learning the ortho layout as soon as I put in the hardware order - which was a few weeks ago now.

Conclusion

Now that I have my keyboard, have the firmware flashed and batteries installed, this is where I'm currently at in my journey: re-learning to type on the Canary Ortho layout. I think this is fine, because when switching to the Miryoku layout I need to re-learn where all the symbols are, so it's not like I can hit the ground running on my new keyboard anyway.

I'm still waiting on my new key switches to arrive which should make typing on my new keyboard a lot easier (45g rather than 20g actuation force - MX blues have 50g actuation). But I can already tell that Canary + Miryoku + Chocify causes a lot less strain on my hands than QWERTY does.

I'm not going to say that people should follow what I'm doing. I don't know your situation, and maybe just getting an ergo QWERTY keyboard or taking more breaks might be enough for your needs. But for me? I've really enjoyed going down the rabbit hole of learning a new keyboard layout, getting a new keyboard, and picking up various things along the way.

So has all of this solved my RSI issues? No - I'm not yet daily driving my new keyboard, so I'm not yet experiencing the benefits. But I can tell the difference in strain I experience when I switch to the split keyboard and new keyboard layout. Now that nearly everything is in place to switch over, I can't wait to start daily driving it. I'm definitely taking the most involved path to solving this, but I think that this might actually be the answer to fully fix the source of my injuries.

This post was a little break from my usual writing about type systems and language design. If you'd like to learn more about ergonomic keyboard layouts, I really enjoyed this talk by Mattia Dal Ben: 34 keys is all you need: an ergonomic keyboard journey.

a split keyboard on a table with an ipad. There is a bunch of colorful furniture in the background

Here's what my keyboard practice looked like this morning. I think it's cute.