A keyboard layout optimizer supporting multiple layers. Implemented in Rust. https://dariogoetz.github.io/keyboard_layout_optimizer/
Find a file
2024-11-04 00:05:01 +01:00
.cargo [add] missing newline at end of file 2022-03-22 14:42:49 +01:00
.github/workflows [mod] move to fly.io instead of heroku.com 2022-11-24 10:31:08 +01:00
config cleanup and docs 2024-11-04 00:05:01 +01:00
keyboard_layout cleanup and docs 2024-11-04 00:05:01 +01:00
keyboard_layout_optimizer Sval keyboard stuff 2024-10-25 22:59:48 +02:00
layout_evaluation cleanup and docs 2024-11-04 00:05:01 +01:00
layout_optimization cleanup and docs 2024-11-04 00:05:01 +01:00
ngrams Added ngrams for action script source code 2024-01-21 00:43:03 +01:00
scripts [add] script to normalize ngrams 2023-10-27 11:12:41 +02:00
webui fix: family slice positions 2023-11-21 22:25:37 +01:00
.dockerignore [add] dockerignore 2022-12-04 09:20:08 +01:00
.gitignore [mod] add newline to .gitignore 2022-03-17 11:51:09 +01:00
.gitmodules [mod] remove rocket submodule 2022-05-10 23:11:02 +02:00
Cargo.toml [del] remove abc optimization 2023-03-26 09:03:49 +02:00
english-words-30000.csv [add] kla word metrics 2022-11-15 21:17:41 +01:00
fly.toml [fix] add ansi to fly config 2023-11-21 22:21:59 +01:00
LICENSE Create LICENSE 2021-11-04 11:24:46 +00:00
Procfile [mod] move webui crates into webui dir 2022-01-19 21:21:12 +01:00
README.md cleanup and docs 2024-11-04 00:05:01 +01:00
rust-toolchain [add] rust-toolchain file 2021-11-08 17:22:41 +01:00
RustConfig [fix] update RustConfig 2022-01-19 21:57:14 +01:00

Keyboard Layout Optimizer

Forked from dariogoetz/keyboard_layout_optimizer to add support for the sval keyboard.

Evaluating a layout

To evaluate a layout, you run a command like this:

cargo watch -x 'run  --bin evaluate -- --layout-config config/keyboard/sval.yml --exclude-chars " 0123456789=(){}[]" "q0a1z w2sbx e3dtc r4fgv uhj5m iyk67 onl89 p={}(["'

It's a bit annoying, but the way to fill in extra spaces which don't use an alpha key, is to use these chars: 0123456789=(){}[], you can see above I've used them in the qwerty layout string.

Optimizing a new layout

To optimize a new layout, you run a command like this:

cargo watch -x 'run  --bin optimize_genetic -- --layout-config config/keyboard/sval.yml --exclude-chars " 0123456789=(){}[]" "q0a1z w2sbx e3dtc r4fgv uhj5m iyk67 onl89 p={}(["'

You need an initial layout, although in practice it doesn't really matter, unless the initial layout is very close to optimal.

Modifying for personal use

There are a number of places where I've made assumptions that may not be true for everyone.

The first place is in the key costs in the Svalboard keyboard file. Check them out, you may have totally different values. I generally love center and south, don't love inward as much, then north, then last of all is outward (except pinky and index).

There's also the finger repeats metric. It's got a bunch of different ways to measure the cost of a single-finger bigram, with assumptions like:

  1. Center-south rolls are nice
  2. Center-inward rolls are nice-ish
  3. Most other rolls are bad
  4. Inward-outward or outward-inward rolls are very bad
  5. etc

There's also the scissoring metric. Basically it just tests if you're going north on one finger then south on the other. You may care more or less about this than I do.

Finally there's the finger movement metric. This measures the difficulty of switching between fingers on the same hand. The specific values can be tweaked in the default optimization values file.