Sitemap
Goutham Yegappan

Goutham Yegappan

Whomever your mind conjures

The Keyboard

Written By Goutham Yegappan and Andrew Kornder

26 min readAug 24, 2024

--

The computer keyboard is an essential tool in our daily lives, with the most widely used layout, QWERTY, named after its first six letters, remaining unchanged since its inception in the 19th century.¹ As our reliance on digital communication grows, the need for a more efficient keyboard layout becomes increasingly apparent. Typing inefficiencies can lead to slower work rates, higher error rates, and an increased risk of repetitive strain injuries.² Given the advancements in our understanding of ergonomics and human-computer interaction, it is crucial to reevaluate the traditional QWERTY layout and explore more efficient alternatives.

In this study, we utilize a genetic algorithm to examine a vast number of potential keyboard layouts, aiming to identify designs that minimize finger movement and distribute typing effort more evenly across all fingers. By comparing the QWERTY layout with other established alternatives, such as Dvorak and Colemak, as well as a completely optimized layout generated through our algorithm, we aim to highlight the significant improvements that can be achieved through thoughtful redesign.

Our analysis reveals the stark inefficiencies of the QWERTY layout and demonstrates how alternative layouts can dramatically enhance typing speed, accuracy, and comfort. The findings underscore the potential benefits of transitioning to a more ergonomic keyboard design, one that aligns with modern typing needs and reduces the physical strain on users.

This research not only challenges the status quo but also provides a roadmap for future keyboard designs, emphasizing the importance of data-driven approaches in creating tools that better serve our digital lifestyles. It is time to move beyond tradition and adopt keyboard layouts that reflect the technological advancements and ergonomic insights of the 21st century.

The History of the Keyboard

The evolution of the keyboard is a testament to the technological advancements in communication over the last few centuries. Even though the first patent for a machine resembling a typewriter was given in the 18th century to Henry Mill, it wasn’t until the 19th century that practical typing devices began to emerge.³ In 1829, William Austin Burt patented the typographer, a precursor to the typewriter which used a dial instead of keys. In this model the circular frame was turned to bring the desired letter to the printing point from where the lever was pressed to push the letter against the paper.

Figure 1: Patent Number 8,980¹⁸

The significant breakthrough in the development of the keyboard came in 1868 when Christopher Latham Sholes, along with two colleagues, Carlos Glidden and Samuel Soule, invented the first practical mechanical typewriter.³ This invention revolutionized written communication by making it faster and more efficient than handwriting. However, the early mechanical typewriters faced a significant problem due to their underlying mechanism: each key was connected to a typebar or metal arm. When a typist pressed a key, the corresponding typebar would strike an ink-filled ribbon, which then transferred the character onto the paper behind it.

The design of the typewriter meant that the keys and typebars were closely packed together.⁴ Pressing two adjacent keys simultaneously or in rapid succession often caused the typebars to jam because there wasn’t enough space between them. This jamming interrupted the typist’s flow and efficiency, leading to frustration and slower typing speeds.

Figure 2: The Parts of a Typewriter¹⁹

To address this issue, Sholes had an ingenious idea. Instead of redesigning the typewriter to physically separate the keys further, he opted to make touch typing more challenging.⁴ He hypothesized that by placing the most commonly used letters in the English language as far apart as possible, the likelihood of jamming would be reduced. This counterintuitive approach aimed to prevent bar jamming by slowing down the typist. By forcing the typist to move their fingers greater distances between keystrokes, the typebars would have more time to return to their resting positions, thereby reducing the chances of collision and jamming.

This led to the development of the QWERTY layout, named after the first six letters on the top left of the keyboard, which was specifically designed to place frequently used letters in less accessible positions.

The strategic placements in the QWERTY layout include:

  • Common letter pairs: Letters that often appear together in English words, like ‘ER,’ ‘ON,’ and ‘AN,’ were placed in positions that required more finger movement.
  • Vowels and consonants: Vowels, which are used frequently, were spread out across the keyboard to avoid frequent clashes of typebars. For example, ‘A’ is on the left pinky finger, while ‘E,’ ‘I,’ and ‘O’ are positioned more centrally but still separated.
  • High-frequency letters: High-frequency consonants like ‘T’ and ’N’ were placed on opposite sides of the keyboard to reduce the likelihood of jams. ‘T’ is on the left hand and ’N’ on the right, creating a natural rhythm and reducing the chance of simultaneous keystrokes.
  • Common digraphs: Digraphs like ‘TH,’ ‘CH,’ and ‘SH’ were placed so that each letter of the pair was on opposite hands. For instance, ‘T’ and ‘H’ are on different sides of the keyboard to prevent jamming.
  • Punctuation and numbers: Less frequently used characters like punctuation marks and numbers were placed in the top row and corners of the keyboard, where they are less likely to interfere with the primary typing area.⁵

The introduction of the QWERTY layout significantly reduced jamming thus drastically improved typing efficiency.⁴ Over time, typists became proficient with the QWERTY layout, and it became the standard for typewriters. Remarkably, the QWERTY layout remains the most widely used keyboard layout today.

In the following century, the next big transformation came from the transition from mechanical to electric typewriters, marking a new era for keyboards. The invention of the IBM Selectric typewriter, introduced in 1961 with its revolutionary “golf ball” typing element, further reduced jamming and allowed for interchangeable fonts and characters. Unlike traditional typewriters that used individual typebars for each character, the Selectric’s spherical typing element moved across the page, rotating and tilting to the correct position to strike the ribbon and print the character. This ingenious design virtually eliminated the problem of jamming, as there were no typebars to collide. Additionally, the “golf ball” could be easily swapped out for another with a different font style or character set, allowing for unprecedented flexibility in typography.⁶

Press enter or click to view image in full size
Figure 3: The First Digital Typeface (1968)²⁰

With the advent of personal computers in the 1970s, keyboards underwent another transformation, becoming an integral part of the computing experience. Early computer keyboards were modeled after their electric typewriter predecessors but included additional keys for computing functions. The introduction of the IBM Personal Computer in 1981 further standardized the PC keyboard layout, incorporating function keys and a numeric keypad. Recent decades have seen innovations aimed at improving user comfort and adapting to new technologies.⁷

However, regardless of all these changes, the QWERTY layout’s reign has been intriguing as the reasons for its invention have now been eradicated, therefore no longer solving the problem of jamming.

Alternative Keyboard Layouts

While QWERTY remains the standard keyboard layout, alternative layouts like Dvorak and Colemak offer intriguing possibilities for increased efficiency and ergonomics. Both layouts were designed to address the inefficiencies of QWERTY, each with its unique approach and benefits.

Dvorak Simplified Keyboard

The Dvorak Simplified Keyboard, designed by Dr. August Dvorak and his brother-in-law, Dr. William Dealey, was patented in 1936 with the primary goal of enhancing typing efficiency and reducing finger movement. This layout strategically places all vowels on the left side of the home row and the most common consonants on the right side, which facilitates alternating hand movements when typing most words. This design minimizes finger strain and can potentially increase typing speed and accuracy.⁸

Press enter or click to view image in full size
Figure 4: The Dvorak Keyboard Layout⁸

The key layout features of the Dvorak keyboard are designed to maximize typing efficiency. The home row consists of the vowels (A, O, E, U, I) on the left hand and the most common consonants (D, H, T, N, S) on the right hand. The right hand handles the consonants, which are placed according to their frequency of use to reduce finger movement.

The key advantages of the Dvorak layout include reduced finger movement, and increased speed, using about 63% of the finger motion required by QWERTY. Commonly used letters are placed under the strongest fingers, and the most common letter pairs are positioned to minimize hand movement.

Despite its advantages, the Dvorak layout has not been widely adopted, mainly due to the dominance of QWERTY and the significant learning curve associated with switching layouts. The complete rearrangement of keys from QWERTY to Dvorak requires a substantial period of adjustment, which can deter many typists from making the change.

Colemak Layout

Introduced in 2006 by Shai Coleman, the Colemak layout seeks to balance typing efficiency with ease of learning, particularly for those accustomed to QWERTY. Unlike Dvorak, Colemak retains many of the QWERTY key positions, facilitating a smoother transition for users.⁹

Press enter or click to view image in full size
Figure 5: The Colemak Layout⁹

The Colemak layout retains 17 of the 26 QWERTY keys in their original positions, including A, R, S, T, D, and H, among others. By retaining many QWERTY key positions, Colemak makes it easier for QWERTY typists to adapt compared to the drastic changes required by Dvorak.

It places the most frequently used letters (A, R, S, T, D, H, N, E, I, O) in the home row, optimizing for efficiency. Colemak also addresses some of the ergonomic flaws of Dvorak, such as the placement of common letter pairs. For example, in Dvorak, the letters ‘L’ and ‘S’ are both typed with the pinky finger, which can be strenuous. Colemak resolves this by repositioning such pairs to more comfortable positions, encouraging a more balanced use of both hands and reducing strain.

While alternative layouts like Dvorak and Colemak present clear advantages in terms of efficiency and ergonomics, QWERTY’s historical prevalence and widespread adoption maintain its dominance.

Methodology

The Metrics

When defining the effectiveness of a keyboard layout, our primary focus is on reducing the amount of finger movement required. Our guiding principle is that the more a keyboard layout necessitates finger movement, the less efficient it is likely to be. Increased movement not only demands more physical effort but also tends to increase typing errors for the following reasons:

  1. Accuracy: Greater finger movement increases the likelihood of mistyping. When fingers have to travel longer distances, there’s a higher chance of landing on the wrong keys, leading to more frequent errors.¹⁰
  2. Speed: Excessive finger movement slows down typing speed. The time taken to move fingers from one key to another accumulates, reducing overall typing efficiency. Rapid typing relies on minimizing travel distance to maintain a smooth and swift rhythm.
  3. Fatigue: Increased finger movement contributes to quicker onset of fatigue. Typing involves repetitive motions, and when these motions require more effort, typists tire faster. Fatigued fingers are prone to making more mistakes and slowing down.
  4. Coordination: High finger movement demands better coordination and control. This can be particularly challenging for those who are not touch typists, as they have to visually track their fingers and keys, increasing the risk of errors.
  5. Ergonomics: Continuous extensive finger movement can lead to strain injuries. Efficient keyboard layouts are designed to distribute the workload evenly across all fingers, reducing the risk of repetitive strain injuries like carpal tunnel syndrome.¹¹

As we built out our metric we found that simply measuring how far each finger needs to travel to select certain keys does not tell the whole story. For instance, fingers that are more dexterous tend to have more strength and accuracy. Therefore, we wanted to weight the effort required to move a finger based on which finger was being used. Additionally, we sought to add complexity to our algorithm by incorporating a more accurate measurement of the effort required to move a finger to a new location.

Costlier Peripheral Finger Movements
We adjusted the weight of each movement to account for the differing abilities and strengths of each finger. For instance, movements involving the pinky, a weaker finger, are made more “expensive” in terms of effort compared to the stronger index finger. This adjustment acknowledges the varying dexterity and strength of each finger, allowing for a more accurate representation of the effort involved in typing. The values assigned to each finger based on their strength and dexterity are as follows:

Figure 6: Finger Weights

Logarithmic Distance Scaling
We also incorporated a concept from human-computer interaction called Fitts’s Law, which suggests that the time required to move to a target area, like a keyboard key, is proportional to the logarithm of the distance divided by the size of the target. This adjustment makes our simulation more sophisticated by varying the ‘cost’ of movements based on their distance and the involved finger’s dexterity. By applying a logarithmic scale to distance measurement, we can better predict the time it takes for fingers to travel between keys, thus more accurately modeling the typing process.¹²

In application, each value in our metric begins with calculating the linear distance from one key to another. For instance, the horizontal distance from the letters ‘a’ to ‘s’ is defined as 1 unit. We then apply Fitts’ Law by taking the logarithm of this distance plus one. Afterward, we weight this value according to the assigned finger weight to determine the score of the motion. By implementing these modifications, we created a metric that more closely models human movement to evaluate a keyboard’s efficiency.

Methodology

Genetic Algorithm

When searching for the optimal keyboard layout, it is computationally very expensive to test all possible configurations due to the sheer number of potential layouts. Specifically, with 30 keys (excluding the number row but including the 26 letters and the comma, period, question mark, and colon), there are approximately 2.65 x 10³² (30 factorial) possible layouts. Testing the effectiveness of each layout is computationally infeasible; therefore, we needed an efficient method to rule out inefficient keyboards while focusing on those that are more likely to perform well.

To achieve this, we implemented a genetic algorithm, a type of optimization algorithm inspired by the process of natural selection. This method simulates the evolutionary process of survival of the fittest, where the best solutions to a problem are “selected” to evolve into even better solutions over time. In our context, keyboards that performed well during testing phases were selected to ‘mate’ with other high-performing keyboards, thus creating the next generation of keyboards. The aim was to have these offspring keyboards perform better than the previous generation.¹³

We began with a diverse population of randomly generated keyboard layouts, which served as the base for our evolutionary process. Each keyboard layout was then evaluated using our metrics, which included measures of finger travel distance, finger strength, and the application of Fitts’s Law. These evaluations determined the fitness of each layout. The top-performing keyboards were selected as parents for the next generation, with higher-scoring layouts having a greater chance of being chosen.

The mating process involved creating a new keyboard layout from two parent keyboards. If both parent keyboards had the same letter in a specific position, that letter was directly inherited by the child for that spot. For positions where the letters did not match between the parents, one parent’s letter was randomly chosen to fill that position in the child layout. After assigning as many keys as possible any remaining unplaced keys were randomly assigned to the leftover positions. To introduce variability and avoid local optima, we randomly swapped a few keys around in each generation. This mutation step ensured that new keyboard layouts retained characteristics of their parent keyboards while potentially improving upon them.

This new generation of keyboards, created through crossover and mutation, replaced the previous generation. The process of evaluation, selection, crossover, and mutation was repeated for multiple generations. At the end of each generation, we stored the best and worst keyboards created. By averaging the performance of these keyboards, we could observe the gradual improvement over time. At the end of the each simulation, we stored the best performing keyboard we found, and ran the simulation again.

By repeating this process 20,000 times, we aimed to collect a wide range of efficient keyboards, eventually enabling us to focus on the most promising candidates and study the distribution of keyboard layouts. Throughout all of our trials we were able to score nearly two trillion keyboards.

The results from the genetic algorithm across three different simulations are presented below. On average, the optimal keyboard layout emerged by the 7th generation. This rapid convergence is primarily due to the similarity between parent layouts, which tends to produce offspring that are also very similar. As a result, each generation becomes increasingly homogeneous, ultimately leading to a single best keyboard consistently dominating in every generation.

Figure 7: Genetic Algorithm Results

Data Sources and Text Corpora

The evaluation of keyboards was grounded in an extensive analysis of large text corpora. Specifically, we utilized two primary datasets to score the keyboards:

Fineweb Dataset: This dataset comprises approximately 100 billion tokens (words), representing a vast and diverse collection of English text scraped from the web. The Fineweb dataset provides a broad and representative sample of contemporary language usage, ensuring that the keyboards are evaluated against a wide range of linguistic patterns.¹⁴

COCA Corpus (Corpus of Contemporary American English): This smaller dataset includes around 200 million tokens and is known for its balanced representation of various genres, including spoken language, fiction, magazines, newspapers, and academic texts. COCA adds an additional layer of linguistic diversity, complementing the broader web-based corpus.¹⁵

Together, these datasets account for approximately 500 billion characters of text, forming the foundation for training and evaluating the keyboards. The analysis focused on standard English characters, specifically the lowercase letters ‘a’ to ‘z’ and punctuation marks ‘,./;’. Other characters were disregarded, except when marking the beginning or end of words, to streamline the simulation process.

Each trial that we ran models the typing process by simulating the movement of fingers across the keyboard. For each character typed, the simulation calculates the movement of the corresponding finger to the required key, recording the total distance traveled by each finger. This approach allows us to quantify the physical effort required to type different characters and sequences.

Results

After running 20,000 simulations, we collected the best keyboard layout from each run. However, many of these were duplicates of layouts we had already encountered. By filtering out the duplicates, we narrowed it down to a total of 1,021 unique layouts. In the next section, we analyze the distribution of key placements to gain insight into the properties of an optimal keyboard.

Initial Observations

To begin, we aimed to understand the layout of the keyboard and identify which spots are the worst, and why, regardless of the keys they are matched with. To achieve this, we analyzed the average movement required for each spot on the keyboard, considering the weighting of the finger used to reach each key. The results are illustrated in the chart.

Figure 8: Keyboard Placement Scores

From the chart, it is evident that the home row is by far the best location for keys. This is because the fingers rest naturally on the home row, allowing them to be pressed efficiently and effectively.

Beyond the home row, the importance of finger weighting becomes clear. The two keys in the center of the home row (G and H on QWERTY) are particularly advantageous as they are horizontally close to the index fingers, which are the most dexterous fingers. The proximity and dexterity combine to make these positions highly efficient.

Conversely, the keys in the top left and right corners (Q and P) are the worst positions. These spots require the pinkie fingers to reach them, which are the weakest and most prone to error. The increased distance and reduced strength make these positions less optimal.

Two other interesting positions to note are where the ‘Y’ and ‘B’ keys are located on the QWERTY layout. These positions require the index fingers to travel the farthest, increasing the likelihood of errors and reducing typing efficiency.

Get Goutham Yegappan’s stories in your inbox

Join Medium for free to get updates from this writer.

From this placement distribution, we hypothesized that the least common letters will lie in the worst spots, while the most frequent letters would all place themselves on the home row. We also found that apart from the ‘Y’ and ‘B’ placements, the keyboard weights were all symmetrical even though each row is slightly offset. Due to this we hypothesized that most keys will not prefer a side. Therefore, if a key prefers a spot, for example, on the home row on the left side, this pattern will also continue on the right side.

Distributions

The distributions of the keys are shown below. The darker the green, the more keyboards had the letter in that position. Each spot with a letter indicates where that letter lies on the QWERTY layout. We only considered spaces where a key appeared more than 40 times (4%) out of the 1000 generated keyboards.

Figure 9: Distribution of Letters Across Best Keyboards

In examining the chart, it’s clear that certain positions are favored more than others for specific letters. For example, the letter ‘E’ is found in only five positions, all on the outer home row, significantly preferring the outer edges. In contrast, letters like ‘W’ are more sparsely distributed and tend to avoid the home row. Each letter follows a similar pattern, revealing larger trends in key placement. This distribution highlights significant patterns behind the selection of these spots. In the next section, we will break down these trends further to gain deeper insights into these patterns.

By Section

We began our analysis by examining whether there was a preference for key placement in our optimal keyboards by section. We defined three groupings: extremes, home row, and center. The center section represents all the keys controlled by the index fingers. The home row includes all keys where the user’s fingers rest while typing. The extremes cover all external keys managed by the other three fingers not on the home row.

Press enter or click to view image in full size
Figure 10: The Keyboard Sections

When analyzing the distribution, found in the table below, it becomes evident that the positioning by section across the best unique keyboards is not significantly varied. Only four letters — K, W, Y, and Z — appear in two different sections a significant proportion of the time. Apart from these four, the other 26 characters (including the period, comma, colon, and slash) showed strong preferences for specific areas of the keyboard. This consistent distribution pattern underscores the importance of strategic key placements.

Among these letters that showed strong preferences, it was most clear which ones should be on the home row: A, E, I, N, O, R, S, and T. Each of these letters appeared on the home row in 100% of the optimal keyboards. Notably, only two of these letters are positioned on the home row in the QWERTY layout. These letters are some of the most common in the English language. Placing them on the home row allows fingers to stay on the home row as much as possible, moving to other positions and returning back to the home row efficiently.

Figure 11: Distribution by Section

When analyzing punctuation and the least commonly used letters, such as J and Q, it becomes clear that the extreme sections contain the least frequently found characters. These sections are typically reserved for keys that are less critical to the efficiency of typing since reaching them requires more effort. However, one interesting observation is that the letter Z is found 63% of the time in the center section. This anomaly will be further discussed in the next section, as it highlights a unique trend in key placement.

In examining the center section, we find letters that are not as common as those on the home row but are more frequently used than the letters in the extreme sections. The center section, controlled by the index fingers, offers a balance between accessibility and effort. Letters placed here are somewhat less critical for rapid typing but still need to be within easy reach to maintain a smooth typing flow.

The strategic placement in the center section ensures that moderately common letters are positioned for accessibility without occupying the prime home row positions. For instance, letters like D, F, H, and L, which are moderately common, are typically found in the center section. This arrangement helps putting a heavier load on the most dexterous finger, the index finger.

Through these distributions we found that by placing frequently used letters on the home row, moderately used letters in the center, and the least used letters at the outer edges, the layout minimizes finger movement and maximizes efficiency. This method ensures that typists can maintain a steady rhythm without excessive stretching or movement.

When running this analysis while comparing the top and bottom rows, we find the results below.

Figure 12: Distribution by Row

When examining the distribution of letters in relation to the top and bottom rows, it becomes evident that most letters, apart from six that tend to stay on the home row, strongly prefer either the top or bottom row.

Across our keyboards ‘U’ is the letter that prefers either row the most. This is because ‘U’ is the most common letter that can’t fit on the home row due to space constraints. When analyzing the placement distribution diagram it is clear that the keys at the center of the keyboard are less optimal positions because the index fingers must overwork to cover them all. Given that ‘U’ is the 11th most common letter, placing it in the center would require excessive movement, leading to inefficiency. Therefore, ‘U’ primarily appears above the middle finger in the top row, where ‘I’ exists in the QWERTY layout. This position allows ‘U’ to remain in a relatively strong location while keeping the 6th most common letter, such as ‘T’ , directly beneath it. This reasoning also applies to the letter ‘G’, which alternates with ‘U’ for positions on either side of the middle finger.

Looking at the most common letters found on the bottom row, ‘M’ and ‘P’ are notable examples. Both are letters that fall in the middle of the pack in regards to frequency. Thus, they are important enough to not be relgated to the edges of the keyboard, while still not important enough to be on the home row or the top. ‘M’ and ‘P’ typically falls under the index finger.

The worst position on the entire keyboard, outside the edges, is where the letter ‘B’ is typically placed. In our optimal keyboard layouts, this spot is almost always taken by the letter ‘Z’, which explains why ‘Z’ tends to strongly skew towards the bottom row.

The general trend shows that the top row, offset from the home row by only 0.25 units, is preferred for more common letters. In contrast, the bottom row, offset by 0.5 units, tends to house less common letters.

Variance of Keys

The results from our examination of the variance in positioning by letter across all optimal keyboard layouts can be found below. A key insight from this analysis is the degree to which certain letters show variability in their placement. The variance value indicates how consistently a letter is positioned across different keyboards, with values closer to 1 representing more random distribution and values closer to 0 indicating a strong preference for specific positions.

Figure 13: Variance of Positioning by Letter

Letters such as W and the comma exhibit the highest variance, suggesting they are placed quite randomly across the keyboard layouts. Their distribution is widespread, indicating no strong preference for specific positions, even though they may have preferences for specific sections; this does not extend to their exact position within those sections. This could be due to their relatively lower frequency of usage compared to other letters, allowing more flexibility in their placement. Similarly, letters like B, J, V, A, Y, X, and S also show high variance, indicating that these letters do not have strong optimal positions and can be placed in various locations without significantly impacting typing efficiency.

Conversely, letters like N and U exhibit the least variance, indicating a strong preference for specific positions across all keyboards. These letters are more consistently placed in certain spots, likely due to their higher frequency and the necessity for them to be in more accessible locations. Other low variance letters, such as E, C, P, H, D, and R, also suggest that they have optimal positions that are consistently chosen to enhance typing efficiency.

These results highlight one consideration of which keys should be prioritized designing a new keyboard if trying to maintain some resemblance to QWERTY. By ensuring that low-variance, high-frequency letters are prioritized to be optimally placed can lead to the most significant enhancements of efficiency. High variance letters, which can occupy a wider range of positions, offer more flexibility in placement and can be adjusted around the more critical, low variance keys. This approach ensures that the most frequently used letters are always within easy reach, while less important keys do not interfere with the typing flow.

Our Best Keyboard

The best keyboard we were able to generate from all our simulations is presented below. Our findings thus far corroborate our hypothesis, which places the most common letters on the home row, the second most common letters on the top row, and the least common letters on the bottom row. The least frequent letters are pushed to the externalities, while the more moderately used letters occupy the center. In this optimized layout, only two letters align with the QWERTY layout: X and the comma button.

Press enter or click to view image in full size
Figure 14: Our Best Keyboard

When evaluating how this optimized keyboard scored on the metrics compared to others, we found the following results.

Figure 15: Score Comparisons Across Keyboards

We compared our optimized keyboard average movement results with four other layouts: Dvorak, Colemak, QWERTY, and an alphabetical keyboard that simply lays out the letters in order.

Among the keyboards tested, the QWERTY layout required the second highest amount of finger movement, averaging 0.51 units. Only the alphabetized keyboard, with its straightforward but inefficient sequential arrangement, performed worse than QWERTY. In contrast, our optimized keyboard outperformed all others, requiring just 0.24 units of movement on average. This represents a significant reduction, with the user’s fingers moving 53.6% less on our keyboard compared to QWERTY.

When comparing the frequency of the letters found on the home row for each layout, there are also significant discrepancies between QWERTY and our optimized keyboard. The QWERTY layout includes infrequently used letters such as ‘J’ and ‘;’ on the home row. As a result, the sum of all ten values on the home row accounts for only 32% of the letters found in our corpus. In contrast, both the Colemak layout and our optimized keyboard have home rows that encompass 70.8% of the most frequently used letters. This is because both layouts prioritize placing commonly used letters on the home row, although they are arranged in different orders.

Why Does QWERTY Suck?

To better understand the biggest inefficiencies of the QWERTY layout, we first needed to identify which keys are the least optimally placed. We did this by running our simulations again, this time locking each key in its current position to see the best keyboard we could generate with that constraint. We then compared the resulting scores to our optimal keyboard layout to determine which key was in the worst position. The results are shown below.

Figure 16: Worst Positioned Keys

The key ‘E’ emerges as the most poorly positioned, with a significant 20.1% increase in the metric score when locked in its current position in the top row. This indicates that ‘E,’ the most frequently used letter in the English language, is the single largest contributor to the inefficiencies of the QWERTY layout. Given its high frequency of use, ‘E’ should ideally be positioned on the home row to maximize typing efficiency.

Conversely, the next four letters contributing to QWERTY’s poor performance are problematic for the opposite reason: they occupy valuable positions on the home row despite being infrequently used. Letters like ‘;’ and ‘J’ are among the least commonly found in English texts and therefore should not be taking up prime real estate on the home row.

Interestingly, the analysis shows that the median score of the 30 letters was just 0.5%, suggesting that at least half of the keys are already near their optimal positions. The keys that are well-placed include:

'/', 'X', 'S', 'A', ',', 'Q', 'Z', 'W', 
'.', 'M', 'H', 'Y', 'V', 'C', 'B', and 'G'.

When designing a new keyboard layout, it would be prudent to retain these well-positioned keys to minimize the amount of change required for users. Instead, focus should be placed on repositioning the poorly placed keys, such as ‘E’ and those occupying the home row unnecessarily, to enhance overall typing efficiency.

Conclusion

Through our comprehensive analysis and simulations, it has become clear that the traditional QWERTY keyboard layout is far from optimal regarding typing efficiency and ergonomic comfort. Our examination highlighted significant inefficiencies, such as the poor placement of high-frequency letters like E, I, O, N, and T, which demand excessive finger movement and contribute to increased strain and reduced typing speed. These inefficiencies were further underscored by the fact that even an alphabetical layout outperformed QWERTY in terms of average finger movement.

What has become abundantly clear is that the QWERTY layout was designed for suboptimal performance. However, just because it has stuck as the tradition does not mean we should not change the keyboard. Our approximations suggest that if we were to adjust to a newer keyboard layout, our fingers would travel 53.7% less than on the current layout.

While our optimized keyboard layout considerably improves upon QWERTY, it is important to note that we did not prioritize similarity to the traditional layout. Consequently, our keyboard differs in 28 positions, making it much harder to become accustomed to for those already familiar with QWERTY. In this regard, the Colemak keyboard, which takes similarity into consideration, may be a better alternative for existing QWERTY users.

Our metric added complexity beyond simply measuring distance by incorporating finger weight and a more intricate distance formula using Fitts’s Law. However, there are many more layers of complexity that can be added to make the metric even closer to the way people type. One notable project is Michael Dickens’s MTGAP keyboard, which uses 12 additional factors to score particular movements, including the important aspect of rolling your fingers inwards as you type. Even though each unique metric will result in a different optimal keyboard layout, one thing that is consistently clear is that QWERTY scores extremely poorly.¹⁶

Press enter or click to view image in full size
Figure 17: MTGAP Metric

The Carpalx project by Martin Krzywinski introduces a metric that evaluates each triad of letters, offering a more nuanced approach to keyboard design. Many of the concepts in the Carpalx metric, such as rolling and jumping over rows, are also present in the MTGAP metric. Unsurprisingly, our keyboard performs better on our own metric than both Carpalx and MTGAP keyboards. Conversely, those keyboards outperform ours when evaluated against their respective metrics.¹⁷

This discrepancy highlights that each keyboard is optimized for a different objective, and comparing them using a single metric doesn’t accurately reflect their overall effectiveness. To truly assess which keyboard is the most comfortable to type on, the best approach is to try using them yourself. Additionally, there are numerous other keyboard layouts worth exploring beyond these two.

Another avenue for further research is customizing the keyboard layout based on a person’s profession. For example, Java programmers use the semicolon much more frequently than other typists, and thus their keyboard would look different from someone who writes medical research papers or plays video games. This customization could also extend to creating a keyboard for smartphones, where only two fingers are typically used. While our code has been developed to do this, we did not add this section for brevity.

Our project benefited from employing a genetic algorithm to explore a vast number of potential keyboard layouts. Instead of building the keyboard purely from theoretical principles, we were able to test our hypotheses against nearly 2 trillion keyboards. Furthermore, this research could be improved by combining the genetic algorithm approach with more complex metrics and testing various keyboard layouts where the keys themselves do not have to be in their traditional shapes.

We strongly believe that countless human hours could be saved if we collectively transitioned to a more efficient and ergonomic keyboard layout. The evidence overwhelmingly suggests that QWERTY is not the most effective design, and with the tools and knowledge at our disposal, we can and should seek better alternatives.

#GoodbyeQWERTY

Press enter or click to view image in full size
Figure 18: The Original Sholes Typewriter Patent²¹

Code

Genetic Algorithm: https://github.com/andrewkornder/keyboard-optimization
Visualizations: https://github.com/gouthamyegappan/Keyboard_Viz

Citations

  1. David, Paul A. “Clio and the Economics of QWERTY.” The American Economic Review, vol. 75, no. 2, 1985, pp. 332–337.
  2. Norman, Donald A. The Design of Everyday Things. Revised and Expanded Edition, Basic Books, 2013.
  3. Library of Congress. “Typewriter Production Began — March 1, 1873.” This Month in Business History, guides.loc.gov/this-month-in-business-history/march/typewriter-production-began. Accessed 20 Aug. 2024.
  4. Typesy. “How Keyboard Creators Came Up with the QWERTY Layout.” Typesy, 2023, www.typesy.com/how-keyboard-creators-came-up-with-the-qwerty-layout/. Accessed 20 Aug. 2024.
  5. Das Keyboard. “QWERTY vs. Dvorak vs. Colemak Keyboard Layouts.” Das Keyboard Blog, 10 Mar. 2020, www.daskeyboard.com/blog/qwerty-vs-dvorak-vs-colemak-keyboard-layouts/. Accessed 20 Aug. 2024.
  6. “IBM Archives: IBM Selectric Typewriter.” IBM, www.ibm.com/history/selectric. Accessed 20 Aug. 2024.
  7. Bellis, Mary. “The History of the Computer Keyboard.” ThoughtCo., 1 Dec. 2019, www.thoughtco.com/history-of-the-computer-keyboard-1991402. Accessed 20 Aug. 2024.
  8. Zannos, Alex. “December 12, 1936: Dvorak Keyboard Patented.” Day in Tech History, www.dayintechhistory.com/dith/12-1936-dvorak-keyboard-patented-2/. Accessed 20 Aug. 2024.
  9. 9. Shai, DreymaR. “Colemak FAQ.” Colemak, www.colemak.com/FAQ#What.27s_wrong_with_the_Dvorak_layout.3F. Accessed 20 Aug. 2024.
  10. Soukoreff, R. W., and I. S. MacKenzie. “Measuring Errors in Text Entry Tasks: An Application of the Levenshtein String Distance Statistic.” Extended Abstracts of CHI ’01. ACM, 2001, pp. 319–320.
  11. Hedge, Alan. “Ergonomic Workplace Design for Health, Wellness, and Productivity.” Ergonomics in Design: The Quarterly of Human Factors Applications, vol. 4, no. 3, 1996, pp. 16–22.
  12. Nielsen Norman Group. “Fitts’s Law: The Importance of Size and Distance in UI Design.” Nielsen Norman Group, 11 Nov. 2018, www.nngroup.com/articles/fitts-law/. Accessed 20 Aug. 2024.
  13. “Genetic Algorithms: A Practical Guide to Applications.” Baeldung, 2023, www.baeldung.com/cs/genetic-algorithms-applications. Accessed 20 Aug. 2024.
  14. Hugging Face. “FineWeb Dataset.” Hugging Face, 2023, huggingface.co/datasets/HuggingFaceFW/fineweb. Accessed 20 Aug. 2024.
  15. Davies, Mark. “Corpus of Contemporary American English (COCA) — Downloading Data.” English-Corpora.org, 2024, www.english-corpora.org/coca/help/download.asp. Accessed 20 Aug. 2024.
  16. “MTGAP Letter Layout (English, ANSI).” Keyboard Design, 2024, www.keyboard-design.com/letterlayout.html?layout=mtgap.en.ansi. Accessed 20 Aug. 2024.
  17. Krzywinski, Martin. “Carpalx — Keyboard Layout Optimization.” MK Labs, www.mk.bcgsc.ca/carpalx/. Accessed 20 Aug. 2024.

Images

18. Lemmens, Paul. “The Invention of the Typewriter.” The Typewriter Museum, 2003, www.typewriter.be/missinvention.htm. Accessed 20 Aug. 2024.

19. Polt, Richard. “Parts of the Typewriter.” The Classic Typewriter Page, 2024, site.xavier.edu/polt/typewriters/tw-parts.html. Accessed 20 Aug. 2024.

20. Art, Paul Robert. “Corona 3 Typewriter Mechanism.” Flickr, 16 Dec. 2016, www.flickr.com/photos/20994543@N04/31415699894. Accessed 20 Aug. 2024.

21. Delistraty, Cody. “Life Before QWERTY.” The Paris Review, 23 June 2014, www.theparisreview.org/blog/2014/06/23/life-before-qwerty/. Accessed 20 Aug. 2024.

--

--