- This is a python script to calculate the best possible layout for https://github.com/flide/8VIM/.
- For an explanation of how optimization works, check out
explanation.md - The discussion regarding this program can be found here: 8VIM/8VIM#138
- Download this project or clone it:
git clone https://github.com/Glitchy-Tozier/8vim_keyboard_layout_calculator.git- Add a bigram-file inside the folder
bigram_dictionaries - Open
config.pyand edit the config-parameters to match your language. The most important ones are:BIGRAMS_CONFIGSNR_OF_BEST_LAYOUTS(has a big impact on speed)
- 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.pyIf 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.pyOptional: For much faster execution times, the bottleneck functions have been rewritten in C. If you want to use them, follow these instructions.
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.
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.
- If on Windows, don't show results in Terminal. Instead log them to a
results.txtfile. This might prevent crashes when optimizing for non-ascii alphabets.