Skip to content

Manoonchai/carpalx-th

Repository files navigation

Carpalx (Thai)

codecov

Keyboard Layout Optimizer for Thai layouts, in TypeScript

Why?

Carpalx does not support Thai language, which has around 60+ unique alphabets and without capitalized letters. So this is a Thai version of Carpalx, and also the extension which introduce typing effort model for shifted keys as well.

Ultimately, I will also use this to create my own Thai keyboard layout.

Usage

  • Calculate effort from layouts
yarn start
  • Optimize layout using Stochastic Optimization method
yarn optimize [layout_name] [output_file.txt]

Result

┌─────────┬───────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬────────────────────┬──────────┐
│ (index) │       name        │                                                                 efforts                                                                 │     effortSum      │  better  │
├─────────┼───────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────────────────┼──────────┤
│    0    │    'kedmanee'     │ 'thai5k : ~4.77, wisesight : ~4.43, wongnai : ~4.19, thaisumTestset : ~4.51, thaisum : ~4.50, sugreeTweets : ~4.53, thaiTweets : ~4.62' │ 31.55609610218203  │ '0.00%'  │
│    1    │   'pattachote'    │ 'thai5k : ~4.14, wisesight : ~3.81, wongnai : ~3.57, thaisumTestset : ~3.75, thaisum : ~3.70, sugreeTweets : ~3.82, thaiTweets : ~3.82' │ 26.611813771811285 │ '18.58%' │
│    2    │     'ikbaeb'      │ 'thai5k : ~3.90, wisesight : ~4.00, wongnai : ~3.53, thaisumTestset : ~3.64, thaisum : ~3.62, sugreeTweets : ~3.74, thaiTweets : ~3.66' │ 26.079912973959217 │ '21.00%' │
│    3    │ 'manoonchai_v01'  │ 'thai5k : ~3.61, wisesight : ~3.67, wongnai : ~3.14, thaisumTestset : ~3.31, thaisum : ~3.29, sugreeTweets : ~3.47, thaiTweets : ~3.46' │  23.9388401546314  │ '31.82%' │
│    4    │ 'manoonchai_v02'  │ 'thai5k : ~3.11, wisesight : ~3.41, wongnai : ~2.83, thaisumTestset : ~3.00, thaisum : ~2.98, sugreeTweets : ~3.24, thaiTweets : ~3.24' │ 21.800355169321442 │ '44.75%' │
│    5    │ 'manoonchai_v02b' │ 'thai5k : ~3.16, wisesight : ~3.45, wongnai : ~2.86, thaisumTestset : ~3.04, thaisum : ~3.02, sugreeTweets : ~3.29, thaiTweets : ~3.28' │ 22.102722562406974 │ '42.77%' │
│    6    │ 'manoonchai_v1'   │ 'thai5k : ~3.14, wisesight : ~3.44, wongnai : ~2.87, thaisumTestset : ~3.05, thaisum : ~3.02, sugreeTweets : ~3.26, thaiTweets : ~3.28' │ 22.066642355747785 │ '43.00%' │
└─────────┴───────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴────────────────────┴──────────┘

Features

  • Thai layout support, with Kedmanee & Pattachote
  • Shifted keys typing effort model
  • Generate layout from randomized data
    • Greedy search for best effort
    • Locked keys (No swapping)
    • Simulated annealing
  • Layout preview on browser
    • Preview with data from optimizer
    • Effort calculation API
    • Deploy
    • Drag & drop keys to swap
    • Calculate effort from custom text input
  • Adjustable parameters (eg. Dominant hand, pinky penalty weight, etc.)
  • Ortholinear-layout support (eg. Planck, Ergodox)
  • Generate usable keyboard layout (Use tool like klfc)

Triads Datasets

References

Releases

No releases published

Packages

No packages published