/8vim_keyboard_layout_calculator

A python script to calculate the best possible layout for https://github.com/flide/8VIM/.

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

8vim_keyboard_layout_calculator

Usage

  1. Download this project or clone it:
git clone https://github.com/Glitchy-Tozier/8vim_keyboard_layout_calculator.git
  1. Add a bigram-file inside the folder bigram_dictionaries
  2. Open config.py and edit the config-parameters to match your language. The most important ones are:
    • BIGRAMS_CONFIGS
    • NR_OF_BEST_LAYOUTS (has a big impact on speed)
  3. Start the script:
    • (Install a recent version of Python)
    • Navigate to this project's root directory and run the script.

Recommended: Use pypy (needs to be installed)

pypy3 main.py

If for whatever reason you can't use pypy, to at least benefit from some speed improvement, open the config.py and enable USE_MULTIPROCESSING. Then start the script the regular way:

python3 main.py

Optional: For much faster execution times, the bottleneck functions have been rewritten in C. If you want to use them, follow these instructions.

Compatibility

Windows

cmd.exe does not support the ANSI escape codes by default though it should be able to be enabled since Windows 10 TH2 (v1511). This script was tested with Windows PowerShell successfully. If you are using pypy.exe you should set DISABLE_UNICODE = True in the config.py file.

Bigrams

Due to copyright-reasons, I won't add bigram-files to this repository. Please add them yourself. A great resource is this website. Read this for more information.

Future to-do's (PRs are welcome)

  • If on Windows, don't show results in Terminal. Instead log them to a results.txt file. This might prevent crashes when optimizing for non-ascii alphabets.