Amar Sagoo

7 May 2008

The science of keyboard design

The Handbook of Human–Computer Interaction, edited by Martin Helander, Thomas Landauer and Prasad Prabhu, is a book published in 1997 that attempts to summarise research relevant to the design of interactive software and hardware. Its 62 chapters fill 1500 pages and provide advice on a multitude of topics, covering analysis, design and evaluation of interactive systems, as well as the psychological and ergonomic underpinnings of human–computer interaction. One of those chapters is titled Keys and Keyboards and was written by James Lewis, Kathleen Potosnak and Regis Magyar. It considers virtually every imaginable factor involved in designing keyboards, and, by drawing from experimental studies, provides recommendations for each of them. Ever since I read this chapter a couple of years ago, I've been meaning to summarise some of their conclusions and to consider them in the context of modern keyboard design. The recent string of keyboard-related links on Daring Fireball (e.g. here, here, here, here, here and here) moved me to finally sit down and do it, so here it is.

Clickiness

One of the most-cited criteria for keyboard aficionados to prefer a certain keyboard over another is “clickiness”. The idea behind this is that a good keyboard should give you some tactile feedback when you've successfully “actuated” a key, and that you shouldn't have to depress the key all the way to the bottom to be sure, as this would not allow you to type very fast. Some keyboards don't click at all, some give a softer and others a sharper click. The exact behaviour can be described by a graph plotting how the physical force required to push the key varies along its way down and its way up. The sudden dip in force on the downstroke is where you will feel the “click”.

Graph showing force versus travel distance

I have to agree with many others that the Apple Extended Keyboard II is the finest keyboard I have used in terms of key feel. I used it for a couple of years in the late 90s, and it was the first to even make me aware of how good a keyboard could feel. I have not found a match since. In 2004 I bought a Matias TactilePro, which supposedly uses the exact same mechanical switches as the Apple Extended Keyboard II. However, it seemed to require more force, wasn't as smooth and seemed more noisy. Keys also kept failing, so I eventually gave up on it and now use a Macally icekey, which uses scissor-switch keys like those found on a laptop, but feels a bit firmer. I have also been quite impressed with a standard HP keyboard that I use at work. It uses rubber dome switches, which usually have a much inferior feel to mechanical or scissor switches, but they are square rather than round, which seems to give it an acute but soft clickiness and a very pleasant overall feel.

Hysteresis

I already mentioned that the key actuates when the click happens, but when should it deactuate? The obvious choice would be to make it the same as the actuation point:

Actuation and deactuation points on force graph

However, this behaviour leads to an unexpected problem: any tiny amount of vibration around the actuation point can mean that the switch briefly fluctuates between the open and closed states, causing, for example, a letter to be inserted twice on one key press. To avoid this happening, keys should have to return some way (0.25–1.5 mm) before deactuating. This distance is called hysteresis:

Hysteresis shown on force graph

Astonishingly, plenty of modern keyboards seem to have no hysteresis built into their switches. I get duplicated letters more than occasionally when typing on my Macally icekey or on my G4 iBook. The MacBooks don't seem to use hysteresis either. I haven't had a chance to test one of the new aluminium Apple keyboards or a MacBook Pro for this.

Travel and force

Another common factor mentioned when assessing keyboards is the distance the keys travel. Laptop keyboards and laptop-like keyboards tend to have shorter travel than most desktop keyboards. Related to travel is the amount of force required to depress a key. The Handbook of HCI recommends key travel to be between 1.3 and 6.4 mm, and the key force to be between 28 and 142 g. These are rather wide ranges, and in fact experiments showed that users are not too fussed about these two variables and will simply adapt their typing behaviour accordingly.

Keyboard profile

Flat, dished and stepped keyboard profiles

The book chapter summarises the results of two studies looking into keyboard profiles. The dished profile seemed to narrowly come out on top, with higher throughput than the stepped profile in one study. The flat profile performed worst (ahem), with more errors going undetected by typists and with lower throughput.

Key shape

The vast majority of keyboards have key caps that are either concave or dished. Apple however, has started giving their keyboards flat keys. Unfortunately, the book doesn't give any recommendations in this regard. However, I have my own little theory about this. I think that key shape matters because the direction at which you strike a key is rarely perfectly parallel with the key's travel path. Most of the force you apply may go into moving the key down, but the rest will go into pushing the key sideways and into pushing your finger along the surface. The less force goes into moving your finger sideways, the more force goes into the key. A concave key cap directs more of the force into the key when you strike it an angle, which effectively increases the area that you can comfortably use to depress the key.

As I said, this is purely a theory, and I have no evidence that the key cap shape actually makes any difference. I haven't spent enough time on one of the newer Apple keyboards to really form an opinion about them.

Other factors

Some of the other factors to consider in keyboard design are tilt, key size and key spacing.

All users in the studies referred to preferred having some tilt rather than a completely horizontal keyboard. 50% preferred an angle between 15˚ and 25˚. Not surprisingly, the preferred angle correlates with the seat height and with the user's stature.

Keys should be no less than 19 mm apart, as more tightly spaced keys tend to slow users down. There were no conclusive results on key size, but the ANSI standard recommends a size of 12 mm × 12 mm.

Final thoughts

Clearly, a fair amount of work, time and research funding went into this topic, especially during the years when computers were less of a commodity and still more of a research topic. The work successfully produced empirical evidence that led to very concrete and specific recommendations for the design of keyboards. Even so, today's keyboard makers seem either oblivious or ignorant of all this latent wisdom. Given that we're talking about a device that millions of people have to physically interact with on a daily basis – in many cases for several solid hours – it is sad that we've kept repeating the same mistakes that we've had the potential to avoid for more than twenty years.

32 comments:

  1. "A concave key cap directs more of the force into the key when you strike it an angle."

    I do not think that makes sense. A slanted, more vertical surface makes it easier to apply horizontal force without slipping your finger from the key.

    I would guess that the use of slightly concave keys is more a matter of one or more of the following:
    - preventing the finger from slipping from the key if horizontal force is applied.
    - providing tactile feedback that the fingers are in the center of the keys on the home row.
    - providing feedback about off-center hits during a key press, with the user using this to correct the direction of the force.

    ReplyDelete
  2. I quite liked the Mattias and the IBM Model M but settled on the DAS Keyboard II which uses very nice Cherry MX switches for a great feel - there are other keyboards available with this switch too.

    [)amien

    ReplyDelete
  3. I've been a Model M aficionado for many years, but I quite like the new Apple keyboards to the point of shelving my Model M at work. (My coworkers' ears are grateful).

    My guess is that the appeal is the combination of very short travel with a "solid" feel not typical in laptop keyboards, and the spacing between keys.

    ReplyDelete
  4. It's quite fascinating to see how much thought goes into the physical design of a keyboard, when the whole industry is still stuck with a 100 year old clumsy layout.

    It feels like keyboard design is trying to make this broken layout more comfortable while the real improvement would be a new one (e.g. Colemak).

    ReplyDelete
  5. Seems like there is also the issue of how far your fingers need to travel. I love the new Apple keyboards because my fingers don't have to move very far to press the keys. My old keyboard had larger, concave keys that I had to lift my fingers farther up to strike. This resulted in pain in my hands that totally went away with the new Apple keyboard.

    Man, I sure did make a lot of typos typing this comment...maybe this keyboard does suck.

    ReplyDelete
  6. Great article! I have the first Apple Bluetooth Keyboard (the white one), and it does a pretty good job on these metrics (dished profile, slightly concave keys, soft but present clickiness).

    One thing I've noticed is that they handle the hysteresis in an interesting way -- I don't think there is any, but it feels like there is. The reason it feels like it is that the actuation point is actually slightly further to the right on your graph, such that if you very carefully push the key down, you can feel it give way before any keystroke is actually detected. A very small further distance is required to actuate the key, so that last little distance happens sort of as a bounce with regular typing. When you press down, the sudden giving way at the click-point means you hit the actuation point, but then travel back at least to the very end of the click-point and therefore off the actuation sensor.

    Question: does any of the research talk about different weighting of keys to correspond to the different fingers used? That is, should the force required for the "a" (pinky finger) be less than the "d" (middle finger)?

    ReplyDelete
  7. "Keys should be no less than 19 mm apart, as more tightly spaced keys tend to slow users down. There were no conclusive results on key size, but the ANSI standard recommends a size of 12 mm × 12 mm."

    Did you mean 1.9 mm here? I have a hard time believing that the key spacing should be larger than the keys themselves.

    Thank you for posting all of this.

    ReplyDelete
  8. Dominic:
    Unfortunately it's one of those things that have become so widely used that any radical change is doomed to failure. Language is another example: all languages have their own frustrating and unnecessary little complexities (for example gender in objects), but changing them is a hopeless endeavour. Likewise, we're probably stuck with the keyboard as it is, until perhaps a completely different, superior text input paradigm comes along.

    Bob Warwick:
    19mm refers to the centre-to-centre distance between keys, not to the gap between them. I should have worded this better.

    ReplyDelete
  9. I'm one of the keyboard people DF linked to, as I posted a review of the Unicomp Customizer, which is a modern version of the Model M. I'm interested to learn that there's a term— hysteresis—for the phenomenon that I and others have seemed to notice more generally in the form of keys being more "accurate" and the like. This and the "flat key" issue might also explain why I much prefer desktop to laptop keyboards.

    As for the Tactile Pro, my biggest problem with it was the "shadow key" problem, and the second version (which I wrote about here) suffers from that as well as other design flaws.

    Thanks for writing this.

    ReplyDelete
  10. "Keys should be no less than 19 mm apart, as more tightly spaced keys tend to slow users down. There were no conclusive results on key size, but the ANSI standard recommends a size of 12 mm × 12 mm."

    Did you mean 1.9 mm here? I have a hard time believing that the key spacing should be larger than the keys themselves.


    I think they mean 19 mm spacing, as measured from the centre of one key to the centre of the next key. That seems to be exactly the spacing on the keyboard that came with my new iMac.

    ReplyDelete
  11. @Amar

    Thanks for clearing that up for me.

    ReplyDelete
  12. It is disappointing that you don't even mention the most retrograde aspect of the modern keyboard, which is the physical placement of the keys.

    I don't think many people type on hammer-based typewriters anymore. Yet we still use an arrangement that is based exclusively on the need to have the hammers side by side on a single row. An arrangement that ignores completely the shape of the hands and the lengths of the fingers, that forces asymmetrical movement of the fingers (if P is to the left of ;, how is it that Q is also to the left of A?) and that leaves keys on no man's hand (6, B).

    Even split keyboards (e.g. Microsoft's 'Ergonomic') continue to use the same staggered rows. What's the point? Take a look at the Kinesis Advantage —that should be the default key alignment for the main key set of the typical keyboard.

    ReplyDelete
  13. and that you shouldn't have to depress the key all the way to the bottom to be sure, as this would not allow you to type very fast.

    This isn't the reason I've heard. When the activation point is at the bottom of the stroke, users ended up pressing the keys with a much higher force (more tiring, more damaging etc.) Very early membrane keyboards were made this way, with pretty poor performance. The PC-Jr keyboard might have been an example. There were muscle force experiments in the mid-90s that confirmed this. The force exerted by test subjects was around 4x if I'm remembering correctly.

    ReplyDelete
  14. Keytronic Keyboards are great!

    MODEL # DESIGNER-P2 (PS2 Cable)

    KEYBOARD SKIN P/N # VIEW SEAL EURO-C

    Mechanical Data:
    Life -- 30 million keystrokes
    Tot. travel -- .150" +/- .010" @100g
    Travel to peak -- .050" +/- .010"
    Peak force -- 2.0 oz +/- .4oz
    Fire point -- .110" nominal
    Reset force -- .5oz

    http://www.keytronicems.com/home/shop/shop.asp?h_ck=T22E17

    ReplyDelete
  15. I suspect only people who don't type correctly prefer tilted keyboards. If you rest your elbows or palms on the table, your hands are slanted upwards and the keyboard needs to be tilted to be level with your hands. If, however, your posture is "correct", your hands will be level with the table, and thus, tilted keyboards will force your hands into an unnatural position.

    ReplyDelete
  16. What about the placement of the numeric keypad making your mouse arm stretch in an unnatural way? The trend seems to be be for bigger and bigger keyboards so that right-handers have no room on their desk for a mouse.

    A4Tech makes some keyboards with the keypad on the left, but I can't find anywhere in the UK that sells them. Instead I got one of their keyboards without a keypad. It fits better on the desk, but the keys don't feel that good to type.

    ReplyDelete
  17. I agree that the Apple Extended Keyboard II had the best key feel. I also found that it had the best angle and keycap spacing of any keyboard I've ever used. I used it on my modern Macs with an ADB-to-USB adapter until the adapter caused kernel panics under Leopard.

    I would gladly pay $125 for a modern-day USB replacement for "The Nimitz", and I'll bet I'm not alone.

    ReplyDelete
  18. All good points, however, I'm surprised no one has brought up key positioning. It always stuck me as odd that we've stuck to a layout *designed* to be inneficient after all these years. Apple should promote and sell Dvorak keyboard layouts out of the box. They could give the idea enough PR to spread though the industry. I'd make the switch.

    ReplyDelete
  19. A minor point in favor of flat vs. dished keys would be ease of cleaning. If the difference in ease of use is slight to trivial, that (in addition to presumably less expensive manufacture?) would tilt the scales toward "flat"

    ReplyDelete
  20. I maintain that a keyboard very similar to Microsoft's natural ergonomic 4000 but with scissor switches (a la laptop keyboards and the new Apple keyboard) would be excellent.

    4000: http://www.microsoft.com/hardware/mouseandkeyboard/productdetails.aspx?pid=043

    ReplyDelete
  21. Please stop using the word "theory" incorrectly. If you have no evidence to back what you say, at best you're stating a hypothesis. Still more appropriate would be "guess."

    ReplyDelete
  22. Designer Geek:
    FYI, I'm using an Apple Extended Keyboard and Griffin iMate ADB to USB adaptor on my 1.42 Ghz G4 Dual Processor MDD PowerMac, running 10.5.3.

    No kernal panics, nor any other problems.

    ReplyDelete
  23. I've gotta agree with our anonymous friend above. I own the same model he links to -- the Lifetime Series "Designer" -- and brought it my government job after failing for days to get comfortable with the frankly unusable Dell keyboard they'd assigned me.

    The key travel is longer than some people like, and it clatters like an old fashioned typewriter, but that's fine with me... plenty of good positive feedback. I suppose the folks in adjacent cubes may disagree, but no one's complained.

    Otherwise, the only keyboard i've ever truly loved is the one on my now aged Powerbook G4 (the aluminum kind). Short travel, but very nice feel. The awful things they've put on the MacBooks kept me from buying one (whereas funds have kept me from getting a new MB Pro). Those silly square keys, with no side taper and little to no concavity are impossible. If you hit them anywhere other than dead center, the whole key tilts, with all the obvious problems that causes. One of my very least favorite keyboards.

    Only those mushy, no feedback types (like the aforementioned Dell, which rots in a drawer) cause me more headaches. Or handaches, I guess.

    ReplyDelete
  24. Very nice post Amar!

    I'm with Adam Cohen-Rose, in that the numeric keypad positioning is the elephant in the corner.

    I think the study you cite just covered typing ... problem being I am not just a typist. I can spend almost equal time using the mouse (usually at the same time as typing one-handed). Every time my right hand has to travel over that numeric keypad to reach the mouse I groan!

    In a more grumpy moment, I blogged about this and had wild thoughts about starting a global campaign for change!!

    ReplyDelete
  25. Maxlugar says:

    The King of Keyboards is the IBM Model F 84-key PC AT keyboard. In my opinion, it represents the pinnacle of American PC keyboard engineering design, user ergonomics, and quality.

    The crisp tactile response and on-center feel is superior to any other PC keyboard, even the mighty (and venerable) IBM Model M keyboard.

    It is a misconception that the IBM Model M keyboard was designed to feel like the IBM Selectric typewriter. The key travel, key stop and tactile response of the Model F keyboards is closer to the feel of the Selectric typewriter than the Model M.

    I have acquired five of these 84-key PC AT keyboards and have a hard time typing on any other keyboard.

    The build quality is second to none. There was a great deal of engineering effort that went into the design of Model F capacitive contact keyboards.

    IBM replaced the Model F capacitive contact keyboards originally bundled with the IBM PC, XT, and AT with the Model M membrane keyboard to reduce costs, not because of superior engineering design.

    The IBM Model F keyboards could never be produced again. The large number of components required for a mechanical keyboard and assembly labor costs would be prohibitive...even if produced in China.

    If you like loud buckling spring keyboards, find yourself an IBM PC AT 84 key keyboard, engineered and made in the good old USA.
    It's worth the effort to get used to the 84 key layout vs. the standard 101 key layout. Touch typists will see their speed significantly increase and RSI will be virtually non-existent.

    ReplyDelete
  26. I've recently acquired a new MacBook Pro with the square keys and flat keyboard layout.

    I now find my Microsoft Ergo 4000 to be ... "quaint."

    I have _zero_ errors typing on the MBP keyboard. I've already made six typing this on my ergo.

    The square keys allow errant fingers to just slip off the side, instead of applying a torque to the key plunger.

    The flat layout results in substantially less wrist stress.

    About the only thing that would make it better would be a Dvorak layout. However, I'm too lazy to switch, because of the improvements I've experienced already.

    You can slam Apple's design all you want. Maybe they're not right for you. But it's VERY right for me.

    ReplyDelete
  27. Mentioned IBM PC AT 84 key keyboard is very good in my expirience, too. It's worth of trying.

    ReplyDelete
  28. Hand Systems made me a lovely DVORAKable conversion with about 0 travel and audio feedback I liked; and it was of course also a mouse. I was going to ask about Te eSports Challenger Prime (we can fake Cadillac faking Mercedes...with keys) but it isn't concave either.

    Time for a keyboard with second displays for context and glyph-building with dial-able audio feedback...not quite a Canon WordTank so much as a headless mode RTL LTR exercise band, another display for stats or userland, haptic feedback, analog biquaternion per hand for overall force, and the nice multilingual RSI warning built in. Projection, P70 reels for recharging and dictionaries on the premium models. The super-premium one lets you throw and print ceramics through the platen...comes with an inbox and outbox and some kiln pads.

    ReplyDelete
  29. Amar. Please see the link below, and let us know if you would like to demo a keyboard model. We appear to fit all of your wishlist

    ReplyDelete
  30. hi Amar

    do you have any recommendations for a keyboard? For the purposes of touch typing without me feeling like i'm banking on a 1920s keyboard. i feel as if i'm playing a piano, it's so painful.

    ReplyDelete
  31. I grew up with a Remington Typewriter progressing to Apple II in middle school then IBM Selectric and IBM PC in high school. So I really like tactile feel for typing and long heavy keys are not a problem.For typing the Cherry Browns are about as good as it gets. I can see why some might like linear switches like Cherry Red's for gaming.Right now I have a 12-15 year old Acer on my desktop. I have two IBM's and a Systemmax that are insanely old in the garage. I grew up gaming with tactile keyboards so I can roll either way for gaming and it does not matter to me. Uncorrected I can type 235 words a minute so I do not see where any given switch design makes much difference over all since no one stops to make correction at the time of the typo those days are gone. This assumes we are talking about either tactile or linear switches and not rubber dome, membrane or other designs. I think it is more about what your preference is. I had to slow down growing up due to buffer over runs! Before buffer over runs the mechanical nature of the keys and the actuation of the lever with the type face on it limited you. If you typed to fast the lever/keys would jam together. Once you did not have any real mechanical connection and memory became cheap and plentiful there where no real limits on how fast you could actually type. Prior to laptops being so common I think a lot of people where rather picky about the keyboard they used but compared to a laptop keyboard almost everything is GREAT!!! If you are primarily touch typing it is hard to beat the Cherry Brown keyboard switch in any decent keyboard design not designed for gaming. Back-light is nice but not anything trashy and trendy like RGB just a soft white/yellow glow.Red light as long as it is not too bright is also fine and it does not destroy your night vision either. Blue light is harsh on your eye's, disturbs your ability to sleep deeply and is to electronics what metallic flake paint is to rednecks with bass boats! Blue LED's where cool in the 1990's when they where invented but now they just look trashy!

    ReplyDelete
  32. Loved this blog post, thanks!
    I used those old IBM mechs in the distant past, had a love-hate relationship with the sound, but boy those were good typing days.

    I recently caved and bought a mech again, one of the only options for split-separable keyboards - a Kinesis Edge RGB with Cherry MX Blues. Wow, love the old-school mechanical click feel and sound. However, I noticed that the release point was very distant from the actuation point. Googling this, found out that this is called "hysteresis" and came across your blog.

    I hadn't thought about the fact that if there is no hysteresis, you run the risk of accidental repeats. I do wonder though, if you could design a switch with no hysteresis physically, but still maintain hysteresis functionally. This may be an impossibility, I don't know.

    At the end of the day, I don't game, so the Blues should be fine for me. I was just hoping for being able to type a wee bit faster if the hysteresis was smaller/non-existent, but don't think it'll be an issue in the long run.

    By the way, with the advantage of many years of having used the Apple "chiclet" keys since your original post, it's interesting to note that Apple went back to concave keys in their more recent Macbook Pros. I think the concave helps direct the force downward, like you say. I am not a huge fan of the first gen flat keys on their laptops or Magic Keyboards, but the latest gen scissor keys with the concave caps feel almost mechanical-"ish." They're not bad at all.

    ReplyDelete