The Keyboard Optimization Rabbit Hole
Presented by: Tom Lianza , Nick Zylstra
Originally aired on June 4, 2022 @ 12:30 PM - 1:00 PM EDT
Have you ever thought... I spend a lot of time at a keyboard, how could I make the experience more comfortable and efficient? A Cloudflare engineer shares their journey down the rabbit hole of keyboard customization.
English
Transcript (Beta)
Hello, my name is Tom Lianza and this is Nick and he is going to teach us a bit about what rabbit hole he went down in the world of keyboard optimization.
I'm an engineering director at Cloudflare.
I've been here about five years. I've been an engineer for a very long time and I never really went down this rabbit hole.
So I'm really interested to hear about Nick's experience.
I have exactly one keyboard thing that I program that I guess I could share at the end.
But the rest of it, just over my career, I'd switched to operating systems and programming languages so many times I never optimized or I never felt like I could optimize my my keyboard setup.
But yeah, Nick, introduce yourself and take it from here. Yeah, thanks, Tom. My name is Nick Zylstra.
I've been in the cloud for only about three months. So pretty recent.
And I've worked as an engineer for over 11, 12 years. But the first 10 and a half years of that was in a different industry, engineering, energy and buildings.
I did use a computer quite a lot. But software is more of a recent thing for me.
But early last summer, I had a good reason to go down this rabbit hole. And I learned a lot.
And I want to be able to share what I learned with some people in case they get value out of it.
So I've got a deck here of information to share. And hopefully Tom will interrupt me a few times so I don't talk too much.
And we'll go from here.
Anything else, Tom, before we get started? No, let's let's do it. All right.
So I am calling this the keyboard optimization rabbit hole. Because not everything down here is worth it.
But it's all pretty interesting. So things I'd like to share a brief history of keyboards in general that I discovered briefly why I care about this topic and how I ended up doing all this research.
Things you might want to consider if you're considering optimizing your keyboard.
And then the bulk of it is basically how deep and wide is this rabbit hole and things you might want to explore while you're down there.
So to start it off, where do keyboards come from?
The first keyboard came about in the late 1800s by an engineer in Kenosha, Wisconsin, quite near where I grew up, actually.
There's a Remington model number two, a few years later, was the first typewriter to come up with the QWERTY layout.
And contrary to today, when they designed where those keys should go, it was pretty much all based on mechanical constraints, not at all about what letters might be good next to each other.
And when I say mechanical constraints, it was, if you look over on this picture here, each of those keys is mechanically connected to a bar, which is connected to a pad that hits a sheet of paper.
And if you push two keys next to each other, there's a good chance those two bars might get stuck as they both turn into paper at the same time.
So my understanding from what I read in various sources, was that a lot of design was focused on not hitting two keys in a row, that might interfere with each other.
So jumping from one side to the other was ideal. And then also reading about this, the quote at one point said the design was finalized by the Remington mechanics.
And the concept of a mechanic finalizing the design for a keyboard sounds a little funny today, but that was the reality back then.
That's wild. So success in part is measured by how infrequently humans while using this collide their keys like the ideal layout is, is while watching someone use this thing, they're not jamming to neighboring keys.
Yeah, that was one of the design constraints back when they first came up with this.
So that the four kind of grids there were a couple of the original concepts people were throwing around back then, as they landed on QWERTY, which is the bottom left.
And one of the interesting things I noted in one of the first few iterations, which like the top right one there, is they didn't have the number one, or the number zero in there.
Because at the time, it was just assumed you would use the letter O and the letter I.
And it's just substitute for this. So interesting thing to discover. So that's how all this started.
And it has evolved today to modern keyboards and such. And like mainly just to due to it being the thing that everybody knows, aka the network effect QWERTY is hung around is what everybody still uses for the most part and is the most popular designs.
So next topic here is why do I care?
So last summer, cleared up a little bit here.
Or I guess last spring, I had made the choice that I was going to switch from engineering, energy and buildings to engineering software.
And along with that came a bunch of self study to increase my software engineering skills, which in turn to turn into me basically doubling my computer use time was probably averaging like 50 hours a week related to work.
And I turned every spare hour of the day into sitting at the computer, writing code and figuring things out.
And after about two months of that, my hand started to hurt. And I was like, well, this isn't good.
I'm gonna go spend a lot more time with the computer.
I need to figure this out. And fortunately, at the time, I had plenty of free time.
And I was like, well, I'm gonna go dive into this and spend some time to figure out how I can best make my computer experience as comfortable as possible and as maximized as possible.
So this picture here, in case you're wondering, was after my first visit to the hand therapist.
And that is a battery powered muscle stimulation device to relieve inflammation in the tendon coming from my thumb, which was unhappy from using the thumb based trackball too much.
Wow, yeah, it's funny, or scary.
Like, it's similar to a major league pitcher and throw out your arm and your career's in danger with with software.
Your hands and wrists are just critical to your, you know, profession.
So critical that makes sense that you care a bit.
And this would be pretty alarming. Yeah, yeah. When it when it first started happening, I was like, full on panic for like a month until I saw a therapist a few times to a bunch of research and got systems sorted out.
It's like, all right, I can handle this.
We'll take care of this. And then that number of hours there. I was, as at that time, I would be 33.
I was like, I wonder how much time I spent the computer.
And I only first got a computer when I was six. And between that and playing video games, I came up with like, somewhere between 50 and 70,000 hours in front of the screen, typing or doing something similar for about 30 years, which is an awful lot.
And I probably have another chunk of that, hopefully less in the rest of my life.
So I guess it's worth it for me at least to spend some time on this and go deep down the rabbit hole.
So that is high level why I care.
So a couple things before you want to optimize anything really decide what you're going to optimize for what's important.
So generally, for keyboard use, people talk about ergonomics.
And ergonomics, per definition is a study of people's efficiency in the working environment.
So what that means to me when using a keyboard, and you can kind of lump in the mouse with it, because they're mixed together, basically perform every action that I want to do on the computer that minimizes discomfort and physical effort.
So for computer use, it's like, can I move my finger less?
Can I move my arm less, as far as minimizing effort, and then something I'll get into a little bit more.
Basically, maximizing fuel to the things you're using, you can almost look at it, it's like you're an athlete, and your hands need to be in good shape.
So you want to maximize blood flow to the working body parts while you're doing that.
And there's a handful of things that can help with that.
So the other piece of optimization is, I'll go up to the high level and just kind of talk about what helped me.
And then the rest of the presentation is really going to be around the last bullet point here, which is good tools.
But what helped me dealing with the discomfort for anybody who's wondering out there was just a combination of four things.
It's regular movement during the day.
I have a calendar at the top of every hour, just for myself, that marks my time, it's free.
So like I get up and at least put my desk and scanning motor and move. That way, I'm not too sedentary.
Regular exercise, especially grippy things. I had to get a pull up bar since I can't go to the gym anymore due to COVID.
It's something that I can do grippy exercises that really gets blood flowing.
And then the one that was most surprising to me and was quite a perspective shift was what I'm clumping as mentally therapeutic activities.
A lot of people whose blogs I read who have encountered similar issues.
And the referencing this guy named Dr. John Sarno, who throws out the perspective that your body can manifest unexpressed emotions as physical discomfort, which seemed totally well to me, and it's probably totally well for a lot of people in the world.
But what I took out of it is express my emotions, and I just journal every night.
And I was doing that along with these other things.
And they all coincided with getting much better, much faster.
And if anything, journaling every day just makes me feel good. So I like doing that, too.
So those are the three things in addition to optimizing the physical tools were all things I have read to making myself be happier and more comfortable using the computer.
And the tools piece is definitely not the main piece.
I think those other pieces are just as important or more than this. And this is kind of the fun piece, especially for engineers who like to go down these kind of things.
So as far as when you talk about optimizing a keyboard and its layout, I came up with six categories in all the research I did.
And I defined them as the physical key grid layout.
So the size of your keys, where they're actually situated on the keyboard.
And as you'll see in a bit, there's a lot of different ways to do that.
If you haven't explored that, it's pretty entertaining how many keyboards there are out there.
And then once you have that, there is where are the actual alphanumeric letters and numbers and such in that layout.
There's a lot of fun in there that I'll talk about.
And then another aspect is programmability. Is your keyboard just a piece of hardware that you can't change it at all?
Or is it something that the software is completely open source and you can do anything you want with it.
And then there are the physical key switches. So the mechanical or mechanical electrical device that tells the computer that you get a key.
There's a lot of variety in those two.
So sitting under that key cap on your laptop or wherever there's a bunch of there's some little hardware in there that tells the keyboard that you hit the key.
And then something called feedback, which may be lights or vibration or anything that tells you the user that you've done something or something's going on.
And then connectivity, which is wired or wireless, there's not a lot going on there.
The two most helpful and interesting, to me, towards the end of comfort, are programmability and physical key grid layout.
And I'll get into those a little bit more. And the rest are kind of just fun to nerd out on, I think.
So, so physical key grid, I've got a few slides here.
So there's within physical key grid, there's a handful of categories in here, you may see people talk about it on the Internet, people market to.
And I think, to me, the most valuable and beneficial one is a split paths.
So splitting your keyboard in two pieces so that you have at least a few inches gap that ideally, maybe three or four between the two so you can open up your shoulders.
One of the benefits of that, that, according to one of the hand therapists I saw last summer, is you have people have good sized arteries and veins running down the fronts of their shoulders.
And when you slouch forward, you compress those a little bit, the blood flow isn't as good to your arms.
And when you open up your shoulders, you improve blood flow.
I haven't confirmed that with anatomy or a doctor myself, but that was according to a hand therapist who seems to know what she's talking about.
So and it makes sense, you know, you stretch, you get movement around.
So splitting the keyboard allows you to open up your shoulders and anything along that line, I've tried to optimize for.
And then there's a concept of key wells, you'll see over on the right here.
This is a one handed multron keyboard. And this is one like the first keyboards that really expressed kind of crazy things you could do.
And you notice that there's a well on the left side so that your hand can kind of comfortably rest over and your fingers dangle into it and can push the keys without your hand really having to move and your fingers can kind of just go along their arc and have equidistant to be each key.
So that's the concept of a well. And that's true, even for those keys on the top, like you got that's the idea.
Yeah. So like your, your middle joint here stays when you have access to all these different keys that just that are the same distance away.
Then there's a concept of tempting.
So like a normal keyboard is flat. If it's tempted, it's angled both ways.
And that also helps you open up your shoulders. And then people talk about negative and positive tilt.
So if it's negative, the keyboard is tilted away from you.
And if it's positive, it's tilted towards you. When it's tilted towards you, people end up bending their wrists, which isn't great for a long term.
And if it's negative, just a little bit.
A lot of people end up having the wrist straighter, which can help out with discomfort in my experience.
And then another thing you'll hear thrown around is ortho linear or columnar, which instead of keys being staggered, the rows, columnar is each row of keys is in a column.
So that when you reach straight up, you hit another key and you're not necessarily confused.
So you need to go left or right.
And ortho linear is just a straight grid. So you may hear those terms thrown around.
And then another thing is basically aligning the rows to the length of your fingers.
So you can't see very well on this side, but you might.
So you've got four fingers here, you might offset the pinky row of keys, like by half a key, since that finger is shorter, so it's easier to reach.
I can show the other ones.
And then a really interesting thing here you can see is thumb keys.
So instead of just hitting the spacebar, the thumb can hit 10 different keys on this keyboard here.
So just a brief stint through keyboards I've used.
I started out with like a late 1980s IBM on a computer my dad built.
For a lot of years I used keyboards like these because I thought they were cool in my bedroom in college and stuff like that, which are very flat.
And about 10 years ago using like one of these Logitech ones are just a flat one.
This is when I first started experiencing wrist pain and discomfort, and it led me to start exploring some of these.
I used a trackball and a Microsoft Sculpt for a long time.
Those are both great. I still think the Microsoft Sculpt is a pretty good one, if you want a simple, comfortable keyboard.
And then last summer I went through a whole bunch of point and devices, which was entertaining.
When my right thumb started hurting, I switched to the left and then that one started hurting a bit because it wasn't ready for all the use and went back and forth for a while.
And then before I got to what I'm using now, I tried out both of these, which these are both pretty great.
It was my first experience using mechanical keyboard.
But I was going all the way down the rabbit hole and these weren't quite everything I could possibly imagine.
So I didn't end up sticking with these. The Ergodox was really great.
I couldn't reach the thumb clusters very well, though. I think my hands are just not quite big enough for it, but it was pretty cool.
And this is what I'm using today that has been uncomfortable for quite a while.
And I'll get into why I like these.
The keycaps themselves have a little bit of a will built into them because each one is customized individually.
It's fully programmable.
And I can take the halves apart and tent it and split it however I want.
So this has been working for me as far as physical. So this is what I landed on for that.
What's going on with that one key? Looks like it would be at the foot of your hand.
Yeah, I'll talk about that. It's basically a way to access another layer of keys.
So I can hit that with the palm of my hand here and all the keys turn into different keys.
I'll show you a few slides here. So I talked about the physical part.
The next piece that one can optimize is where the keys actually sit on that physical keyboard.
And this one, I found the most interesting just from an engineering perspective and solving problems and iterating on things.
So I think most people probably heard of QWERTY.
And then probably a lot of people heard of Dvorak.
And as you go down this list, you get more and more obscure names that are on blogs or may just be on the blog.
And there's a couple of ones more out there.
These are some of the more popular -ish ones that I've heard about there.
So an interesting thing I found about these was that the last set there, they're more recent, and people use algorithms to generate them.
And that whole process I found really interesting, and I'll talk about some details.
But a lot of them use what's called an evolutionary algorithm, which I hadn't heard of, but are you familiar with that, Tom?
I'm familiar with the...
I've never sort of written one or used one, but I'm familiar with the concept.
Okay, but it's basically... It's about killing off, losing solutions so that the winners sort of evolve, like a...
Yeah, you create a population of keyboard layouts, and you make them compete.
And the winners get to reproduce, and the losers leave the population, and you just run that for an amount of time.
And then you may run it again with a different randomness to start it off and see which layouts survive.
So a lot of people have done a lot of those evolutionary competitions.
And then when they run those, what really impacts it are three things.
Basically, what you feed that algorithm, how you score where the physical keys are, how hard they are to reach, what content you feed it, what typing traits that you like.
So it can be a very personalized thing. So just to explain what those are, here's a keyboard and how somebody might score how hard it is to reach each key, lower scores being better.
So the home row, the main three ones are the easiest.
Your pinky is one of your weaker fingers, so it gets a little bit of a penalty.
And then like the letter B there is far and you have to move your hand a lot so that gets a higher score.
And then whatever physical layout you're working with, you could score them however you want to represent what you think of it.
This is one aspect that would feed into that. And then the other important aspect is what are you typing all day?
If you're typing novels all day, that's going to be a much different result than if you're typing in code, or if you're typing Slack messages and emails.
So ideally, you feed a mix representative of what kind of work you want to do.
And also make sure it's your language. If you're going to type in Spanish all day, it's not going to help to optimize for English.
Then the last thing, what are metrics or actions that you find enjoyable on a keyboard?
And so there's a lot of people that I come up with with different actions.
And I'll point out a couple, the ones that I like, or I found enjoyable. But just to point out the first one, base is like, are you hitting it with the homeroom?
And the next one, same finger, you'll penalize the layout. If you push one key and the next key you have to hit, you have to do the same finger, because that requires you to move your hand.
Alternating your hand means you're likely to go from back and forth between your hands to spread the load.
And then one that I found most interesting that a lot of people who do this talk about is something they like, is what's called a roll in.
So if you look at my hands, so say you have two or three keys to press in a row.
If they allow you to start from one of your outer fingers and go to the inner ones, you can use your the weight of your arm to push them.
And that's called a roll in. And people talk about it being rhythmic and enjoyable.
And the layout I have is a fair amount of that. And now that I'm proficient at it, it is kind of enjoyable compared to just the inquiry feels like just kind of randomly spasming my fingers.
And then some of the other ones, people that are negative, like a pinky ring twist, which would be your pinky ring finger trying to reach down to a bottom row and get something.
So these are different metrics they have when they're evaluating the text that's flowing through the algorithm and scoring things.
And there's some links here that people have huge blog posts on these that are really interesting.
So all that, for me, led to this.
So I tried to take the best of what I found people already did out there.
I don't want to write an algorithm or do that myself, because people have done that a lot already.
So I found one that I'm most related to called empty gap, which is somebody who's writing software and was feeding a mix and talked about traits that I related to, and came up with this layout.
But I mirrored it because I wanted my left and right hand switch because I want to mix a few things different.
And then I changed a bunch of the keys kind of around the outside, such as enter and page down on the rights and lefts to handle the physical form factor in my keyboard.
A couple interesting things I'll point out, you were talking about, what are those palm things do?
So anything you see in purple, when you hold down the palm key, that's how you access it.
So I've got like the Vim arrows there. And on the left side, I can move the mouse around.
And I've got the scroll left, scroll right, scroll up, down.
And then those W keys are actually warped. You can warp the mouse to the corner or quadrant of the screen, just kind of cool way to move the mouse around.
I use that stuff maybe 10% of time, I still use the mouse for the most part, because I've quite shifted that.
It is fun to use sometimes. On the terms of like optimizing keyboard, another one of my favorite things about this is when you have a fully open source set of firmware, you can program it to do a lot of things.
And so anything that's on the base of a key, those black ones, if the key is held down for longer than 200 milliseconds, that's what the key does instead of whatever else it says.
So on the home row, I have all the modifiers. So I can hold down the letter T there.
And then now I'm suddenly have a command for my next key I want to use.
So I don't actually end up using any of the command or options that are down on the thumbs, I use pretty much only the homeroom ones, which makes it really easy to not move your hands much.
Access a lot of things really quickly, which is probably one of my favorite things about this.
Wow, does that say command L GUI?
Is that a thing people would know? Yeah. The way to describe a command in a more generalized term is L GUI.
And that would describe the Windows key in Windows, for example, when I was putting this together, I was using Windows computer for work.
And I had this Mac on the side. So it's often back and forth.
And that was a more generalized way to do it. And then you can program macros in here, too.
So holding down B cuts a line. So instead of having to remember the shortcut in your text editor and your email and everywhere, I can use that universally across anything.
So whatever line I'm in, it'll select the whole thing and copy it to the clipboard.
So lots of little ones like that. And So as far as programmability in general, there's a fair amount of firmware that goes directly into keyboard.
And if you don't want to buy a fancy keyboard, there's software out there to program your keyboard pretty extensively without a special keyboard.
On Mac OS, there's something called ukulele, which if you want to play around with, that's fun to work with.
And then Windows actually has a built in keyboard customizer.
And then these sets of firmware here are The first three are all open source, but there's some bigger ones supporting a lot of the fancy keyboards out there.
QMK supports like the ErgoDox, which is a really popular one.
Kaleidoscope is what my keyboard manufacturer uses. UHK is for one called Ultimate Hacking Keyboard, which is high up there and ones that seem useful to me.
And over here on the right is what some of my firmware might look like. And it's referring to like the play pause button for music or muting.
And then you can see what the code representing my primary key layer might look like.
So you have all your HID keypress codes.
So sitting in here, you define a whole bunch of layers like this throughout the code to express it and then you upload it into your keyboard.
And then down there on the bottom is that a cut line macro I was talking about triggering the very GUI and shift keys and untriggering them.
And one of the last things that people love to talk about online, but I think their mechanical keyboards, they feel nicer.
I'm not sure if it helps at all, other than it just feels nice, but there's a whole bunch of options out there.
Some of the most popular ones you might encounter are Cherry.
They're the original ones and then there's some some clones that have come up with their patent expired a few years ago.
Since we're almost running out of time here, just show you real quick what feedback can look like from a light's perspective.
This brings up the numpad so I can tap that and now my numpad goes away.
So without having a separate numpad, I can just hit a key and engage a set of keys to make a numpad and then I get visual feedback that that's actually happening.
That's incredible. That was definitely a rabbit hole.
So looking at that, I think that I know we have only two minutes left.
The number one and two questions I have is one, if someone's going to go down this rabbit hole, how long should they expect to sort of re -think how they do something that's currently in development?
Is it intuitive? And then secondly, how painful is it for you to use someone else's laptop for a minute?
So I went like the maximum pain I think and it was there was a month of about 10 minutes every morning using a typing tutor and then going back to QWERTY and then a month of like less than 50 words per minute and then probably another two or three months of less than 90 words per minute and now I'm pretty close back to where I was before of learning a new layout.
If you want to make it simple, a lot of people recommend use ColMac, ModDH or ColMac.
It only changes I think like 13 or 14 characters, but moves a lot of the common ones onto the home row.
So there's less for you to relearn, but you get a lot of the benefit of getting stuff on the home row and it introduces the roles concept a lot.
So that's kind of the quick answer to that.
What was the second question? Oh, if you borrow somebody's laptop or you...
Oh, you're screwed. Thanks, Nick. It was super interesting too.
I knew very little of that. Thanks for teaching. Yes, a pleasure.