Your any contributions are welcome! Adding keyboard, fixing bug, updating document, adding test and creating new feature, etc.
- Getting code
- Creating feature branch from develop
- If you want to add a new keyboard
- Adding keymapviz/keyboards/keyboard_name/__init__.py
- Adding keymapviz/keyboards/keyboard_name/layout_editor/default.json
- Fixing keymapviz/__init__.py
- Fixing keymapviz/README.md
- Run
- Committing & push your code and
- Create pull request
$ git clone https://github.com/yskoht/keymapviz.git
$ cd keymapviz
$ git switch -c feature/nice-branch-name origin/develop # please replace :)
Branch 'feature/nice-branch-name' set up to track remote branch 'develop' from 'origin'.
Switched to a new branch 'feature/nice-branch-name'
$ git branch
* feature/nice-branch-name
master
You need to add two new files. (Replace keyboard_name with the name of the keyboard you want to add.)
- keymapviz/keyboards/keyboard_name/__init__.py
- keymapviz/keyboards/keyboard_name/layout_editor/default.json
And fix two files.
- keymapviz/__init__.py
- keymapviz/README.md
Define three variables in this file. keymap_keyword
, layout_editor_json
and ascii_art
.
(fancy_ascii_art
is optional.)
keymap_keyword
: The regular expression for the macro keywords used to define the keymap inkeymap.c
of qmk.layout_editor_json
: The path tolayout_editor.json
file.ascii_art
: ASCII art.{}
is replaced by a key legend. If you want to place the key legend in a desired location, you need to write the key index in the bracket. Please refer to these files.
Download json of your keyboard from http://www.keyboard-layout-editor.com/ and replace legend with {number}
. Please refer to the file.
Add keyboard.
...
import keymapviz.keyboards.kinesis
import keymapviz.keyboards.helix
import keymapviz.keyboards.mint60
+import keymapviz.keyboards.keyboard_name # Here
...
KEYBOARDS = {
...
+ 'mint60': keymapviz.keyboards.mint60, # Add comma
+ 'keyboard_name': keymapviz.keyboards.keyboard_name # Here
}
Add keyboard.
...
- [kinesis](https://github.com/qmk/qmk_firmware/tree/master/keyboards/kinesis)
- [lets_split](https://github.com/qmk/qmk_firmware/tree/master/keyboards/lets_split)
- [mint60](https://github.com/qmk/qmk_firmware/tree/master/keyboards/mint60)
+- [keyboard_name](https://github.com/qmk/qmk_firmware/tree/master/keyboards/keyboard_name) # Here
Install keymapviz
on your PC and make sure it works properly.
$ pip install setuptools
$ python setup.py sdist # build
$ pip install dist/*.tar.gz # install
$ keymapviz -v # You can use your own keymapviz.
$ git add -A
$ git commit -m 'nice commit message' # please replace :)
$ git push -u origin feature/nice-branch-name # please replace :)
Create the pull request on github for yskoht/keymapviz
develop
branch.