This project provides tools for analyzing the efficiency and ease-of-use of alternative keyboard layouts. The analysis is done according to a set of criteria including (i) the relationship between the position of each key and the frequency with which it is typed, and (ii) the frequency of awkward combinations of keys, most notably same-finger bigrams.
A well-designed keyboard layout should have the most frequently typed keys in easy-to-reach positions, and should avoid frequent awkward hand and/or finger stretches. To allow smooth and comfortable typing, it should also avoid situations where frequent combinations of keys are made unduly difficult to type. At the risk of stating the obvious, the standard "Qwerty" keyboard performs badly in these kinds of tests. However, by following these principles of sound ergonomic design, it possible to create keyboard layouts which require less finger strain and are more comfortable to use. This program allows alternative layouts to be compared and studied.
The model used is defined in more detail at http://colemakmods.github.io/mod-dh/compare.html, where you can also see the results produced for a variety of layouts. Using this code you can reproduce those results, or, by adjusting the parameters of the model, generate your own results. You can also try creating and testing out your own arbitrary layouts.
If you want to use this code to analyze layouts but would rather avoid compiling the code, then use this online version of the app: http://colemakmods.github.io/mod-dh/analyze.html
If you want to know more about the letter frequency distrubution statistics used by this analyzer, take a look at this page describing the frequency data.
The project contains two modules: "keyboard" and "keyboard-web"
This module is the main Java app. You can use this to:
(i) analyze various keyboard layouts and generate typing efficiency results
(ii) compare the ease-of-learning (switching difficulty) of various layouts, using this scheme
(iii) generate a letter and bigram frequencies for a given input text (corpus)
The app is built using gradle.
- Ensure you have a recent JDK (recommended version 8+) installed.
cd keyboard
../gradlew jar
- If compiling was successful, you should have generated a file
keyboard/build/libs/analyzer.jar
.
If compiling was successful, you should be run the provided scripts:
keyboard_analysis
is the main script for analyzing layouts. Run without arguments for Usage details.
keyboard_analysis_all
will run the analysis on all the keyboard layouts defined in the resources
directory. The results will be written to the output
directory.
keyboard_compare
will compare a layout (i.e. changes) against a base layout, usually Qwerty, in order to estimate the learning difficulty. Run without arguments for Usage details.
keyboard_compare_all
will run the comparison tool on all the keyboard layouts defined in the resources
directory. The results will be written to the output
directory.
freq_analysis
will generate the character and bigram frequencies for an input text corpus. This can in turn be used by the keyboard_analysis tool if you want results based on an alternative corpus, e.g. for a foreign language.
The resources
folder contains all the input files which are used by the analysis model:
-
A list of alternative keyboard layouts in
resources/layout/*.keyb
. -
Letter and bigram frequency tables in
resources/freq/*
. -
Keyboard configuration items, defining penalties and finger assignments in
resources/config/*
. See here for detailed explanation.
You probably can ignore this module, it is only for generating the layout analyzer's web interface.
The module is build using gradle, and uses TeaVM to generate the JavaScript parts.
- Ensure you have a recent JDK (recommended version 8+) installed.
- Ensure you have maven installed.
cd keyboard-web
- copy the resource files
./prepare-resources.sh
../gradlew webapp
- If compiling was successful, you should have the generated web files in
keyboard-web/build/webapp