From 5b71883c301706e8731553485503e7b83ff1cabb Mon Sep 17 00:00:00 2001 From: yearski <39842469+yearski@users.noreply.github.com> Date: Thu, 16 Dec 2021 10:15:05 -0700 Subject: [PATCH 01/34] use encoding utf-8 to read keymap.c (#64) --- keymapviz/keymapviz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keymapviz/keymapviz.py b/keymapviz/keymapviz.py index d38199c..934dc12 100755 --- a/keymapviz/keymapviz.py +++ b/keymapviz/keymapviz.py @@ -40,7 +40,7 @@ def parse_arg(): parser.add_argument('-r', '--replace', action='store_true', help='replace comment block including "[keymapviz]" with ascii art. (make *.bac)') parser.add_argument('-t', '--type', dest='type_', type=str, choices=types, default=types[0], help='type of output(default:ascii)') parser.add_argument('-v', '--version', action='version', version='%(prog)s {}'.format(VERSION)) - parser.add_argument('keymap_c', type=argparse.FileType('r'), help='keymap.c file name') + parser.add_argument('keymap_c', type=argparse.FileType('r', encoding='utf-8'), help='keymap.c file name') arg = parser.parse_args() From 4e44d83153d4726f66f547839bf7546d5b2a345a Mon Sep 17 00:00:00 2001 From: Yusuke Ohta <34795067+yskoht@users.noreply.github.com> Date: Thu, 23 Dec 2021 00:38:26 +0900 Subject: [PATCH 02/34] fix test (#66) --- test/expect/kinesis.c | 2 +- test/expect/kinesis_0.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/expect/kinesis.c b/test/expect/kinesis.c index bc440c5..969e9b6 100644 --- a/test/expect/kinesis.c +++ b/test/expect/kinesis.c @@ -1,5 +1,5 @@ /* ,---------------------------------------------------------------------------------------------------------------------------------. - * | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PSCR | SLCK | PAUS | FN0 |RESET | + * | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PSCR | SLCK | PAUS | |RESET | * |--------+------+------+------+------+------+-----------------------------------------+------+------+------+------+------+--------| * | EQL | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | MINS | * |--------+------+------+------+------+------| +------+------+------+------+------+--------| diff --git a/test/expect/kinesis_0.json b/test/expect/kinesis_0.json index 9da0d3a..d505525 100644 --- a/test/expect/kinesis_0.json +++ b/test/expect/kinesis_0.json @@ -102,7 +102,7 @@ "w": 0.675, "h": 0.85 }, - "FN0", + "", { "x": 0.07499999999999929, "w": 0.675, From 2e925c74d44228a14c1af7a5bb43f29ace905beb Mon Sep 17 00:00:00 2001 From: yskoht Date: Thu, 23 Dec 2021 00:40:43 +0900 Subject: [PATCH 03/34] Update version --- keymapviz/keymapviz.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keymapviz/keymapviz.py b/keymapviz/keymapviz.py index 934dc12..0c996df 100755 --- a/keymapviz/keymapviz.py +++ b/keymapviz/keymapviz.py @@ -9,7 +9,7 @@ from keymapviz.legends import * -VERSION = 'v1.9.0' +VERSION = 'v1.9.1' TYPES = { 'ascii': 'ascii_art', diff --git a/setup.py b/setup.py index d148bd2..71abf17 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ def search_json_files(): setup( name='keymapviz', - version='1.9.0', + version='1.9.1', description='keymap.c visualizer', long_description=long_description, long_description_content_type='text/markdown', From e287c9b30ff1f1842af50cee660132c21b3970ac Mon Sep 17 00:00:00 2001 From: yearski <39842469+yearski@users.noreply.github.com> Date: Wed, 22 Dec 2021 08:52:49 -0700 Subject: [PATCH 04/34] Ergodash 2u inner (#61) --- README.md | 1 + keymapviz/__init__.py | 2 + .../keyboards/ergodash_2u_inner/__init__.py | 22 +++ .../ergodash_2u_inner/layout_editor.json | 160 ++++++++++++++++++ 4 files changed, 185 insertions(+) create mode 100644 keymapviz/keyboards/ergodash_2u_inner/__init__.py create mode 100644 keymapviz/keyboards/ergodash_2u_inner/layout_editor.json diff --git a/README.md b/README.md index 66ca6b4..b5ee327 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ Following keyboards are supported. - [crkbd](https://github.com/qmk/qmk_firmware/tree/master/keyboards/crkbd) - [ergo42](https://github.com/qmk/qmk_firmware/tree/master/keyboards/ergo42) - [ergodash](https://github.com/qmk/qmk_firmware/tree/master/keyboards/ergodash) +- [ergodash_2u_inner](https://github.com/qmk/qmk_firmware/tree/master/keyboards/ergodash) - [ergodone](https://github.com/qmk/qmk_firmware/tree/master/keyboards/ergodone)(ergodox) - [ergodox_ez](https://github.com/qmk/qmk_firmware/tree/master/keyboards/ergodox_ez)(ergodox) - [fortitude60](https://github.com/qmk/qmk_firmware/tree/master/keyboards/fortitude60) diff --git a/keymapviz/__init__.py b/keymapviz/__init__.py index 29510eb..5ef10b0 100644 --- a/keymapviz/__init__.py +++ b/keymapviz/__init__.py @@ -10,6 +10,7 @@ import keymapviz.keyboards.crkbd import keymapviz.keyboards.ergo42 import keymapviz.keyboards.ergodash +import keymapviz.keyboards.ergodash_2u_inner import keymapviz.keyboards.ergodox import keymapviz.keyboards.fortitude60 import keymapviz.keyboards.lets_split @@ -29,6 +30,7 @@ 'crkbd': keymapviz.keyboards.crkbd, 'ergo42': keymapviz.keyboards.ergo42, 'ergodash': keymapviz.keyboards.ergodash, + 'ergodash_2u_inner': keymapviz.keyboards.ergodash_2u_inner, 'ergodone': keymapviz.keyboards.ergodox, 'ergodox': keymapviz.keyboards.ergodox, 'ergodox_ez': keymapviz.keyboards.ergodox, diff --git a/keymapviz/keyboards/ergodash_2u_inner/__init__.py b/keymapviz/keyboards/ergodash_2u_inner/__init__.py new file mode 100644 index 0000000..4fb7f6b --- /dev/null +++ b/keymapviz/keyboards/ergodash_2u_inner/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- + +keymap_keyword = '(?:KEYMAP|LAYOUT_4key_2u_inner)' +layout_editor_json = 'keyboards/ergodash_2u_inner/layout_editor.json' + +ascii_art = ''' +/* ,-----------------------------------------------. ,-----------------------------------------------. + * |{ 0 }|{ 1 }|{ 2 }|{ 3 }|{ 4 }|{ 5 }|-------. ,-------|{ 8 }|{ 9 }|{ 10 }|{ 11 }|{ 12 }|{ 13 }| + * |-------+-------+-------+-------+-------+-------|{ 6 }| |{ 7 }|-------+-------+-------+-------+-------+-------| + * |{ 14 }|{ 15 }|{ 16 }|{ 17 }|{ 18 }|{ 19 }|-------| |-------|{ 22 }|{ 23 }|{ 24 }|{ 25 }|{ 26 }|{ 27 }| + * |-------+-------+-------+-------+-------+-------|{ 20 }| |{ 21 }|-------+-------+-------+-------+-------+-------| + * |{ 28 }|{ 29 }|{ 30 }|{ 31 }|{ 32 }|{ 33 }|-------| |-------|{ 36 }|{ 37 }|{ 38 }|{ 39 }|{ 40 }|{ 41 }| + * |-------+-------+-------+-------+-------+-------|{ 34 }| |{ 35 }|-------+-------+-------+-------+-------+-------| + * |{ 42 }|{ 43 }|{ 44 }|{ 45 }|{ 46 }|{ 47 }|-------' `-------|{ 50 }|{ 51 }|{ 52 }|{ 53 }|{ 54 }|{ 55 }| + * |-------+-------+-------+-------+---------------' `---------------+-------+-------+-------+-------| + * |{ 56 }|{ 57 }|{ 58 }|{ 59 }| ,---------------. ,---------------. |{ 66 }|{ 67 }|{ 68 }|{ 69 }| + * `-------------------------------' | |{ 48 }| |{ 49 }| | ,-------------------------------' + * ,-------|{ 61 }|-------| |-------|{ 64 }|-------. + * |{ 60 }| |{ 62 }| |{ 63 }| |{ 65 }| + * `-----------------------' `-----------------------' + * generated by [keymapviz] */ +''' diff --git a/keymapviz/keyboards/ergodash_2u_inner/layout_editor.json b/keymapviz/keyboards/ergodash_2u_inner/layout_editor.json new file mode 100644 index 0000000..c70ffde --- /dev/null +++ b/keymapviz/keyboards/ergodash_2u_inner/layout_editor.json @@ -0,0 +1,160 @@ +[ + [ + "{0}", + "{1}", + "{2}", + "{3}", + "{4}", + "{5}", + { + "x": 4 + }, + "{8}", + "{9}", + "{10}", + "{11}", + "{12}", + "{13}" + ], + [ + { + "y": -0.5, + "x": 6 + }, + "{6}", + { + "x": 2 + }, + "{7}" + ], + [ + { + "y": -0.5 + }, + "{14}", + "{15}", + "{16}", + "{17}", + "{18}", + "{19}", + { + "x": 4 + }, + "{22}", + "{23}", + "{24}", + "{25}", + "{26}", + "{27}" + ], + [ + { + "y": -0.5, + "x": 6 + }, + "{20}", + { + "x": 2 + }, + "{21}" + ], + [ + { + "y": -0.5 + }, + "{28}", + "{29}", + "{30}", + "{31}", + "{32}", + "{33}", + { + "x": 4 + }, + "{36}", + "{37}", + "{38}", + "{39}", + "{40}", + "{41}" + ], + [ + { + "y": -0.5, + "x": 6 + }, + "{34}", + { + "x": 2 + }, + "{35}" + ], + [ + { + "y": -0.5 + }, + "{42}", + "{43}", + "{44}", + "{45}", + "{46}", + "{47}", + { + "x": 4 + }, + "{50}", + "{51}", + "{52}", + "{53}", + "{54}", + "{55}" + ], + [ + "{56}", + "{57}", + "{58}", + "{59}", + { + "x": 8 + }, + "{66}", + "{67}", + "{68}", + "{69}" + ], + [ + { + "y": -0.5, + "x": 5.5, + "h": 2 + }, + "{61}", + "{48}", + { + "x": 1 + }, + "{49}", + { + "h": 2 + }, + "{64}" + ], + [ + { + "x": 4.5 + }, + "{60}", + { + "x": 1 + }, + "{62}", + { + "x": 1 + }, + "{63}", + { + "x": 1 + }, + "{65}" + ] +] From 23efd7443e848abf41ff9c743a02c9a0ecf7720b Mon Sep 17 00:00:00 2001 From: yearski <39842469+yearski@users.noreply.github.com> Date: Wed, 22 Dec 2021 08:56:44 -0700 Subject: [PATCH 05/34] refactor/update ascii art and layout: ergodash (#62) --- keymapviz/keyboards/ergodash/__init__.py | 28 +- .../keyboards/ergodash/layout_editor.json | 302 ++++-------------- 2 files changed, 77 insertions(+), 253 deletions(-) diff --git a/keymapviz/keyboards/ergodash/__init__.py b/keymapviz/keyboards/ergodash/__init__.py index 1d58781..c59ad22 100644 --- a/keymapviz/keyboards/ergodash/__init__.py +++ b/keymapviz/keyboards/ergodash/__init__.py @@ -4,18 +4,20 @@ layout_editor_json = 'keyboards/ergodash/layout_editor.json' ascii_art = ''' -/* - * ,----------------------------------------------------------------------------------------------------------------------. - * |{ }|{ }|{ }|{ }|{ }|{ }|{ }| |{ }|{ }|{ }|{ }|{ }|{ }|{ }| - * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| - * |{ }|{ }|{ }|{ }|{ }|{ }|{ }| |{ }|{ }|{ }|{ }|{ }|{ }|{ }| - * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| - * |{ }|{ }|{ }|{ }|{ }|{ }|{ }| |{ }|{ }|{ }|{ }|{ }|{ }|{ }| - * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| - * |{ }|{ }|{ }|{ }|{ }|{ }|{ }| |{ }|{ }|{ }|{ }|{ }|{ }|{ }| - * |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| - * |{ }|{ }|{ }|{ }||||||||{ }|{ }|{ }||||||||{ }|{ }|{ }||||||||{ }|{ }|{ }|{ }| - * ,----------------------------------------------------------------------------------------------------------------------. - * generated by [keymapviz] */ +/* ,-----------------------------------------------. ,-----------------------------------------------. + * |{ 0 }|{ 1 }|{ 2 }|{ 3 }|{ 4 }|{ 5 }|-------. ,-------|{ 8 }|{ 9 }|{ 10 }|{ 11 }|{ 12 }|{ 13 }| + * |-------+-------+-------+-------+-------+-------|{ 6 }| |{ 7 }|-------+-------+-------+-------+-------+-------| + * |{ 14 }|{ 15 }|{ 16 }|{ 17 }|{ 18 }|{ 19 }|-------| |-------|{ 22 }|{ 23 }|{ 24 }|{ 25 }|{ 26 }|{ 27 }| + * |-------+-------+-------+-------+-------+-------|{ 20 }| |{ 21 }|-------+-------+-------+-------+-------+-------| + * |{ 28 }|{ 29 }|{ 30 }|{ 31 }|{ 32 }|{ 33 }|-------| |-------|{ 36 }|{ 37 }|{ 38 }|{ 39 }|{ 40 }|{ 41 }| + * |-------+-------+-------+-------+-------+-------|{ 34 }| |{ 35 }|-------+-------+-------+-------+-------+-------| + * |{ 42 }|{ 43 }|{ 44 }|{ 45 }|{ 46 }|{ 47 }|-------' `-------|{ 50 }|{ 51 }|{ 52 }|{ 53 }|{ 54 }|{ 55 }| + * |-------+-------+-------+-------+---------------' `---------------+-------+-------+-------+-------| + * |{ 56 }|{ 57 }|{ 58 }|{ 59 }| ,---------------. ,---------------. |{ 66 }|{ 67 }|{ 68 }|{ 69 }| + * `-------------------------------' |{ 48 }| | | |{ 49 }| ,-------------------------------' + * ,-------+-------|{ 62 }| |{ 63 }|-------+-------. + * |{ 60 }|{ 61 }| | | |{ 64 }|{ 65 }| + * `-----------------------' `-----------------------' + * generated by [keymapviz] */ ''' diff --git a/keymapviz/keyboards/ergodash/layout_editor.json b/keymapviz/keyboards/ergodash/layout_editor.json index a25f433..f6fe982 100644 --- a/keymapviz/keyboards/ergodash/layout_editor.json +++ b/keymapviz/keyboards/ergodash/layout_editor.json @@ -1,331 +1,153 @@ [ [ - { - "x": 3, - "a": 7 - }, - "{3}", - { - "x": 7 - }, - "{10}" - ], - [ - { - "y": -0.75, - "x": 2 - }, + "{0}", + "{1}", "{2}", - { - "x": 1 - }, + "{3}", "{4}", - { - "x": 5 - }, - "{9}", - { - "x": 1 - }, - "{11}" - ], - [ - { - "y": -0.75, - "x": 1 - }, - "{1}", - { - "x": 3 - }, "{5}", { - "x": 3 + "x": 4 }, "{8}", - { - "x": 3 - }, - "{12}" - ], - [ - { - "y": -0.75 - }, - "{0}", - { - "x": 13 - }, + "{9}", + "{10}", + "{11}", + "{12}", "{13}" ], [ { - "y": -0.75, - "x": 3 - }, - "{17}", - { - "x": 2 + "y": -0.5, + "x": 6 }, "{6}", - { - "x": 1 - }, - "{7}", { "x": 2 }, - "{24}" + "{7}" ], [ { - "y": -0.75, - "x": 2 + "y": -0.5 }, + "{14}", + "{15}", "{16}", - { - "x": 1 - }, + "{17}", "{18}", - { - "x": 5 - }, - "{23}", - { - "x": 1 - }, - "{25}" - ], - [ - { - "y": -0.75, - "x": 1 - }, - "{15}", - { - "x": 3 - }, "{19}", { - "x": 3 + "x": 4 }, "{22}", - { - "x": 3 - }, - "{26}" - ], - [ - { - "y": -0.75 - }, - "{14}", - { - "x": 13 - }, + "{23}", + "{24}", + "{25}", + "{26}", "{27}" ], [ { - "y": -0.75, - "x": 3 - }, - "{31}", - { - "x": 2 + "y": -0.5, + "x": 6 }, "{20}", - { - "x": 1 - }, - "{21}", { "x": 2 }, - "{38}" + "{21}" ], [ { - "y": -0.75, - "x": 2 + "y": -0.5 }, + "{28}", + "{29}", "{30}", - { - "x": 1 - }, + "{31}", "{32}", - { - "x": 5 - }, - "{37}", - { - "x": 1 - }, - "{39}" - ], - [ - { - "y": -0.75, - "x": 1 - }, - "{29}", - { - "x": 3 - }, "{33}", { - "x": 3 + "x": 4 }, "{36}", - { - "x": 3 - }, - "{40}" - ], - [ - { - "y": -0.75 - }, - "{28}", - { - "x": 13 - }, + "{37}", + "{38}", + "{39}", + "{40}", "{41}" ], [ { - "y": -0.75, - "x": 3 - }, - "{45}", - { - "x": 2 + "y": -0.5, + "x": 6 }, "{34}", - { - "x": 1 - }, - "{35}", { "x": 2 }, - "{52}" + "{35}" ], [ { - "y": -0.75, - "x": 2 + "y": -0.5 }, + "{42}", + "{43}", "{44}", - { - "x": 1 - }, + "{45}", "{46}", - { - "x": 5 - }, - "{51}", - { - "x": 1 - }, - "{53}" - ], - [ - { - "y": -0.75, - "x": 1 - }, - "{43}", - { - "x": 3 - }, "{47}", { - "x": 3 + "x": 4 }, "{50}", - { - "x": 3 - }, - "{54}" - ], - [ - { - "y": -0.75 - }, - "{42}", - { - "x": 13 - }, + "{51}", + "{52}", + "{53}", + "{54}", "{55}" ], [ - { - "y": -0.5, - "x": 2 - }, + "{56}", + "{57}", "{58}", - { - "x": 0.25 - }, "{59}", { - "x": 6.5 + "x": 8 }, "{66}", - { - "x": 0.25 - }, - "{67}" - ], - [ - { - "y": -0.75, - "x": 1 - }, - "{57}", - { - "x": 11 - }, - "{68}" - ], - [ - { - "y": -0.75 - }, - "{56}", - { - "x": 13 - }, + "{67}", + "{68}", "{69}" ], [ { - "r": 30, - "y": -5.25, - "x": 7.5 + "y": -0.5, + "x": 5.5 }, - "{48}" - ], - [ + "{48}", { - "x": 6.5 + "h": 2 }, - "{60}", - "{61}" - ], - [ + "{62}", { - "r": -30, - "y": 5.5, - "x": 4.5 + "x": 1, + "h": 2 }, + "{63}", "{49}" ], [ { "x": 4.5 }, + "{60}", + "{61}", + { + "x": 3 + }, "{64}", "{65}" ] From 9e673515b457c506cc445dbc7275fa605637998c Mon Sep 17 00:00:00 2001 From: Yusuke Ohta <34795067+yskoht@users.noreply.github.com> Date: Thu, 30 Dec 2021 13:46:09 +0900 Subject: [PATCH 06/34] Add --layout option (#68) --- keymapviz/__init__.py | 23 ++++++++++++++----- keymapviz/keyboards/crkbd/__init__.py | 11 +++++---- .../default.json} | 0 .../keyboards/dactyl_manuform5x6/__init__.py | 16 +++++++++---- .../default.json} | 0 keymapviz/keyboards/ergo42/__init__.py | 11 +++++---- .../default.json} | 0 keymapviz/keyboards/ergodash/__init__.py | 15 +++++++----- .../default.json} | 0 .../keyboards/ergodash_2u_inner/__init__.py | 14 +++++++---- .../default.json} | 0 keymapviz/keyboards/ergodox/__init__.py | 10 +++++--- .../default.json} | 0 keymapviz/keyboards/fortitude60/__init__.py | 11 +++++---- .../default.json} | 0 keymapviz/keyboards/helix/__init__.py | 11 +++++---- .../default.json} | 0 keymapviz/keyboards/kaishi65/__init__.py | 12 ++++++---- .../default.json} | 0 keymapviz/keyboards/kinesis/__init__.py | 10 +++++--- .../default.json} | 0 keymapviz/keyboards/kyria/__init__.py | 11 +++++---- .../default.json} | 0 keymapviz/keyboards/lets_split/__init__.py | 11 +++++---- .../default.json} | 0 keymapviz/keyboards/lily58/__init__.py | 11 +++++---- .../default.json} | 0 keymapviz/keyboards/mint60/__init__.py | 11 +++++---- .../default.json} | 0 keymapviz/keyboards/moonlander/__init__.py | 10 +++++--- .../default.json} | 0 keymapviz/keyboards/sofle/__init__.py | 16 +++++++++---- .../default.json} | 0 keymapviz/keyboards/sweet16/__init__.py | 11 +++++---- .../default.json} | 0 keymapviz/keymapviz.py | 7 +++--- setup.py | 2 +- 37 files changed, 154 insertions(+), 80 deletions(-) rename keymapviz/keyboards/crkbd/{layout_editor.json => layout_editor/default.json} (100%) rename keymapviz/keyboards/dactyl_manuform5x6/{layout_editor.json => layout_editor/default.json} (100%) rename keymapviz/keyboards/ergo42/{layout_editor.json => layout_editor/default.json} (100%) rename keymapviz/keyboards/ergodash/{layout_editor.json => layout_editor/default.json} (100%) rename keymapviz/keyboards/ergodash_2u_inner/{layout_editor.json => layout_editor/default.json} (100%) rename keymapviz/keyboards/ergodox/{layout_editor.json => layout_editor/default.json} (100%) rename keymapviz/keyboards/fortitude60/{layout_editor.json => layout_editor/default.json} (100%) rename keymapviz/keyboards/helix/{layout_editor.json => layout_editor/default.json} (100%) rename keymapviz/keyboards/kaishi65/{layout_editor.json => layout_editor/default.json} (100%) rename keymapviz/keyboards/kinesis/{layout_editor.json => layout_editor/default.json} (100%) rename keymapviz/keyboards/kyria/{layout_editor.json => layout_editor/default.json} (100%) rename keymapviz/keyboards/lets_split/{layout_editor.json => layout_editor/default.json} (100%) rename keymapviz/keyboards/lily58/{layout_editor.json => layout_editor/default.json} (100%) rename keymapviz/keyboards/mint60/{layout_editor.json => layout_editor/default.json} (100%) rename keymapviz/keyboards/moonlander/{layout_editor.json => layout_editor/default.json} (100%) rename keymapviz/keyboards/sofle/{layout_editor.json => layout_editor/default.json} (100%) rename keymapviz/keyboards/sweet16/{layout_editor.json => layout_editor/default.json} (100%) diff --git a/keymapviz/__init__.py b/keymapviz/__init__.py index 5ef10b0..3bc0e46 100644 --- a/keymapviz/__init__.py +++ b/keymapviz/__init__.py @@ -50,10 +50,11 @@ class Keymapviz(): - def __init__(self, keyboard, keymap_c, legends = None): + def __init__(self, keyboard, keymap_c, layout = None, legends = None): self.__keymap_c = keymap_c.read() self.keyboard = KEYBOARDS[keyboard] self.keymaps = self.__parse_keymap_c() + self.layout = layout if layout else 'default' self.legends = legends if legends else {} @@ -108,13 +109,22 @@ def __get_final_ascii_art(self, ascii_art): self.__ascii_art = [aa.format(*self.__legends(_)) for _ in self.keymaps] return self.__ascii_art - def ascii_art(self): - return self.__get_final_ascii_art(self.keyboard.ascii_art) + def __get_layout(self, format, layout): + try: + return format[layout] + except KeyError: + print('The keyboard dose not have the layout `{}`.'.format(layout), file=sys.stderr) + sys.exit(1) + + def ascii_art(self): + aa = self.__get_layout(self.keyboard.ascii_art, self.layout) + return self.__get_final_ascii_art(aa) def layout_editor_json(self): path_ = os.path.dirname(os.path.abspath(__file__)) - with open(os.path.join(path_, self.keyboard.layout_editor_json)) as f: + json_file = self.__get_layout(self.keyboard.layout_editor_json, self.layout) + with open(os.path.join(path_, json_file)) as f: json_ = json.load(f) return [self.__json_format(json_, _) for _ in self.keymaps] @@ -153,8 +163,9 @@ def __get_box_drawing(self, left, down, up, right, center): def fancy_art(self): if hasattr(self.keyboard, 'fancy_ascii_art'): # There already exists a man-made fancy ascii art for this keyboard. - return self.__get_final_ascii_art(self.keyboard.fancy_ascii_art) - aa = self.keyboard.ascii_art + faa = self.__get_layout(self.keyboard.fancy_ascii_art, self.layout) + return self.__get_final_ascii_art(faa) + aa = self.__get_layout(self.keyboard.ascii_art, self.layout) keymapviz_signature_pattern = r'[A-Za-z ]*\[keymapviz\].*\*/\s*$' # If the keymapviz signature is adjacent to certain outline characters, # self.__get_box_drawing will incorrectly interpret the characters composing the signature diff --git a/keymapviz/keyboards/crkbd/__init__.py b/keymapviz/keyboards/crkbd/__init__.py index 951ae08..b303471 100644 --- a/keymapviz/keyboards/crkbd/__init__.py +++ b/keymapviz/keyboards/crkbd/__init__.py @@ -1,9 +1,12 @@ # -*- coding: utf-8 -*- keymap_keyword = '(?:LAYOUT|LAYOUT_kc|LAYOUT_split_3x6_3)' -layout_editor_json = 'keyboards/crkbd/layout_editor.json' +layout_editor_json = { + 'default': 'keyboards/crkbd/layout_editor/default.json', +} -ascii_art = ''' +ascii_art = { + 'default': ''' /* ,-----------------------------------------. ,-----------------------------------------. * |{ }|{ }|{ }|{ }|{ }|{ }| |{ }|{ }|{ }|{ }|{ }|{ }| * |------+------+------+------+------+------| |------+------+------+------+------+------| @@ -14,5 +17,5 @@ * |{ }|{ }|{ }| |{ }|{ }|{ }| * `--------------------' `--------------------' * generated by [keymapviz] */ -''' - +''', +} diff --git a/keymapviz/keyboards/crkbd/layout_editor.json b/keymapviz/keyboards/crkbd/layout_editor/default.json similarity index 100% rename from keymapviz/keyboards/crkbd/layout_editor.json rename to keymapviz/keyboards/crkbd/layout_editor/default.json diff --git a/keymapviz/keyboards/dactyl_manuform5x6/__init__.py b/keymapviz/keyboards/dactyl_manuform5x6/__init__.py index 1b0381f..c92d001 100644 --- a/keymapviz/keyboards/dactyl_manuform5x6/__init__.py +++ b/keymapviz/keyboards/dactyl_manuform5x6/__init__.py @@ -1,9 +1,12 @@ # -*- coding: utf-8 -*- keymap_keyword = '(?:KEYMAP|LAYOUT_5x6)' -layout_editor_json = 'keyboards/dactyl_manuform5x6/layout_editor.json' +layout_editor_json = { + 'default': 'keyboards/dactyl_manuform5x6/layout_editor/default.json', +} -ascii_art = ''' +ascii_art = { + 'default': ''' /* ,-------------------------------. ,-------------------------------. * ,---------------|{ 2 }|{ 3 }|{ 4 }|{ 5 }| |{ 6 }|{ 7 }|{ 8 }|{ 9 }|--------------. * |{ 0 }|{ 1 }|-------+-------+-------+-------| |-------+-------+-------+-------|{ 10 }|{ 11 }| @@ -22,9 +25,11 @@ * |-------+-------| |-------+-------| * |{ 60 }|{ 61 }| |{ 62 }|{ 63 }| * `---------------' `---------------' generated by [keymapviz] */ -''' +''', +} -fancy_ascii_art = ''' +fancy_ascii_art = { + 'default': ''' /* ┌───────┬───────┬───────┬───────┐ ┌───────┬───────┬───────┬───────┐ * ┌───────┬───────┤{ 2 }│{ 3 }│{ 4 }│{ 5 }│ │{ 6 }│{ 7 }│{ 8 }│{ 9 }├───────┬──────┐ * │{ 0 }│{ 1 }├───────┼───────┼───────┼───────┤ ├───────┼───────┼───────┼───────┤{ 10 }│{ 11 }│ @@ -43,4 +48,5 @@ * ├───────╄━━━━━━━┩ ┡━━━━━━━╃───────┤ * │{ 60 }│{ 61 }│ │{ 62 }│{ 63 }│ * └───────┴───────┘ └───────┴───────┘ generated by [keymapviz] */ -''' +''', +} diff --git a/keymapviz/keyboards/dactyl_manuform5x6/layout_editor.json b/keymapviz/keyboards/dactyl_manuform5x6/layout_editor/default.json similarity index 100% rename from keymapviz/keyboards/dactyl_manuform5x6/layout_editor.json rename to keymapviz/keyboards/dactyl_manuform5x6/layout_editor/default.json diff --git a/keymapviz/keyboards/ergo42/__init__.py b/keymapviz/keyboards/ergo42/__init__.py index 830a73e..7d52f1a 100644 --- a/keymapviz/keyboards/ergo42/__init__.py +++ b/keymapviz/keyboards/ergo42/__init__.py @@ -1,9 +1,12 @@ # -*- coding: utf-8 -*- keymap_keyword = '(?:LAYOUT)' -layout_editor_json = 'keyboards/ergo42/layout_editor.json' +layout_editor_json = { + 'default': 'keyboards/ergo42/layout_editor/default.json' +} -ascii_art = ''' +ascii_art = { + 'default': ''' /* * ,------------------------------------------------. ,------------------------------------------------. * |{ }|{ }|{ }|{ }|{ }|{ }|{ }| |{ }|{ }|{ }|{ }|{ }|{ }|{ }| @@ -16,5 +19,5 @@ * | | | | | | | | | | | | | | | | * `------------------------------------------------' `------------------------------------------------' * generated by [keymapviz] */ -''' - +''', +} diff --git a/keymapviz/keyboards/ergo42/layout_editor.json b/keymapviz/keyboards/ergo42/layout_editor/default.json similarity index 100% rename from keymapviz/keyboards/ergo42/layout_editor.json rename to keymapviz/keyboards/ergo42/layout_editor/default.json diff --git a/keymapviz/keyboards/ergodash/__init__.py b/keymapviz/keyboards/ergodash/__init__.py index c59ad22..9cb6c19 100644 --- a/keymapviz/keyboards/ergodash/__init__.py +++ b/keymapviz/keyboards/ergodash/__init__.py @@ -1,9 +1,12 @@ # -*- coding: utf-8 -*- keymap_keyword = '(?:LAYOUT)' -layout_editor_json = 'keyboards/ergodash/layout_editor.json' +layout_editor_json = { + 'default': 'keyboards/ergodash/layout_editor/default.json', +} -ascii_art = ''' +ascii_art = { + 'default': ''' /* ,-----------------------------------------------. ,-----------------------------------------------. * |{ 0 }|{ 1 }|{ 2 }|{ 3 }|{ 4 }|{ 5 }|-------. ,-------|{ 8 }|{ 9 }|{ 10 }|{ 11 }|{ 12 }|{ 13 }| * |-------+-------+-------+-------+-------+-------|{ 6 }| |{ 7 }|-------+-------+-------+-------+-------+-------| @@ -15,9 +18,9 @@ * |-------+-------+-------+-------+---------------' `---------------+-------+-------+-------+-------| * |{ 56 }|{ 57 }|{ 58 }|{ 59 }| ,---------------. ,---------------. |{ 66 }|{ 67 }|{ 68 }|{ 69 }| * `-------------------------------' |{ 48 }| | | |{ 49 }| ,-------------------------------' - * ,-------+-------|{ 62 }| |{ 63 }|-------+-------. - * |{ 60 }|{ 61 }| | | |{ 64 }|{ 65 }| + * ,-------+-------|{ 62 }| |{ 63 }|-------+-------. + * |{ 60 }|{ 61 }| | | |{ 64 }|{ 65 }| * `-----------------------' `-----------------------' * generated by [keymapviz] */ -''' - +''', +} diff --git a/keymapviz/keyboards/ergodash/layout_editor.json b/keymapviz/keyboards/ergodash/layout_editor/default.json similarity index 100% rename from keymapviz/keyboards/ergodash/layout_editor.json rename to keymapviz/keyboards/ergodash/layout_editor/default.json diff --git a/keymapviz/keyboards/ergodash_2u_inner/__init__.py b/keymapviz/keyboards/ergodash_2u_inner/__init__.py index 4fb7f6b..05a2e44 100644 --- a/keymapviz/keyboards/ergodash_2u_inner/__init__.py +++ b/keymapviz/keyboards/ergodash_2u_inner/__init__.py @@ -1,9 +1,12 @@ # -*- coding: utf-8 -*- keymap_keyword = '(?:KEYMAP|LAYOUT_4key_2u_inner)' -layout_editor_json = 'keyboards/ergodash_2u_inner/layout_editor.json' +layout_editor_json = { + 'default': 'keyboards/ergodash_2u_inner/layout_editor/default.json', +} -ascii_art = ''' +ascii_art = { + 'default': ''' /* ,-----------------------------------------------. ,-----------------------------------------------. * |{ 0 }|{ 1 }|{ 2 }|{ 3 }|{ 4 }|{ 5 }|-------. ,-------|{ 8 }|{ 9 }|{ 10 }|{ 11 }|{ 12 }|{ 13 }| * |-------+-------+-------+-------+-------+-------|{ 6 }| |{ 7 }|-------+-------+-------+-------+-------+-------| @@ -15,8 +18,9 @@ * |-------+-------+-------+-------+---------------' `---------------+-------+-------+-------+-------| * |{ 56 }|{ 57 }|{ 58 }|{ 59 }| ,---------------. ,---------------. |{ 66 }|{ 67 }|{ 68 }|{ 69 }| * `-------------------------------' | |{ 48 }| |{ 49 }| | ,-------------------------------' - * ,-------|{ 61 }|-------| |-------|{ 64 }|-------. - * |{ 60 }| |{ 62 }| |{ 63 }| |{ 65 }| + * ,-------|{ 61 }|-------| |-------|{ 64 }|-------. + * |{ 60 }| |{ 62 }| |{ 63 }| |{ 65 }| * `-----------------------' `-----------------------' * generated by [keymapviz] */ -''' +''', +} diff --git a/keymapviz/keyboards/ergodash_2u_inner/layout_editor.json b/keymapviz/keyboards/ergodash_2u_inner/layout_editor/default.json similarity index 100% rename from keymapviz/keyboards/ergodash_2u_inner/layout_editor.json rename to keymapviz/keyboards/ergodash_2u_inner/layout_editor/default.json diff --git a/keymapviz/keyboards/ergodox/__init__.py b/keymapviz/keyboards/ergodox/__init__.py index e23d9ea..2f25534 100644 --- a/keymapviz/keyboards/ergodox/__init__.py +++ b/keymapviz/keyboards/ergodox/__init__.py @@ -1,9 +1,12 @@ # -*- coding: utf-8 -*- keymap_keyword = '(?:LAYOUT_ergodox|KEYMAP|KEYMAP_80|LAYOUT_ergodox_pretty|KEYMAP_TKG)' -layout_editor_json = 'keyboards/ergodox/layout_editor.json' +layout_editor_json = { + 'default': 'keyboards/ergodox/layout_editor/default.json', +} -ascii_art = ''' +ascii_art = { + 'default': ''' /* .---------------------------------------------. .---------------------------------------------. * |{0 }|{1 }|{2 }|{3 }|{4 }|{5 }|{6 }| !{7 }|{8 }|{9 }|{10 }|{11 }|{12 }|{13 }| * !-------+-----+-----+-----+-----+-------------! !-------+-----+-----+-----+-----+-----+-------! @@ -23,4 +26,5 @@ * | | |{72 }| !{73 }| | | * '-----------------------' '-----------------------' * generated by [keymapviz] */ -''' +''', +} diff --git a/keymapviz/keyboards/ergodox/layout_editor.json b/keymapviz/keyboards/ergodox/layout_editor/default.json similarity index 100% rename from keymapviz/keyboards/ergodox/layout_editor.json rename to keymapviz/keyboards/ergodox/layout_editor/default.json diff --git a/keymapviz/keyboards/fortitude60/__init__.py b/keymapviz/keyboards/fortitude60/__init__.py index 0fea5b0..7859a11 100644 --- a/keymapviz/keyboards/fortitude60/__init__.py +++ b/keymapviz/keyboards/fortitude60/__init__.py @@ -1,9 +1,12 @@ # -*- coding: utf-8 -*- keymap_keyword = '(?:LAYOUT)' -layout_editor_json = 'keyboards/fortitude60/layout_editor.json' +layout_editor_json = { + 'default': 'keyboards/fortitude60/layout_editor/default.json', +} -ascii_art = ''' +ascii_art = { + 'default': ''' /* ,-----------------------------------------. ,-----------------------------------------. * |{ }|{ }|{ }|{ }|{ }|{ }| |{ }|{ }|{ }|{ }|{ }|{ }| * |------+------+------+------+------+------| |------+------+------+------+------+------| @@ -16,5 +19,5 @@ * |{ }|{ }|{ }|{ }|{ }| |{ }|{ }|{ }|{ }|{ }| * `----------------------------------' `----------------------------------' * generated by [keymapviz] */ -''' - +''', +} diff --git a/keymapviz/keyboards/fortitude60/layout_editor.json b/keymapviz/keyboards/fortitude60/layout_editor/default.json similarity index 100% rename from keymapviz/keyboards/fortitude60/layout_editor.json rename to keymapviz/keyboards/fortitude60/layout_editor/default.json diff --git a/keymapviz/keyboards/helix/__init__.py b/keymapviz/keyboards/helix/__init__.py index 496659b..21ea601 100644 --- a/keymapviz/keyboards/helix/__init__.py +++ b/keymapviz/keyboards/helix/__init__.py @@ -1,9 +1,12 @@ # -*- coding: utf-8 -*- keymap_keyword = '(?:KEYMAP|LAYOUT)' -layout_editor_json = 'keyboards/helix/layout_editor.json' +layout_editor_json = { + 'default': 'keyboards/helix/layout_editor/default.json', +} -ascii_art = ''' +ascii_art = { + 'default': ''' /* ,-----------------------------------------. ,-----------------------------------------. * |{ }|{ }|{ }|{ }|{ }|{ }| |{ }|{ }|{ }|{ }|{ }|{ }| * |------+------+------+------+------+------| |------+------+------+------+------+------| @@ -16,5 +19,5 @@ * |{ }|{ }|{ }|{ }|{ }|{ }|{ }| |{ }|{ }|{ }|{ }|{ }|{ }|{ }| * `------------------------------------------------' `------------------------------------------------' * generated by [keymapviz] */ -''' - +''', +} diff --git a/keymapviz/keyboards/helix/layout_editor.json b/keymapviz/keyboards/helix/layout_editor/default.json similarity index 100% rename from keymapviz/keyboards/helix/layout_editor.json rename to keymapviz/keyboards/helix/layout_editor/default.json diff --git a/keymapviz/keyboards/kaishi65/__init__.py b/keymapviz/keyboards/kaishi65/__init__.py index ac4d005..72524f6 100644 --- a/keymapviz/keyboards/kaishi65/__init__.py +++ b/keymapviz/keyboards/kaishi65/__init__.py @@ -1,7 +1,10 @@ keymap_keyword = '(?:LAYOUT_65_ansi)' -layout_editor_json = 'keyboards/kaishi65/layout_editor.json' +layout_editor_json = { + 'default': 'keyboards/kaishi65/layout_editor/default.json', +} -ascii_art = ''' +ascii_art = { + 'default': ''' /*,----------------------------------------------------------------. *|{} | {}| {}| {}| {}| {}| {}| {}| {}| {}| {}| {}| {}| {} | {} | *|----------------------------------------------------------------| @@ -12,7 +15,8 @@ *| {} | {}| {}| {}| {}| {}| {}| {}| {}| {}| {}| {} | {}| {} | *|----------------------------------------------------------------| *| {} | {} | {} | {} | {}| {}| {} | {}| {}| {} | - *`----------------------------------------------------------------' + *`----------------------------------------------------------------' * generated by [keymapviz] */ -''' +''', +} diff --git a/keymapviz/keyboards/kaishi65/layout_editor.json b/keymapviz/keyboards/kaishi65/layout_editor/default.json similarity index 100% rename from keymapviz/keyboards/kaishi65/layout_editor.json rename to keymapviz/keyboards/kaishi65/layout_editor/default.json diff --git a/keymapviz/keyboards/kinesis/__init__.py b/keymapviz/keyboards/kinesis/__init__.py index 6e74577..64f498b 100644 --- a/keymapviz/keyboards/kinesis/__init__.py +++ b/keymapviz/keyboards/kinesis/__init__.py @@ -1,9 +1,12 @@ # -*- coding: utf-8 -*- keymap_keyword = '(?:LAYOUT)' -layout_editor_json = 'keyboards/kinesis/layout_editor.json' +layout_editor_json = { + 'default': 'keyboards/kinesis/layout_editor/default.json', +} -ascii_art = ''' +ascii_art = { + 'default': ''' /* ,---------------------------------------------------------------------------------------------------------------------------------. * |{0 } |{1 }|{2 }|{3 }|{4 }|{5 }|{6 }|{7 }|{8 }|{43 }|{44 }|{45 }|{46 }|{47 }|{48 }|{49 }|{50 }|{51 } | * |--------+------+------+------+------+------+-----------------------------------------+------+------+------+------+------+--------| @@ -25,4 +28,5 @@ * | | |{42 }| |{85 }| | | * `--------------------' `--------------------' * generated by [keymapviz] */ -''' +''', +} diff --git a/keymapviz/keyboards/kinesis/layout_editor.json b/keymapviz/keyboards/kinesis/layout_editor/default.json similarity index 100% rename from keymapviz/keyboards/kinesis/layout_editor.json rename to keymapviz/keyboards/kinesis/layout_editor/default.json diff --git a/keymapviz/keyboards/kyria/__init__.py b/keymapviz/keyboards/kyria/__init__.py index e70611e..3cf22eb 100644 --- a/keymapviz/keyboards/kyria/__init__.py +++ b/keymapviz/keyboards/kyria/__init__.py @@ -1,9 +1,12 @@ # -*- coding: utf-8 -*- keymap_keyword = '(?:LAYOUT)' -layout_editor_json = 'keyboards/kyria/layout_editor.json' +layout_editor_json = { + 'default': 'keyboards/kyria/layout_editor/default.json' +} -ascii_art = ''' +ascii_art = { + 'default': ''' /* ,-----------------------------------------. ,-----------------------------------------. * |{ }|{ }|{ }|{ }|{ }|{ }| |{ }|{ }|{ }|{ }|{ }|{ }| * |------+------+------+------+------+------| |------+------+------+------+------+------| @@ -15,5 +18,5 @@ * | | | | | | | | | | | | * `----------------------------------' `----------------------------------' * generated by [keymapviz] */ -''' - +''', +} diff --git a/keymapviz/keyboards/kyria/layout_editor.json b/keymapviz/keyboards/kyria/layout_editor/default.json similarity index 100% rename from keymapviz/keyboards/kyria/layout_editor.json rename to keymapviz/keyboards/kyria/layout_editor/default.json diff --git a/keymapviz/keyboards/lets_split/__init__.py b/keymapviz/keyboards/lets_split/__init__.py index cc8cb4a..e5f25f6 100644 --- a/keymapviz/keyboards/lets_split/__init__.py +++ b/keymapviz/keyboards/lets_split/__init__.py @@ -1,9 +1,12 @@ # -*- coding: utf-8 -*- keymap_keyword = '(?:KEYMAP|LAYOUT|LAYOUT_ortho_4x12)' -layout_editor_json = 'keyboards/lets_split/layout_editor.json' +layout_editor_json = { + 'default': 'keyboards/lets_split/layout_editor/default.json', +} -ascii_art = ''' +ascii_art = { + 'default': ''' /* ,-----------------------------------------. ,-----------------------------------------. * |{ }|{ }|{ }|{ }|{ }|{ }| |{ }|{ }|{ }|{ }|{ }|{ }| * |------+------+------+------+------+------| |------+------+------+------+------+------| @@ -14,5 +17,5 @@ * |{ }|{ }|{ }|{ }|{ }|{ }| |{ }|{ }|{ }|{ }|{ }|{ }| * `-----------------------------------------' `-----------------------------------------' * generated by [keymapviz] */ -''' - +''', +} diff --git a/keymapviz/keyboards/lets_split/layout_editor.json b/keymapviz/keyboards/lets_split/layout_editor/default.json similarity index 100% rename from keymapviz/keyboards/lets_split/layout_editor.json rename to keymapviz/keyboards/lets_split/layout_editor/default.json diff --git a/keymapviz/keyboards/lily58/__init__.py b/keymapviz/keyboards/lily58/__init__.py index 97048c6..91c5427 100644 --- a/keymapviz/keyboards/lily58/__init__.py +++ b/keymapviz/keyboards/lily58/__init__.py @@ -1,9 +1,12 @@ # -*- coding: utf-8 -*- keymap_keyword = '(?:LAYOUT)' -layout_editor_json = 'keyboards/lily58/layout_editor.json' +layout_editor_json = { + 'default': 'keyboards/lily58/layout_editor/default.json', +} -ascii_art = ''' +ascii_art = { + 'default': ''' /* ,-----------------------------------------. ,-----------------------------------------. * |{ }|{ }|{ }|{ }|{ }|{ }| |{ }|{ }|{ }|{ }|{ }|{ }| * |------+------+------+------+------+------| |------+------+------+------+------+------| @@ -17,5 +20,5 @@ * | | | |/ / \ \ | | | | * `----------------------------' '-------''--------------------' * generated by [keymapviz] */ -''' - +''', +} diff --git a/keymapviz/keyboards/lily58/layout_editor.json b/keymapviz/keyboards/lily58/layout_editor/default.json similarity index 100% rename from keymapviz/keyboards/lily58/layout_editor.json rename to keymapviz/keyboards/lily58/layout_editor/default.json diff --git a/keymapviz/keyboards/mint60/__init__.py b/keymapviz/keyboards/mint60/__init__.py index f4c1acc..6360ac0 100644 --- a/keymapviz/keyboards/mint60/__init__.py +++ b/keymapviz/keyboards/mint60/__init__.py @@ -1,9 +1,12 @@ # -*- coding: utf-8 -*- keymap_keyword = '(?:LAYOUT)' -layout_editor_json = 'keyboards/mint60/layout_editor.json' +layout_editor_json = { + 'default': 'keyboards/mint60/layout_editor/default.json', +} -ascii_art = ''' +ascii_art = { + 'default': ''' /* * ,-----------------------------------------. --------------------------------------------------------. * |{ }|{ }|{ }|{ }|{ }|{ }| |{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }| @@ -17,5 +20,5 @@ * |{ }|{ }|{ }|{ }|{ }| |{ }|{ }|{ }|{ }|{ }|{ }| * `-----------------------------------------' `-------------------------------------------------------' * generated by [keymapviz] */ -''' - +''', +} diff --git a/keymapviz/keyboards/mint60/layout_editor.json b/keymapviz/keyboards/mint60/layout_editor/default.json similarity index 100% rename from keymapviz/keyboards/mint60/layout_editor.json rename to keymapviz/keyboards/mint60/layout_editor/default.json diff --git a/keymapviz/keyboards/moonlander/__init__.py b/keymapviz/keyboards/moonlander/__init__.py index a8121d9..e7ef26e 100644 --- a/keymapviz/keyboards/moonlander/__init__.py +++ b/keymapviz/keyboards/moonlander/__init__.py @@ -2,9 +2,12 @@ keymap_keyword = '(?:LAYOUT_moonlander)' -layout_editor_json = 'keyboards/moonlander/layout_editor.json' +layout_editor_json = { + 'default': 'keyboards/moonlander/layout_editor/default.json', +} -ascii_art = ''' +ascii_art = { + 'default': ''' /* .---------------------------------------------. .---------------------------------------------. * |{0 }|{1 }|{2 }|{3 }|{4 }|{5 }|{6 }| !{7 }|{8 }|{9 }|{10 }|{11 }|{12 }|{13 }| * !-------+-----+-----+-----+-----+-----+-------! !-------+-----+-----+-----+-----+-----+-------! @@ -21,4 +24,5 @@ * .-------+---------------! !---------------+-------. * !{66 }!{67 }|{68 }| !{69 }|{70 }!{71 }! * '-----------------------' '-----------------------' */ -''' +''', +} diff --git a/keymapviz/keyboards/moonlander/layout_editor.json b/keymapviz/keyboards/moonlander/layout_editor/default.json similarity index 100% rename from keymapviz/keyboards/moonlander/layout_editor.json rename to keymapviz/keyboards/moonlander/layout_editor/default.json diff --git a/keymapviz/keyboards/sofle/__init__.py b/keymapviz/keyboards/sofle/__init__.py index 319076f..f1129fa 100644 --- a/keymapviz/keyboards/sofle/__init__.py +++ b/keymapviz/keyboards/sofle/__init__.py @@ -1,9 +1,12 @@ # -*- coding: utf-8 -*- keymap_keyword = '(?:KEYMAP|LAYOUT)' -layout_editor_json = 'keyboards/sofle/layout_editor.json' +layout_editor_json = { + 'default': 'keyboards/sofle/layout_editor/default.json', +} -ascii_art = ''' +ascii_art = { + 'default': ''' /* ,-----------------------------------------. ,-----------------------------------------. * |{ 0 }|{ 1 }|{ 2 }|{ 3 }|{ 4 }|{ 5 }| |{ 6 }|{ 7 }|{ 8 }|{ 9 }|{ 10 }|{ 11 }| * |------+------+------+------+------+------| |------+------+------+------+------+------| @@ -17,9 +20,11 @@ * | | | / / / \ \ \ | | | * `---------------------------------' `---------------------------------' * generated by [keymapviz] */ -''' +''', +} -fancy_ascii_art = ''' +fancy_ascii_art = { + 'default': ''' /* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ * │{ 0 }│{ 1 }│{ 2 }│{ 3 }│{ 4 }│{ 5 }│ │{ 6 }│{ 7 }│{ 8 }│{ 9 }│{ 10 }│{ 11 }│ * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ @@ -33,4 +38,5 @@ * │ │ │ │ │ │ │ │ │ │ │ │ * └──────┴──────┴──────┴──────┴───────┘ └───────┴──────┴──────┴──────┴──────┘ * generated by [keymapviz] */ - ''' +''', +} diff --git a/keymapviz/keyboards/sofle/layout_editor.json b/keymapviz/keyboards/sofle/layout_editor/default.json similarity index 100% rename from keymapviz/keyboards/sofle/layout_editor.json rename to keymapviz/keyboards/sofle/layout_editor/default.json diff --git a/keymapviz/keyboards/sweet16/__init__.py b/keymapviz/keyboards/sweet16/__init__.py index 1e7f0ef..c1df371 100644 --- a/keymapviz/keyboards/sweet16/__init__.py +++ b/keymapviz/keyboards/sweet16/__init__.py @@ -1,9 +1,12 @@ # -*- coding: utf-8 -*- keymap_keyword = '(?:KEYMAP|LAYOUT|LAYOUT_ortho_4x4|LAYOUT_numpad_4x4)' -layout_editor_json = 'keyboards/sweet16/layout_editor.json' +layout_editor_json = { + 'default': 'keyboards/sweet16/layout_editor/default.json', +} -ascii_art = ''' +ascii_art = { + 'default': ''' /* ,---------------------------. * |{ }|{ }|{ }|{ }| * |------+------+------+------| @@ -14,5 +17,5 @@ * |{ }|{ }|{ }|{ }| * `---------------------------' * generated by [keymapviz] */ -''' - +''', +} diff --git a/keymapviz/keyboards/sweet16/layout_editor.json b/keymapviz/keyboards/sweet16/layout_editor/default.json similarity index 100% rename from keymapviz/keyboards/sweet16/layout_editor.json rename to keymapviz/keyboards/sweet16/layout_editor/default.json diff --git a/keymapviz/keymapviz.py b/keymapviz/keymapviz.py index 0c996df..c310611 100755 --- a/keymapviz/keymapviz.py +++ b/keymapviz/keymapviz.py @@ -34,10 +34,11 @@ def parse_arg(): epilog='Following keyboards are supported.\n * '+'\n * '.join(keyboards), formatter_class=argparse.RawTextHelpFormatter) - parser.add_argument('-c', '--config', type=argparse.FileType('r'), help='configuration file') + parser.add_argument('-c', '--config', type=argparse.FileType('r'), help='configuration file') parser.add_argument('-k', '--keyboard', type=str, choices=keyboards, help='keyboard of keymap.c', metavar='keyboards') + parser.add_argument('-l', '--layout', type=str, help='keyboard layout', metavar='layout') parser.add_argument('-o', '--output', type=str, help='output file name("{}" is replaced index)') - parser.add_argument('-r', '--replace', action='store_true', help='replace comment block including "[keymapviz]" with ascii art. (make *.bac)') + parser.add_argument('-r', '--replace', action='store_true', help='replace comment block including "[keymapviz]" with ascii art. (make *.bac)') parser.add_argument('-t', '--type', dest='type_', type=str, choices=types, default=types[0], help='type of output(default:ascii)') parser.add_argument('-v', '--version', action='version', version='%(prog)s {}'.format(VERSION)) parser.add_argument('keymap_c', type=argparse.FileType('r', encoding='utf-8'), help='keymap.c file name') @@ -83,7 +84,7 @@ def output_keymap_c(output_filename, keymap_c): def main(): arg = parse_arg() - kmvz = keymapviz.Keymapviz(arg.keyboard, arg.keymap_c, read_config(arg.config)) + kmvz = keymapviz.Keymapviz(arg.keyboard, arg.keymap_c, arg.layout, read_config(arg.config)) keymaps = getattr(kmvz, TYPES[arg.type_])() output_keymaps(arg.output, keymaps) diff --git a/setup.py b/setup.py index 71abf17..caaf69a 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ def search_json_files(): chdir('keymapviz') - files = glob('keyboards/*/*.json') + files = glob('keyboards/*/layout_editor/*.json') chdir('..') return files From a6ad8167b7af7ed829fac85e58204ca6c91ce031 Mon Sep 17 00:00:00 2001 From: Yusuke Ohta <34795067+yskoht@users.noreply.github.com> Date: Thu, 30 Dec 2021 14:34:56 +0900 Subject: [PATCH 07/34] Merge ergodash_2u_inner into ergodash (#69) --- README.md | 13 +- keymapviz/__init__.py | 2 - keymapviz/keyboards/ergodash/__init__.py | 16 + .../layout_editor/2u_inner.json} | 24 +- .../ergodash/layout_editor/default.json | 302 ++++++++++++++---- .../keyboards/ergodash_2u_inner/__init__.py | 26 -- 6 files changed, 272 insertions(+), 111 deletions(-) rename keymapviz/keyboards/{ergodash_2u_inner/layout_editor/default.json => ergodash/layout_editor/2u_inner.json} (92%) delete mode 100644 keymapviz/keyboards/ergodash_2u_inner/__init__.py diff --git a/README.md b/README.md index b5ee327..9d9a7e8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ - # Keymapviz [![Python Version](https://img.shields.io/badge/Python-3.x-blue.svg)](PythonVersion) @@ -10,13 +9,12 @@ Following keyboards are supported. - [crkbd](https://github.com/qmk/qmk_firmware/tree/master/keyboards/crkbd) - [ergo42](https://github.com/qmk/qmk_firmware/tree/master/keyboards/ergo42) -- [ergodash](https://github.com/qmk/qmk_firmware/tree/master/keyboards/ergodash) -- [ergodash_2u_inner](https://github.com/qmk/qmk_firmware/tree/master/keyboards/ergodash) +- [ergodash](https://github.com/qmk/qmk_firmware/tree/master/keyboards/ergodash) (layout: `default`, `2u_inner`) - [ergodone](https://github.com/qmk/qmk_firmware/tree/master/keyboards/ergodone)(ergodox) - [ergodox_ez](https://github.com/qmk/qmk_firmware/tree/master/keyboards/ergodox_ez)(ergodox) - [fortitude60](https://github.com/qmk/qmk_firmware/tree/master/keyboards/fortitude60) - [helix](https://github.com/qmk/qmk_firmware/tree/master/keyboards/helix) -- [kaishi65](https://github.com/qmk/qmk_firmware/tree/master/keyboards/kbdclack/kaishi65) +- [kaishi65](https://github.com/qmk/qmk_firmware/tree/master/keyboards/kbdclack/kaishi65) - [kinesis](https://github.com/qmk/qmk_firmware/tree/master/keyboards/kinesis) - [kyria](https://github.com/qmk/qmk_firmware/tree/master/keyboards/splitkb/kyria) - [lets_split](https://github.com/qmk/qmk_firmware/tree/master/keyboards/lets_split) @@ -29,7 +27,7 @@ Following keyboards are supported. ## Install -Keymapviz works with ***Python3***. +Keymapviz works with **_Python3_**. ```sh $ pip3 install keymapviz @@ -113,21 +111,24 @@ $ keymapviz qmk_firmware/keyboards/ergodox_ez/keymaps/default/keymap.c Legend replacements. A config file containing legend replacements can be provided to change the legends to your liking. It should have a section named 'legends' and e.g. look like: + ``` [legends] KC_BLSLS=\ KC_QUOT=' ``` + It can then be provided on the commandline like: + ``` $ keymapviz qmk_firmware/keyboards/lets_split/keymaps/default/keymap.c -c /path/to/config.properties ``` + An example file is provided in the root of this project, named `config.properties`. Output json file. This json file can be used in [http://www.keyboard-layout-editor.com/](http://www.keyboard-layout-editor.com/). - ```sh $ keymapviz qmk_firmware/keyboards/lets_split/keymaps/default/keymap.c -t json -o 'lets_split{}.json' $ ls lets_split*.json diff --git a/keymapviz/__init__.py b/keymapviz/__init__.py index 3bc0e46..b6d6c5a 100644 --- a/keymapviz/__init__.py +++ b/keymapviz/__init__.py @@ -10,7 +10,6 @@ import keymapviz.keyboards.crkbd import keymapviz.keyboards.ergo42 import keymapviz.keyboards.ergodash -import keymapviz.keyboards.ergodash_2u_inner import keymapviz.keyboards.ergodox import keymapviz.keyboards.fortitude60 import keymapviz.keyboards.lets_split @@ -30,7 +29,6 @@ 'crkbd': keymapviz.keyboards.crkbd, 'ergo42': keymapviz.keyboards.ergo42, 'ergodash': keymapviz.keyboards.ergodash, - 'ergodash_2u_inner': keymapviz.keyboards.ergodash_2u_inner, 'ergodone': keymapviz.keyboards.ergodox, 'ergodox': keymapviz.keyboards.ergodox, 'ergodox_ez': keymapviz.keyboards.ergodox, diff --git a/keymapviz/keyboards/ergodash/__init__.py b/keymapviz/keyboards/ergodash/__init__.py index 9cb6c19..7dca3a5 100644 --- a/keymapviz/keyboards/ergodash/__init__.py +++ b/keymapviz/keyboards/ergodash/__init__.py @@ -3,10 +3,26 @@ keymap_keyword = '(?:LAYOUT)' layout_editor_json = { 'default': 'keyboards/ergodash/layout_editor/default.json', + '2u_inner': 'keyboards/ergodash/layout_editor/2u_inner.json', } ascii_art = { 'default': ''' +/* + * ,----------------------------------------------------------------------------------------------------------------------. + * |{ }|{ }|{ }|{ }|{ }|{ }|{ }| |{ }|{ }|{ }|{ }|{ }|{ }|{ }| + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * |{ }|{ }|{ }|{ }|{ }|{ }|{ }| |{ }|{ }|{ }|{ }|{ }|{ }|{ }| + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * |{ }|{ }|{ }|{ }|{ }|{ }|{ }| |{ }|{ }|{ }|{ }|{ }|{ }|{ }| + * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| + * |{ }|{ }|{ }|{ }|{ }|{ }|{ }| |{ }|{ }|{ }|{ }|{ }|{ }|{ }| + * |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| + * |{ }|{ }|{ }|{ }||||||||{ }|{ }|{ }||||||||{ }|{ }|{ }||||||||{ }|{ }|{ }|{ }| + * ,----------------------------------------------------------------------------------------------------------------------. + * generated by [keymapviz] */ +''', + '2u_inner': ''' /* ,-----------------------------------------------. ,-----------------------------------------------. * |{ 0 }|{ 1 }|{ 2 }|{ 3 }|{ 4 }|{ 5 }|-------. ,-------|{ 8 }|{ 9 }|{ 10 }|{ 11 }|{ 12 }|{ 13 }| * |-------+-------+-------+-------+-------+-------|{ 6 }| |{ 7 }|-------+-------+-------+-------+-------+-------| diff --git a/keymapviz/keyboards/ergodash_2u_inner/layout_editor/default.json b/keymapviz/keyboards/ergodash/layout_editor/2u_inner.json similarity index 92% rename from keymapviz/keyboards/ergodash_2u_inner/layout_editor/default.json rename to keymapviz/keyboards/ergodash/layout_editor/2u_inner.json index c70ffde..f6fe982 100644 --- a/keymapviz/keyboards/ergodash_2u_inner/layout_editor/default.json +++ b/keymapviz/keyboards/ergodash/layout_editor/2u_inner.json @@ -125,36 +125,30 @@ [ { "y": -0.5, - "x": 5.5, - "h": 2 + "x": 5.5 }, - "{61}", "{48}", { - "x": 1 + "h": 2 }, - "{49}", + "{62}", { + "x": 1, "h": 2 }, - "{64}" + "{63}", + "{49}" ], [ { "x": 4.5 }, "{60}", + "{61}", { - "x": 1 - }, - "{62}", - { - "x": 1 - }, - "{63}", - { - "x": 1 + "x": 3 }, + "{64}", "{65}" ] ] diff --git a/keymapviz/keyboards/ergodash/layout_editor/default.json b/keymapviz/keyboards/ergodash/layout_editor/default.json index f6fe982..a25f433 100644 --- a/keymapviz/keyboards/ergodash/layout_editor/default.json +++ b/keymapviz/keyboards/ergodash/layout_editor/default.json @@ -1,152 +1,330 @@ [ [ - "{0}", - "{1}", - "{2}", + { + "x": 3, + "a": 7 + }, "{3}", + { + "x": 7 + }, + "{10}" + ], + [ + { + "y": -0.75, + "x": 2 + }, + "{2}", + { + "x": 1 + }, "{4}", + { + "x": 5 + }, + "{9}", + { + "x": 1 + }, + "{11}" + ], + [ + { + "y": -0.75, + "x": 1 + }, + "{1}", + { + "x": 3 + }, "{5}", { - "x": 4 + "x": 3 }, "{8}", - "{9}", - "{10}", - "{11}", - "{12}", + { + "x": 3 + }, + "{12}" + ], + [ + { + "y": -0.75 + }, + "{0}", + { + "x": 13 + }, "{13}" ], [ { - "y": -0.5, - "x": 6 + "y": -0.75, + "x": 3 + }, + "{17}", + { + "x": 2 }, "{6}", + { + "x": 1 + }, + "{7}", { "x": 2 }, - "{7}" + "{24}" ], [ { - "y": -0.5 + "y": -0.75, + "x": 2 }, - "{14}", - "{15}", "{16}", - "{17}", + { + "x": 1 + }, "{18}", + { + "x": 5 + }, + "{23}", + { + "x": 1 + }, + "{25}" + ], + [ + { + "y": -0.75, + "x": 1 + }, + "{15}", + { + "x": 3 + }, "{19}", { - "x": 4 + "x": 3 }, "{22}", - "{23}", - "{24}", - "{25}", - "{26}", + { + "x": 3 + }, + "{26}" + ], + [ + { + "y": -0.75 + }, + "{14}", + { + "x": 13 + }, "{27}" ], [ { - "y": -0.5, - "x": 6 + "y": -0.75, + "x": 3 + }, + "{31}", + { + "x": 2 }, "{20}", + { + "x": 1 + }, + "{21}", { "x": 2 }, - "{21}" + "{38}" ], [ { - "y": -0.5 + "y": -0.75, + "x": 2 }, - "{28}", - "{29}", "{30}", - "{31}", + { + "x": 1 + }, "{32}", + { + "x": 5 + }, + "{37}", + { + "x": 1 + }, + "{39}" + ], + [ + { + "y": -0.75, + "x": 1 + }, + "{29}", + { + "x": 3 + }, "{33}", { - "x": 4 + "x": 3 }, "{36}", - "{37}", - "{38}", - "{39}", - "{40}", + { + "x": 3 + }, + "{40}" + ], + [ + { + "y": -0.75 + }, + "{28}", + { + "x": 13 + }, "{41}" ], [ { - "y": -0.5, - "x": 6 + "y": -0.75, + "x": 3 + }, + "{45}", + { + "x": 2 }, "{34}", + { + "x": 1 + }, + "{35}", { "x": 2 }, - "{35}" + "{52}" ], [ { - "y": -0.5 + "y": -0.75, + "x": 2 }, - "{42}", - "{43}", "{44}", - "{45}", + { + "x": 1 + }, "{46}", + { + "x": 5 + }, + "{51}", + { + "x": 1 + }, + "{53}" + ], + [ + { + "y": -0.75, + "x": 1 + }, + "{43}", + { + "x": 3 + }, "{47}", { - "x": 4 + "x": 3 }, "{50}", - "{51}", - "{52}", - "{53}", - "{54}", + { + "x": 3 + }, + "{54}" + ], + [ + { + "y": -0.75 + }, + "{42}", + { + "x": 13 + }, "{55}" ], [ - "{56}", - "{57}", + { + "y": -0.5, + "x": 2 + }, "{58}", + { + "x": 0.25 + }, "{59}", { - "x": 8 + "x": 6.5 }, "{66}", - "{67}", - "{68}", - "{69}" + { + "x": 0.25 + }, + "{67}" ], [ { - "y": -0.5, - "x": 5.5 + "y": -0.75, + "x": 1 }, - "{48}", + "{57}", { - "h": 2 + "x": 11 }, - "{62}", + "{68}" + ], + [ { - "x": 1, - "h": 2 + "y": -0.75 }, - "{63}", - "{49}" + "{56}", + { + "x": 13 + }, + "{69}" ], [ { - "x": 4.5 + "r": 30, + "y": -5.25, + "x": 7.5 + }, + "{48}" + ], + [ + { + "x": 6.5 }, "{60}", - "{61}", + "{61}" + ], + [ { - "x": 3 + "r": -30, + "y": 5.5, + "x": 4.5 + }, + "{49}" + ], + [ + { + "x": 4.5 }, "{64}", "{65}" diff --git a/keymapviz/keyboards/ergodash_2u_inner/__init__.py b/keymapviz/keyboards/ergodash_2u_inner/__init__.py deleted file mode 100644 index 05a2e44..0000000 --- a/keymapviz/keyboards/ergodash_2u_inner/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -# -*- coding: utf-8 -*- - -keymap_keyword = '(?:KEYMAP|LAYOUT_4key_2u_inner)' -layout_editor_json = { - 'default': 'keyboards/ergodash_2u_inner/layout_editor/default.json', -} - -ascii_art = { - 'default': ''' -/* ,-----------------------------------------------. ,-----------------------------------------------. - * |{ 0 }|{ 1 }|{ 2 }|{ 3 }|{ 4 }|{ 5 }|-------. ,-------|{ 8 }|{ 9 }|{ 10 }|{ 11 }|{ 12 }|{ 13 }| - * |-------+-------+-------+-------+-------+-------|{ 6 }| |{ 7 }|-------+-------+-------+-------+-------+-------| - * |{ 14 }|{ 15 }|{ 16 }|{ 17 }|{ 18 }|{ 19 }|-------| |-------|{ 22 }|{ 23 }|{ 24 }|{ 25 }|{ 26 }|{ 27 }| - * |-------+-------+-------+-------+-------+-------|{ 20 }| |{ 21 }|-------+-------+-------+-------+-------+-------| - * |{ 28 }|{ 29 }|{ 30 }|{ 31 }|{ 32 }|{ 33 }|-------| |-------|{ 36 }|{ 37 }|{ 38 }|{ 39 }|{ 40 }|{ 41 }| - * |-------+-------+-------+-------+-------+-------|{ 34 }| |{ 35 }|-------+-------+-------+-------+-------+-------| - * |{ 42 }|{ 43 }|{ 44 }|{ 45 }|{ 46 }|{ 47 }|-------' `-------|{ 50 }|{ 51 }|{ 52 }|{ 53 }|{ 54 }|{ 55 }| - * |-------+-------+-------+-------+---------------' `---------------+-------+-------+-------+-------| - * |{ 56 }|{ 57 }|{ 58 }|{ 59 }| ,---------------. ,---------------. |{ 66 }|{ 67 }|{ 68 }|{ 69 }| - * `-------------------------------' | |{ 48 }| |{ 49 }| | ,-------------------------------' - * ,-------|{ 61 }|-------| |-------|{ 64 }|-------. - * |{ 60 }| |{ 62 }| |{ 63 }| |{ 65 }| - * `-----------------------' `-----------------------' - * generated by [keymapviz] */ -''', -} From dbac9ff9c6c3abc3442b9da73965c9e227bbb866 Mon Sep 17 00:00:00 2001 From: Yusuke Ohta <34795067+yskoht@users.noreply.github.com> Date: Thu, 30 Dec 2021 15:04:52 +0900 Subject: [PATCH 08/34] Add layout for each keyboard in help (#70) --- keymapviz/keymapviz.py | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/keymapviz/keymapviz.py b/keymapviz/keymapviz.py index c310611..b3eae7b 100755 --- a/keymapviz/keymapviz.py +++ b/keymapviz/keymapviz.py @@ -24,18 +24,35 @@ def split_path(path): return [tail] return split_path(head) + [tail] +def get_epilog(keyboard_keys): + keyboard_layouts_pairs = [] + for key in keyboard_keys: + layout_keys = list(keymapviz.KEYBOARDS[key].ascii_art.keys()) + keyboard_layouts_pairs.append((key, layout_keys)) + layouts_dict = dict(keyboard_layouts_pairs) + + keyboard_descriptions = [] + for key in keyboard_keys: + desc = '{} ({})'.format('{:20}'.format(key), ', '.join(layouts_dict[key])) + keyboard_descriptions.append(desc) + + header = 'Following keyboards (and layouts) are supported.' + keyboard_description = '\n * '.join(keyboard_descriptions) + epilog = header + '\n * ' + keyboard_description + return epilog def parse_arg(): - keyboards = sorted(keymapviz.KEYBOARDS.keys()) + keyboard_keys = sorted(keymapviz.KEYBOARDS.keys()) types = list(TYPES.keys()) desc = 'keymap.c visualizer' + epilog = get_epilog(keyboard_keys) parser = argparse.ArgumentParser(description=desc, - epilog='Following keyboards are supported.\n * '+'\n * '.join(keyboards), + epilog=epilog, formatter_class=argparse.RawTextHelpFormatter) parser.add_argument('-c', '--config', type=argparse.FileType('r'), help='configuration file') - parser.add_argument('-k', '--keyboard', type=str, choices=keyboards, help='keyboard of keymap.c', metavar='keyboards') + parser.add_argument('-k', '--keyboard', type=str, choices=keyboard_keys, help='keyboard of keymap.c', metavar='keyboards') parser.add_argument('-l', '--layout', type=str, help='keyboard layout', metavar='layout') parser.add_argument('-o', '--output', type=str, help='output file name("{}" is replaced index)') parser.add_argument('-r', '--replace', action='store_true', help='replace comment block including "[keymapviz]" with ascii art. (make *.bac)') @@ -48,7 +65,7 @@ def parse_arg(): # Search keyboard name in 'keymap_c' path, if '-k' option is empty. if arg.keyboard is None: path = split_path(os.path.abspath(arg.keymap_c.name)) - pset = list(set(path) & set(keyboards)) # product set + pset = list(set(path) & set(keyboard_keys)) # product set if not pset: print('Sorry. Please choose your keyboard(-k/--keyboard).', file=sys.stderr) sys.exit(1) From 72df5e37b461b2afb4aa13876f4030da423cc5a6 Mon Sep 17 00:00:00 2001 From: Yusuke Ohta <34795067+yskoht@users.noreply.github.com> Date: Thu, 30 Dec 2021 16:56:14 +0900 Subject: [PATCH 09/34] Fix test (#71) --- keymapviz/keyboards/moonlander/__init__.py | 3 +- test/expect/crkbd_fancy.c | 40 ++ test/expect/ergo42_fancy.c | 36 ++ test/expect/ergodash_L2u_inner.c | 60 +++ test/expect/ergodash_L2u_inner_0.json | 154 ++++++++ test/expect/ergodash_L2u_inner_1.json | 154 ++++++++ test/expect/ergodash_L2u_inner_2.json | 154 ++++++++ test/expect/ergodash_L2u_inner_3.json | 154 ++++++++ test/expect/ergodash_L2u_inner_fancy.c | 60 +++ test/expect/ergodash_fancy.c | 52 +++ test/expect/ergodox_fancy.c | 57 +++ test/expect/fortitude60_fancy.c | 72 ++++ test/expect/helix_fancy.c | 144 +++++++ test/expect/kaishi65.c | 26 ++ test/expect/kaishi65_0.json | 117 ++++++ test/expect/kaishi65_1.json | 117 ++++++ test/expect/kaishi65_fancy.c | 26 ++ test/expect/kinesis_fancy.c | 21 + test/expect/kyria_fancy.c | 77 ++++ test/expect/lets_split_fancy.c | 60 +++ test/expect/lily58_fancy.c | 52 +++ test/expect/mint60_fancy.c | 26 ++ test/expect/moonlander.c | 51 +++ test/expect/moonlander_0.json | 370 ++++++++++++++++++ test/expect/moonlander_1.json | 370 ++++++++++++++++++ test/expect/moonlander_2.json | 370 ++++++++++++++++++ test/expect/moonlander_fancy.c | 51 +++ test/expect/replace_lets_split_keymap_fancy.c | 111 ++++++ test/expect/sofle.c | 65 +++ test/expect/sofle_0.json | 301 ++++++++++++++ test/expect/sofle_1.json | 301 ++++++++++++++ test/expect/sofle_2.json | 301 ++++++++++++++ test/expect/sofle_3.json | 301 ++++++++++++++ test/expect/sofle_4.json | 301 ++++++++++++++ test/expect/sofle_fancy.c | 65 +++ test/expect/sweet16_fancy.c | 10 + test/input/replace_lets_split_keymap_fancy.c | 68 ++++ test/test.py | 280 ++++++++----- 38 files changed, 4888 insertions(+), 90 deletions(-) create mode 100644 test/expect/crkbd_fancy.c create mode 100644 test/expect/ergo42_fancy.c create mode 100644 test/expect/ergodash_L2u_inner.c create mode 100644 test/expect/ergodash_L2u_inner_0.json create mode 100644 test/expect/ergodash_L2u_inner_1.json create mode 100644 test/expect/ergodash_L2u_inner_2.json create mode 100644 test/expect/ergodash_L2u_inner_3.json create mode 100644 test/expect/ergodash_L2u_inner_fancy.c create mode 100644 test/expect/ergodash_fancy.c create mode 100644 test/expect/ergodox_fancy.c create mode 100644 test/expect/fortitude60_fancy.c create mode 100644 test/expect/helix_fancy.c create mode 100644 test/expect/kaishi65.c create mode 100644 test/expect/kaishi65_0.json create mode 100644 test/expect/kaishi65_1.json create mode 100644 test/expect/kaishi65_fancy.c create mode 100644 test/expect/kinesis_fancy.c create mode 100644 test/expect/kyria_fancy.c create mode 100644 test/expect/lets_split_fancy.c create mode 100644 test/expect/lily58_fancy.c create mode 100644 test/expect/mint60_fancy.c create mode 100644 test/expect/moonlander.c create mode 100644 test/expect/moonlander_0.json create mode 100644 test/expect/moonlander_1.json create mode 100644 test/expect/moonlander_2.json create mode 100644 test/expect/moonlander_fancy.c create mode 100644 test/expect/replace_lets_split_keymap_fancy.c create mode 100644 test/expect/sofle.c create mode 100644 test/expect/sofle_0.json create mode 100644 test/expect/sofle_1.json create mode 100644 test/expect/sofle_2.json create mode 100644 test/expect/sofle_3.json create mode 100644 test/expect/sofle_4.json create mode 100644 test/expect/sofle_fancy.c create mode 100644 test/expect/sweet16_fancy.c create mode 100644 test/input/replace_lets_split_keymap_fancy.c diff --git a/keymapviz/keyboards/moonlander/__init__.py b/keymapviz/keyboards/moonlander/__init__.py index e7ef26e..ac74830 100644 --- a/keymapviz/keyboards/moonlander/__init__.py +++ b/keymapviz/keyboards/moonlander/__init__.py @@ -23,6 +23,7 @@ * |{59 }| !{60 }| * .-------+---------------! !---------------+-------. * !{66 }!{67 }|{68 }| !{69 }|{70 }!{71 }! - * '-----------------------' '-----------------------' */ + * '-----------------------' '-----------------------' + * generated by [keymapviz] */ ''', } diff --git a/test/expect/crkbd_fancy.c b/test/expect/crkbd_fancy.c new file mode 100644 index 0000000..9308d0d --- /dev/null +++ b/test/expect/crkbd_fancy.c @@ -0,0 +1,40 @@ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ TAB │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LCTL │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ SCLN │ QUOT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ Z │ X │ C │ V │ B │ │ N │ M │ COMM │ DOT │ SLSH │ ESC │ + * └──────┴──────┴──────┴──────┼──────┼──────┼──────┐ ┌──────┼──────┼──────┼──────┴──────┴──────┴──────┘ + * │ LGUI │MO(1) │ SPC │ │ ENT │MO(2) │ RALT │ + * └──────┴──────┴──────┘ └──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ TAB │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LCTL │ │ │ │ │ │ │ LEFT │ DOWN │ UP │RIGHT │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ │ │ │ │ │ │ │ │ │ │ │ │ + * └──────┴──────┴──────┴──────┼──────┼──────┼──────┐ ┌──────┼──────┼──────┼──────┴──────┴──────┴──────┘ + * │ LGUI │ │ SPC │ │ ENT │MO(3) │ RALT │ + * └──────┴──────┴──────┘ └──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ TAB │ EXLM │ AT │ HASH │ DLR │ PERC │ │ CIRC │ AMPR │ ASTR │ LPRN │ RPRN │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LCTL │ │ │ │ │ │ │ MINS │ EQL │ LBRC │ RBRC │ BSLS │ GRV │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ │ │ │ │ │ │ UNDS │ PLUS │ LCBR │ RCBR │ PIPE │ TILD │ + * └──────┴──────┴──────┴──────┼──────┼──────┼──────┐ ┌──────┼──────┼──────┼──────┴──────┴──────┴──────┘ + * │ LGUI │MO(3) │ SPC │ │ ENT │ │ RALT │ + * └──────┴──────┴──────┘ └──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │RESET │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │RGB_TO│RGB_HU│RGB_SA│RGB_VA│ │ │ │ │ │ │ │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │RGB_MO│RGB_HU│RGB_SA│RGB_VA│ │ │ │ │ │ │ │ │ │ + * └──────┴──────┴──────┴──────┼──────┼──────┼──────┐ ┌──────┼──────┼──────┼──────┴──────┴──────┴──────┘ + * │ LGUI │ │ SPC │ │ ENT │ │ RALT │ + * └──────┴──────┴──────┘ └──────┴──────┴──────┘ + * generated by [keymapviz] */ diff --git a/test/expect/ergo42_fancy.c b/test/expect/ergo42_fancy.c new file mode 100644 index 0000000..e102b68 --- /dev/null +++ b/test/expect/ergo42_fancy.c @@ -0,0 +1,36 @@ +/* + * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ ESC │ TAB │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ LBRC │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ DEL │ RCTL │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ SCLN │ RBRC │ ENT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │MO(SYM│ LSFT │ Z │ X │ C │ V │ B │ │ N │ M │ COMM │ DOT │ SLSH │ UP │ RSFT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LGUI │ LCTL │ GRV │ BSLS │ LALT │MO(MET│ SPC │ │ SPC │ QUOT │ MINS │ EQL │ LEFT │ DOWN │ RGHT │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * └──────┴──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* + * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │RESET │ 1 │ 2 │ 3 │ 4 │ 5 │ LBRC │ │ RBRC │ 6 │ 7 │ 8 │ 9 │ 0 │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ F1 │ │ MHEN │ HENK │ │ │ │ LEFT │ DOWN │ UP │ RGHT │ │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ F2 │ F3 │ F4 │ F5 │ F6 │S(KC_L│ │S(KC_R│ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * └──────┴──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* + * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ │S(KC_1│S(KC_2│S(KC_3│S(KC_4│S(KC_5│ LBRC │ │ RBRC │S(KC_6│S(KC_7│S(KC_8│S(KC_9│S(KC_0│ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │S(KC_9│ │S(KC_0│ │ │ │ │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │S(KC_L│ │S(KC_R│ │ │ │ │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * └──────┴──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ diff --git a/test/expect/ergodash_L2u_inner.c b/test/expect/ergodash_L2u_inner.c new file mode 100644 index 0000000..4f050b0 --- /dev/null +++ b/test/expect/ergodash_L2u_inner.c @@ -0,0 +1,60 @@ +/* ,-----------------------------------------------. ,-----------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 |-------. ,-------| 6 | 7 | 8 | 9 | 0 | PSCR | + * |-------+-------+-------+-------+-------+-------| LBRC | | RBRC |-------+-------+-------+-------+-------+-------| + * | GRV | Q | W | E | R | T |-------| |-------| Y | U | I | O | P | BSLS | + * |-------+-------+-------+-------+-------+-------| MINS | | EQL |-------+-------+-------+-------+-------+-------| + * | TAB | A | S | D | F | G |-------| |-------| H | J | K | L | SCLN | QUOT | + * |-------+-------+-------+-------+-------+-------| DEL | | BSPC |-------+-------+-------+-------+-------+-------| + * | LSFT | Z | X | C | V | B |-------' `-------| N | M | COMM | DOT | SLSH | RSFT | + * |-------+-------+-------+-------+---------------' `---------------+-------+-------+-------+-------| + * | LCTL | LGUI | LALT | EISU | ,---------------. ,---------------. | LEFT | DOWN | UP | RGHT | + * `-------------------------------' | SPC | | | | ENT | ,-------------------------------' + * ,-------+-------| DEL | | BSPC |-------+-------. + * | LOWER | SPC | | | | ENT | RAISE | + * `-----------------------' `-----------------------' + * generated by [keymapviz] */ +/* ,-----------------------------------------------. ,-----------------------------------------------. + * | F11 | F1 | F2 | F3 | F4 | F5 |-------. ,-------| F6 | F7 | F8 | F9 | F10 | F12 | + * |-------+-------+-------+-------+-------+-------| LCBR | | RCBR |-------+-------+-------+-------+-------+-------| + * | TILD | EXLM | AT | HASH | DLR | PERC |-------| |-------| CIRC | AMPR | ASTR | LPRN | RPRN | PIPE | + * |-------+-------+-------+-------+-------+-------| UNDS | | PLUS |-------+-------+-------+-------+-------+-------| + * | TAB | 1 | 2 | 3 | 4 | 5 |-------| |-------| H | J | K | L | COLN | DQT | + * |-------+-------+-------+-------+-------+-------| DEL | | BSPC |-------+-------+-------+-------+-------+-------| + * | LSFT | 6 | 7 | 8 | 9 | 0 |-------' `-------| N | M | LT | GT | QUES | RSFT | + * |-------+-------+-------+-------+---------------' `---------------+-------+-------+-------+-------| + * | LCTL | LGUI | LALT | EISU | ,---------------. ,---------------. | HOME | PGDN | PGUP | END | + * `-------------------------------' | SPC | | | | ENT | ,-------------------------------' + * ,-------+-------| DEL | | BSPC |-------+-------. + * | LOWER | SPC | | | | ENT | RAISE | + * `-----------------------' `-----------------------' + * generated by [keymapviz] */ +/* ,-----------------------------------------------. ,-----------------------------------------------. + * | F11 | F1 | F2 | F3 | F4 | F5 |-------. ,-------| F6 | F7 | F8 | F9 | F10 | F12 | + * |-------+-------+-------+-------+-------+-------| LCBR | | RCBR |-------+-------+-------+-------+-------+-------| + * | TILD | EXLM | AT | HASH | DLR | PERC |-------| |-------| CIRC | AMPR | ASTR | LPRN | RPRN | PIPE | + * |-------+-------+-------+-------+-------+-------| UNDS | | PLUS |-------+-------+-------+-------+-------+-------| + * | TAB | 1 | 2 | 3 | 4 | 5 |-------| |-------| H | J | K | L | COLN | DQT | + * |-------+-------+-------+-------+-------+-------| DEL | | BSPC |-------+-------+-------+-------+-------+-------| + * | LSFT | 6 | 7 | 8 | 9 | 0 |-------' `-------| N | M | LT | GT | QUES | RSFT | + * |-------+-------+-------+-------+---------------' `---------------+-------+-------+-------+-------| + * | LCTL | LGUI | LALT | EISU | ,---------------. ,---------------. | HOME | PGDN | PGUP | END | + * `-------------------------------' | SPC | | | | ENT | ,-------------------------------' + * ,-------+-------| DEL | | BSPC |-------+-------. + * | LOWER | SPC | | | | ENT | RAISE | + * `-----------------------' `-----------------------' + * generated by [keymapviz] */ +/* ,-----------------------------------------------. ,-----------------------------------------------. + * | | | | | | |-------. ,-------| | | | | | | + * |-------+-------+-------+-------+-------+-------| | | |-------+-------+-------+-------+-------+-------| + * | | RESET |RGB_TOG|RGB_MOD|RGB_HUD|RGB_HUI|-------| |-------|RGB_SAD|RGB_SAI|RGB_VAD|RGB_VAI| | | + * |-------+-------+-------+-------+-------+-------| | | |-------+-------+-------+-------+-------+-------| + * | | |BL_TOGG|BL_BRTG|BL_INC |BL_DEC |-------| |-------| | | | | | | + * |-------+-------+-------+-------+-------+-------| | | |-------+-------+-------+-------+-------+-------| + * | | | | | | |-------' `-------| | | | | | | + * |-------+-------+-------+-------+---------------' `---------------+-------+-------+-------+-------| + * | | | | | ,---------------. ,---------------. | | | | | + * `-------------------------------' | | | | | | ,-------------------------------' + * ,-------+-------| | | |-------+-------. + * | | | | | | | | + * `-----------------------' `-----------------------' + * generated by [keymapviz] */ diff --git a/test/expect/ergodash_L2u_inner_0.json b/test/expect/ergodash_L2u_inner_0.json new file mode 100644 index 0000000..d503fb6 --- /dev/null +++ b/test/expect/ergodash_L2u_inner_0.json @@ -0,0 +1,154 @@ +[ + [ + "ESC", + "1", + "2", + "3", + "4", + "5", + { + "x": 4 + }, + "6", + "7", + "8", + "9", + "0", + "PSCR" + ], + [ + { + "y": -0.5, + "x": 6 + }, + "LBRC", + { + "x": 2 + }, + "RBRC" + ], + [ + { + "y": -0.5 + }, + "GRV", + "Q", + "W", + "E", + "R", + "T", + { + "x": 4 + }, + "Y", + "U", + "I", + "O", + "P", + "BSLS" + ], + [ + { + "y": -0.5, + "x": 6 + }, + "MINS", + { + "x": 2 + }, + "EQL" + ], + [ + { + "y": -0.5 + }, + "TAB", + "A", + "S", + "D", + "F", + "G", + { + "x": 4 + }, + "H", + "J", + "K", + "L", + "SCLN", + "QUOT" + ], + [ + { + "y": -0.5, + "x": 6 + }, + "DEL", + { + "x": 2 + }, + "BSPC" + ], + [ + { + "y": -0.5 + }, + "LSFT", + "Z", + "X", + "C", + "V", + "B", + { + "x": 4 + }, + "N", + "M", + "COMM", + "DOT", + "SLSH", + "RSFT" + ], + [ + "LCTL", + "LGUI", + "LALT", + "EISU", + { + "x": 8 + }, + "LEFT", + "DOWN", + "UP", + "RGHT" + ], + [ + { + "y": -0.5, + "x": 5.5 + }, + "SPC", + { + "h": 2 + }, + "DEL", + { + "x": 1, + "h": 2 + }, + "BSPC", + "ENT" + ], + [ + { + "x": 4.5 + }, + "LOWER", + "SPC", + { + "x": 3 + }, + "ENT", + "RAISE" + ] +] diff --git a/test/expect/ergodash_L2u_inner_1.json b/test/expect/ergodash_L2u_inner_1.json new file mode 100644 index 0000000..45abbc8 --- /dev/null +++ b/test/expect/ergodash_L2u_inner_1.json @@ -0,0 +1,154 @@ +[ + [ + "F11", + "F1", + "F2", + "F3", + "F4", + "F5", + { + "x": 4 + }, + "F6", + "F7", + "F8", + "F9", + "F10", + "F12" + ], + [ + { + "y": -0.5, + "x": 6 + }, + "LCBR", + { + "x": 2 + }, + "RCBR" + ], + [ + { + "y": -0.5 + }, + "TILD", + "EXLM", + "AT", + "HASH", + "DLR", + "PERC", + { + "x": 4 + }, + "CIRC", + "AMPR", + "ASTR", + "LPRN", + "RPRN", + "PIPE" + ], + [ + { + "y": -0.5, + "x": 6 + }, + "UNDS", + { + "x": 2 + }, + "PLUS" + ], + [ + { + "y": -0.5 + }, + "TAB", + "1", + "2", + "3", + "4", + "5", + { + "x": 4 + }, + "H", + "J", + "K", + "L", + "COLN", + "DQT" + ], + [ + { + "y": -0.5, + "x": 6 + }, + "DEL", + { + "x": 2 + }, + "BSPC" + ], + [ + { + "y": -0.5 + }, + "LSFT", + "6", + "7", + "8", + "9", + "0", + { + "x": 4 + }, + "N", + "M", + "LT", + "GT", + "QUES", + "RSFT" + ], + [ + "LCTL", + "LGUI", + "LALT", + "EISU", + { + "x": 8 + }, + "HOME", + "PGDN", + "PGUP", + "END" + ], + [ + { + "y": -0.5, + "x": 5.5 + }, + "SPC", + { + "h": 2 + }, + "DEL", + { + "x": 1, + "h": 2 + }, + "BSPC", + "ENT" + ], + [ + { + "x": 4.5 + }, + "LOWER", + "SPC", + { + "x": 3 + }, + "ENT", + "RAISE" + ] +] diff --git a/test/expect/ergodash_L2u_inner_2.json b/test/expect/ergodash_L2u_inner_2.json new file mode 100644 index 0000000..45abbc8 --- /dev/null +++ b/test/expect/ergodash_L2u_inner_2.json @@ -0,0 +1,154 @@ +[ + [ + "F11", + "F1", + "F2", + "F3", + "F4", + "F5", + { + "x": 4 + }, + "F6", + "F7", + "F8", + "F9", + "F10", + "F12" + ], + [ + { + "y": -0.5, + "x": 6 + }, + "LCBR", + { + "x": 2 + }, + "RCBR" + ], + [ + { + "y": -0.5 + }, + "TILD", + "EXLM", + "AT", + "HASH", + "DLR", + "PERC", + { + "x": 4 + }, + "CIRC", + "AMPR", + "ASTR", + "LPRN", + "RPRN", + "PIPE" + ], + [ + { + "y": -0.5, + "x": 6 + }, + "UNDS", + { + "x": 2 + }, + "PLUS" + ], + [ + { + "y": -0.5 + }, + "TAB", + "1", + "2", + "3", + "4", + "5", + { + "x": 4 + }, + "H", + "J", + "K", + "L", + "COLN", + "DQT" + ], + [ + { + "y": -0.5, + "x": 6 + }, + "DEL", + { + "x": 2 + }, + "BSPC" + ], + [ + { + "y": -0.5 + }, + "LSFT", + "6", + "7", + "8", + "9", + "0", + { + "x": 4 + }, + "N", + "M", + "LT", + "GT", + "QUES", + "RSFT" + ], + [ + "LCTL", + "LGUI", + "LALT", + "EISU", + { + "x": 8 + }, + "HOME", + "PGDN", + "PGUP", + "END" + ], + [ + { + "y": -0.5, + "x": 5.5 + }, + "SPC", + { + "h": 2 + }, + "DEL", + { + "x": 1, + "h": 2 + }, + "BSPC", + "ENT" + ], + [ + { + "x": 4.5 + }, + "LOWER", + "SPC", + { + "x": 3 + }, + "ENT", + "RAISE" + ] +] diff --git a/test/expect/ergodash_L2u_inner_3.json b/test/expect/ergodash_L2u_inner_3.json new file mode 100644 index 0000000..0acee65 --- /dev/null +++ b/test/expect/ergodash_L2u_inner_3.json @@ -0,0 +1,154 @@ +[ + [ + "", + "", + "", + "", + "", + "", + { + "x": 4 + }, + "", + "", + "", + "", + "", + "" + ], + [ + { + "y": -0.5, + "x": 6 + }, + "", + { + "x": 2 + }, + "" + ], + [ + { + "y": -0.5 + }, + "", + "RESET", + "RGB_TOG", + "RGB_MOD", + "RGB_HUD", + "RGB_HUI", + { + "x": 4 + }, + "RGB_SAD", + "RGB_SAI", + "RGB_VAD", + "RGB_VAI", + "", + "" + ], + [ + { + "y": -0.5, + "x": 6 + }, + "", + { + "x": 2 + }, + "" + ], + [ + { + "y": -0.5 + }, + "", + "", + "BL_TOGG", + "BL_BRTG", + "BL_INC", + "BL_DEC", + { + "x": 4 + }, + "", + "", + "", + "", + "", + "" + ], + [ + { + "y": -0.5, + "x": 6 + }, + "", + { + "x": 2 + }, + "" + ], + [ + { + "y": -0.5 + }, + "", + "", + "", + "", + "", + "", + { + "x": 4 + }, + "", + "", + "", + "", + "", + "" + ], + [ + "", + "", + "", + "", + { + "x": 8 + }, + "", + "", + "", + "" + ], + [ + { + "y": -0.5, + "x": 5.5 + }, + "", + { + "h": 2 + }, + "", + { + "x": 1, + "h": 2 + }, + "", + "" + ], + [ + { + "x": 4.5 + }, + "", + "", + { + "x": 3 + }, + "", + "" + ] +] diff --git a/test/expect/ergodash_L2u_inner_fancy.c b/test/expect/ergodash_L2u_inner_fancy.c new file mode 100644 index 0000000..f288fe6 --- /dev/null +++ b/test/expect/ergodash_L2u_inner_fancy.c @@ -0,0 +1,60 @@ +/* ┌───────┬───────┬───────┬───────┬───────┬───────┐ ┌───────┬───────┬───────┬───────┬───────┬───────┐ + * │ ESC │ 1 │ 2 │ 3 │ 4 │ 5 ├───────┐ ┌───────┤ 6 │ 7 │ 8 │ 9 │ 0 │ PSCR │ + * ├───────┼───────┼───────┼───────┼───────┼───────┤ LBRC │ │ RBRC ├───────┼───────┼───────┼───────┼───────┼───────┤ + * │ GRV │ Q │ W │ E │ R │ T ├───────┤ ├───────┤ Y │ U │ I │ O │ P │ BSLS │ + * ├───────┼───────┼───────┼───────┼───────┼───────┤ MINS │ │ EQL ├───────┼───────┼───────┼───────┼───────┼───────┤ + * │ TAB │ A │ S │ D │ F │ G ├───────┤ ├───────┤ H │ J │ K │ L │ SCLN │ QUOT │ + * ├───────┼───────┼───────┼───────┼───────┼───────┤ DEL │ │ BSPC ├───────┼───────┼───────┼───────┼───────┼───────┤ + * │ LSFT │ Z │ X │ C │ V │ B ├───────┘ └───────┤ N │ M │ COMM │ DOT │ SLSH │ RSFT │ + * ├───────┼───────┼───────┼───────┼───────┴───────┘ └───────┴───────┼───────┼───────┼───────┼───────┤ + * │ LCTL │ LGUI │ LALT │ EISU │ ┌───────┬───────┐ ┌───────┬───────┐ │ LEFT │ DOWN │ UP │ RGHT │ + * └───────┴───────┴───────┴───────┘ │ SPC │ │ │ │ ENT │ └───────┴───────┴───────┴───────┘ + * ┌───────┼───────┤ DEL │ │ BSPC ├───────┼───────┐ + * │ LOWER │ SPC │ │ │ │ ENT │ RAISE │ + * └───────┴───────┴───────┘ └───────┴───────┴───────┘ + * generated by [keymapviz] */ +/* ┌───────┬───────┬───────┬───────┬───────┬───────┐ ┌───────┬───────┬───────┬───────┬───────┬───────┐ + * │ F11 │ F1 │ F2 │ F3 │ F4 │ F5 ├───────┐ ┌───────┤ F6 │ F7 │ F8 │ F9 │ F10 │ F12 │ + * ├───────┼───────┼───────┼───────┼───────┼───────┤ LCBR │ │ RCBR ├───────┼───────┼───────┼───────┼───────┼───────┤ + * │ TILD │ EXLM │ AT │ HASH │ DLR │ PERC ├───────┤ ├───────┤ CIRC │ AMPR │ ASTR │ LPRN │ RPRN │ PIPE │ + * ├───────┼───────┼───────┼───────┼───────┼───────┤ UNDS │ │ PLUS ├───────┼───────┼───────┼───────┼───────┼───────┤ + * │ TAB │ 1 │ 2 │ 3 │ 4 │ 5 ├───────┤ ├───────┤ H │ J │ K │ L │ COLN │ DQT │ + * ├───────┼───────┼───────┼───────┼───────┼───────┤ DEL │ │ BSPC ├───────┼───────┼───────┼───────┼───────┼───────┤ + * │ LSFT │ 6 │ 7 │ 8 │ 9 │ 0 ├───────┘ └───────┤ N │ M │ LT │ GT │ QUES │ RSFT │ + * ├───────┼───────┼───────┼───────┼───────┴───────┘ └───────┴───────┼───────┼───────┼───────┼───────┤ + * │ LCTL │ LGUI │ LALT │ EISU │ ┌───────┬───────┐ ┌───────┬───────┐ │ HOME │ PGDN │ PGUP │ END │ + * └───────┴───────┴───────┴───────┘ │ SPC │ │ │ │ ENT │ └───────┴───────┴───────┴───────┘ + * ┌───────┼───────┤ DEL │ │ BSPC ├───────┼───────┐ + * │ LOWER │ SPC │ │ │ │ ENT │ RAISE │ + * └───────┴───────┴───────┘ └───────┴───────┴───────┘ + * generated by [keymapviz] */ +/* ┌───────┬───────┬───────┬───────┬───────┬───────┐ ┌───────┬───────┬───────┬───────┬───────┬───────┐ + * │ F11 │ F1 │ F2 │ F3 │ F4 │ F5 ├───────┐ ┌───────┤ F6 │ F7 │ F8 │ F9 │ F10 │ F12 │ + * ├───────┼───────┼───────┼───────┼───────┼───────┤ LCBR │ │ RCBR ├───────┼───────┼───────┼───────┼───────┼───────┤ + * │ TILD │ EXLM │ AT │ HASH │ DLR │ PERC ├───────┤ ├───────┤ CIRC │ AMPR │ ASTR │ LPRN │ RPRN │ PIPE │ + * ├───────┼───────┼───────┼───────┼───────┼───────┤ UNDS │ │ PLUS ├───────┼───────┼───────┼───────┼───────┼───────┤ + * │ TAB │ 1 │ 2 │ 3 │ 4 │ 5 ├───────┤ ├───────┤ H │ J │ K │ L │ COLN │ DQT │ + * ├───────┼───────┼───────┼───────┼───────┼───────┤ DEL │ │ BSPC ├───────┼───────┼───────┼───────┼───────┼───────┤ + * │ LSFT │ 6 │ 7 │ 8 │ 9 │ 0 ├───────┘ └───────┤ N │ M │ LT │ GT │ QUES │ RSFT │ + * ├───────┼───────┼───────┼───────┼───────┴───────┘ └───────┴───────┼───────┼───────┼───────┼───────┤ + * │ LCTL │ LGUI │ LALT │ EISU │ ┌───────┬───────┐ ┌───────┬───────┐ │ HOME │ PGDN │ PGUP │ END │ + * └───────┴───────┴───────┴───────┘ │ SPC │ │ │ │ ENT │ └───────┴───────┴───────┴───────┘ + * ┌───────┼───────┤ DEL │ │ BSPC ├───────┼───────┐ + * │ LOWER │ SPC │ │ │ │ ENT │ RAISE │ + * └───────┴───────┴───────┘ └───────┴───────┴───────┘ + * generated by [keymapviz] */ +/* ┌───────┬───────┬───────┬───────┬───────┬───────┐ ┌───────┬───────┬───────┬───────┬───────┬───────┐ + * │ │ │ │ │ │ ├───────┐ ┌───────┤ │ │ │ │ │ │ + * ├───────┼───────┼───────┼───────┼───────┼───────┤ │ │ ├───────┼───────┼───────┼───────┼───────┼───────┤ + * │ │ RESET │RGB_TOG│RGB_MOD│RGB_HUD│RGB_HUI├───────┤ ├───────┤RGB_SAD│RGB_SAI│RGB_VAD│RGB_VAI│ │ │ + * ├───────┼───────┼───────┼───────┼───────┼───────┤ │ │ ├───────┼───────┼───────┼───────┼───────┼───────┤ + * │ │ │BL_TOGG│BL_BRTG│BL_INC │BL_DEC ├───────┤ ├───────┤ │ │ │ │ │ │ + * ├───────┼───────┼───────┼───────┼───────┼───────┤ │ │ ├───────┼───────┼───────┼───────┼───────┼───────┤ + * │ │ │ │ │ │ ├───────┘ └───────┤ │ │ │ │ │ │ + * ├───────┼───────┼───────┼───────┼───────┴───────┘ └───────┴───────┼───────┼───────┼───────┼───────┤ + * │ │ │ │ │ ┌───────┬───────┐ ┌───────┬───────┐ │ │ │ │ │ + * └───────┴───────┴───────┴───────┘ │ │ │ │ │ │ └───────┴───────┴───────┴───────┘ + * ┌───────┼───────┤ │ │ ├───────┼───────┐ + * │ │ │ │ │ │ │ │ + * └───────┴───────┴───────┘ └───────┴───────┴───────┘ + * generated by [keymapviz] */ diff --git a/test/expect/ergodash_fancy.c b/test/expect/ergodash_fancy.c new file mode 100644 index 0000000..ee0c34c --- /dev/null +++ b/test/expect/ergodash_fancy.c @@ -0,0 +1,52 @@ +/* + * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬────────────────────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ LBRC │ │ RBRC │ 6 │ 7 │ 8 │ 9 │ 0 │ PSCR │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ GRV │ Q │ W │ E │ R │ T │ MINS │ │ EQL │ Y │ U │ I │ O │ P │ BSLS │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ TAB │ A │ S │ D │ F │ G │ DEL │ │ BSPC │ H │ J │ K │ L │ SCLN │ QUOT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ Z │ X │ C │ V │ B │ SPC │ │ ENT │ N │ M │ COMM │ DOT │ SLSH │ RSFT │ + * ├──────┼──────┼──────┼──────┼┬┬┬┬┬┬┼──────┼──────┼──────┬┬┬┬┬┬┬┬──────┼──────┼──────┼┬┬┬┬┬┬┼──────┼──────┼──────┼──────┤ + * │ LCTL │ LGUI │ LALT │ EISU ├┼┼┼┼┼┼┤LOWER │ SPC │ DEL ├┼┼┼┼┼┼┤ BSPC │ ENT │RAISE ├┼┼┼┼┼┼┤ LEFT │ DOWN │ UP │ RGHT │ + * └──────┴──────┴──────┴──────┴┴┴┴┴┴┴┴──────┴──────┴──────┴┴┴┴┴┴┴┴──────┴──────┴──────┴┴┴┴┴┴┴┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* + * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬────────────────────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ F11 │ F1 │ F2 │ F3 │ F4 │ F5 │ LCBR │ │ RCBR │ F6 │ F7 │ F8 │ F9 │ F10 │ F12 │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ TILD │ EXLM │ AT │ HASH │ DLR │ PERC │ UNDS │ │ PLUS │ CIRC │ AMPR │ ASTR │ LPRN │ RPRN │ PIPE │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ TAB │ 1 │ 2 │ 3 │ 4 │ 5 │ DEL │ │ BSPC │ H │ J │ K │ L │ COLN │ DQT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ 6 │ 7 │ 8 │ 9 │ 0 │ SPC │ │ ENT │ N │ M │ LT │ GT │ QUES │ RSFT │ + * ├──────┼──────┼──────┼──────┼┬┬┬┬┬┬┼──────┼──────┼──────┬┬┬┬┬┬┬┬──────┼──────┼──────┼┬┬┬┬┬┬┼──────┼──────┼──────┼──────┤ + * │ LCTL │ LGUI │ LALT │ EISU ├┼┼┼┼┼┼┤LOWER │ SPC │ DEL ├┼┼┼┼┼┼┤ BSPC │ ENT │RAISE ├┼┼┼┼┼┼┤ HOME │ PGDN │ PGUP │ END │ + * └──────┴──────┴──────┴──────┴┴┴┴┴┴┴┴──────┴──────┴──────┴┴┴┴┴┴┴┴──────┴──────┴──────┴┴┴┴┴┴┴┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* + * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬────────────────────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ F11 │ F1 │ F2 │ F3 │ F4 │ F5 │ LCBR │ │ RCBR │ F6 │ F7 │ F8 │ F9 │ F10 │ F12 │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ TILD │ EXLM │ AT │ HASH │ DLR │ PERC │ UNDS │ │ PLUS │ CIRC │ AMPR │ ASTR │ LPRN │ RPRN │ PIPE │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ TAB │ 1 │ 2 │ 3 │ 4 │ 5 │ DEL │ │ BSPC │ H │ J │ K │ L │ COLN │ DQT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ 6 │ 7 │ 8 │ 9 │ 0 │ SPC │ │ ENT │ N │ M │ LT │ GT │ QUES │ RSFT │ + * ├──────┼──────┼──────┼──────┼┬┬┬┬┬┬┼──────┼──────┼──────┬┬┬┬┬┬┬┬──────┼──────┼──────┼┬┬┬┬┬┬┼──────┼──────┼──────┼──────┤ + * │ LCTL │ LGUI │ LALT │ EISU ├┼┼┼┼┼┼┤LOWER │ SPC │ DEL ├┼┼┼┼┼┼┤ BSPC │ ENT │RAISE ├┼┼┼┼┼┼┤ HOME │ PGDN │ PGUP │ END │ + * └──────┴──────┴──────┴──────┴┴┴┴┴┴┴┴──────┴──────┴──────┴┴┴┴┴┴┴┴──────┴──────┴──────┴┴┴┴┴┴┴┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* + * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬────────────────────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │RESET │RGB_TO│RGB_MO│RGB_HU│RGB_HU│ │ │ │RGB_SA│RGB_SA│RGB_VA│RGB_VA│ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │BL_TOG│BL_BRT│BL_INC│BL_DEC│ │ │ │ │ │ │ │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┼──────┼──────┼──────┼┬┬┬┬┬┬┼──────┼──────┼──────┬┬┬┬┬┬┬┬──────┼──────┼──────┼┬┬┬┬┬┬┼──────┼──────┼──────┼──────┤ + * │ │ │ │ ├┼┼┼┼┼┼┤ │ │ ├┼┼┼┼┼┼┤ │ │ ├┼┼┼┼┼┼┤ │ │ │ │ + * └──────┴──────┴──────┴──────┴┴┴┴┴┴┴┴──────┴──────┴──────┴┴┴┴┴┴┴┴──────┴──────┴──────┴┴┴┴┴┴┴┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ diff --git a/test/expect/ergodox_fancy.c b/test/expect/ergodox_fancy.c new file mode 100644 index 0000000..7c98854 --- /dev/null +++ b/test/expect/ergodox_fancy.c @@ -0,0 +1,57 @@ +/* ┌───────┬─────┬─────┬─────┬─────┬─────┬───────┐ ┌───────┬─────┬─────┬─────┬─────┬─────┬───────┐ + * │ EQL │ 1 │ 2 │ 3 │ 4 │ 5 │ LEFT │ │ RGHT │ 6 │ 7 │ 8 │ 9 │ 0 │ MINS │ + * ├───────┼─────┼─────┼─────┼─────┼─────┼───────┤ ├───────┼─────┼─────┼─────┼─────┼─────┼───────┤ + * │ DEL │ Q │ W │ E │ R │ T │TG(SYMB│ │TG(SYMB│ Y │ U │ I │ O │ P │ BSLS │ + * ├───────┼─────┼─────┼─────┼─────┼─────┤ │ │ ├─────┼─────┼─────┼─────┼─────┼───────┤ + * │ BSPC │ A │ S │ D │ F │ G ├───────┤ ├───────┤ H │ J │ K │ L │LT(MD│GUI_T(K│ + * ├───────┼─────┼─────┼─────┼─────┼─────┤ALL_T(K│ │MEH_T(K├─────┼─────┼─────┼─────┼─────┼───────┤ + * │ LSFT │CTL_T│ X │ C │ V │ B │ │ │ │ N │ M │COMM │ DOT │CTL_T│ RSFT │ + * └┬──────┼─────┼─────┼─────┼─────┼─────┴───────┘ └───────┴─────┼─────┼─────┼─────┼─────┼──────┬┘ + * │LT(SYM│QUOT │LALT(│LEFT │RGHT │ │ UP │DOWN │LBRC │RBRC │TT(SYM│ + * └──────┴─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┴──────┘ + * ┌───────┬───────┐ ┌───────┬───────┐ + * │ALT_T(K│ LGUI │ │ LALT │CTL_T(K│ + * ┌───────┼───────┼───────┤ ├───────┼───────┼───────┐ + * │ SPC │ BSPC │ HOME │ │ PGUP │ TAB │ ENT │ + * │ │ ├───────┤ ├───────┤ │ │ + * │ │ │ END │ │ PGDN │ │ │ + * └───────┴───────┴───────┘ └───────┴───────┴───────┘ + * generated by [keymapviz] */ +/* ┌───────┬─────┬─────┬─────┬─────┬─────┬───────┐ ┌───────┬─────┬─────┬─────┬─────┬─────┬───────┐ + * │ VRSN │ F1 │ F2 │ F3 │ F4 │ F5 │ │ │ │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ + * ├───────┼─────┼─────┼─────┼─────┼─────┼───────┤ ├───────┼─────┼─────┼─────┼─────┼─────┼───────┤ + * │ │EXLM │ AT │LCBR │RCBR │PIPE │ │ │ │ UP │ 7 │ 8 │ 9 │ASTR │ F12 │ + * ├───────┼─────┼─────┼─────┼─────┼─────┤ │ │ ├─────┼─────┼─────┼─────┼─────┼───────┤ + * │ │HASH │ DLR │LPRN │RPRN │ GRV ├───────┤ ├───────┤DOWN │ 4 │ 5 │ 6 │PLUS │ │ + * ├───────┼─────┼─────┼─────┼─────┼─────┤ │ │ ├─────┼─────┼─────┼─────┼─────┼───────┤ + * │ │PERC │CIRC │LBRC │RBRC │TILD │ │ │ │AMPR │ 1 │ 2 │ 3 │BSLS │ │ + * └┬──────┼─────┼─────┼─────┼─────┼─────┴───────┘ └───────┴─────┼─────┼─────┼─────┼─────┼──────┬┘ + * │EEP_RS│ │ │ │ │ │ │ DOT │ 0 │ EQL │ │ + * └──────┴─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┴──────┘ + * ┌───────┬───────┐ ┌───────┬───────┐ + * │RGB_MOD│ │ │RGB_TOG│RGB_M_P│ + * ┌───────┼───────┼───────┤ ├───────┼───────┼───────┐ + * │RGB_VAD│RGB_VAI│ │ │ │RGB_HUD│RGB_HUI│ + * │ │ ├───────┤ ├───────┤ │ │ + * │ │ │ │ │ │ │ │ + * └───────┴───────┴───────┘ └───────┴───────┴───────┘ + * generated by [keymapviz] */ +/* ┌───────┬─────┬─────┬─────┬─────┬─────┬───────┐ ┌───────┬─────┬─────┬─────┬─────┬─────┬───────┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───────┼─────┼─────┼─────┼─────┼─────┼───────┤ ├───────┼─────┼─────┼─────┼─────┼─────┼───────┤ + * │ │ │ │MS_U │ │ │ │ │ │ │ │ │ │ │ │ + * ├───────┼─────┼─────┼─────┼─────┼─────┤ │ │ ├─────┼─────┼─────┼─────┼─────┼───────┤ + * │ │ │MS_L │MS_D │MS_R │ ├───────┤ ├───────┤ │ │ │ │ │ MPLY │ + * ├───────┼─────┼─────┼─────┼─────┼─────┤ │ │ ├─────┼─────┼─────┼─────┼─────┼───────┤ + * │ │ │ │ │ │ │ │ │ │ │ │MPRV │MNXT │ │ │ + * └┬──────┼─────┼─────┼─────┼─────┼─────┴───────┘ └───────┴─────┼─────┼─────┼─────┼─────┼──────┬┘ + * │ │ │ │BTN1 │BTN2 │ │VOLU │VOLD │MUTE │ │ │ + * └──────┴─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┴──────┘ + * ┌───────┬───────┐ ┌───────┬───────┐ + * │ │ │ │ │ │ + * ┌───────┼───────┼───────┤ ├───────┼───────┼───────┐ + * │ │ │ │ │ │ │ WBAK │ + * │ │ ├───────┤ ├───────┤ │ │ + * │ │ │ │ │ │ │ │ + * └───────┴───────┴───────┘ └───────┴───────┴───────┘ + * generated by [keymapviz] */ diff --git a/test/expect/fortitude60_fancy.c b/test/expect/fortitude60_fancy.c new file mode 100644 index 0000000..75477cf --- /dev/null +++ b/test/expect/fortitude60_fancy.c @@ -0,0 +1,72 @@ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ GRV │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ DEL │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ TAB │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ ESC │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ SCLN │ QUOT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┐ ┌──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ Z │ X │ C │ V │ B │ LBRC │ │ RBRC │ N │ M │ COMM │ DOT │ SLSH │ ENT │ + * └──────┴──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┴──────┘ + * │ LGUI │ LALT │LOWER │ SPC │ LCTL │ │ ENT │ SPC │RAISE │ RALT │ RGUI │ + * └──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ GRV │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ DEL │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ TAB │ Q │ W │ F │ P │ G │ │ J │ L │ U │ Y │ SCLN │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ ESC │ A │ R │ S │ T │ D │ │ H │ N │ E │ I │ O │ QUOT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┐ ┌──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ Z │ X │ C │ V │ B │ LBRC │ │ RBRC │ K │ M │ COMM │ DOT │ SLSH │ ENT │ + * └──────┴──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┴──────┘ + * │ LGUI │ LALT │LOWER │ SPC │ LCTL │ │ ENT │ SPC │RAISE │ RALT │ RGUI │ + * └──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ GRV │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ DEL │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ TAB │ QUOT │ COMM │ DOT │ P │ Y │ │ F │ G │ C │ R │ L │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ ESC │ A │ O │ E │ U │ I │ │ D │ H │ T │ N │ S │ SLSH │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┐ ┌──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ SCLN │ Q │ J │ K │ X │ LBRC │ │ RBRC │ B │ M │ W │ V │ Z │ ENT │ + * └──────┴──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┴──────┘ + * │ LGUI │ LALT │LOWER │ SPC │ LCTL │ │ ENT │ SPC │RAISE │ RALT │ RGUI │ + * └──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ TILD │ EXLM │ AT │ HASH │ DLR │ PERC │ │ CIRC │ AMPR │ ASTR │ LPRN │ RPRN │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ TILD │ EXLM │ AT │ HASH │ DLR │ PERC │ │ CIRC │ AMPR │ ASTR │ LPRN │ RPRN │ DEL │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ DEL │ F1 │ F2 │ F3 │ F4 │ F5 │ │ F6 │ UNDS │ PLUS │ LCBR │ RCBR │ PIPE │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┐ ┌──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ F7 │ F8 │ F9 │ F10 │ F11 │ │ │ │ F12 │S(KC_N│S(KC_N│ │ │ │ + * └──────┴──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┴──────┘ + * │ │ │ │ │ │ │ │ │ │ │ │ + * └──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ GRV │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ DEL │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ GRV │ 1 │ UP │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ DEL │ LEFT │ DOWN │ RGHT │ F4 │ F5 │ │ F6 │ MINS │ EQL │ LBRC │ RBRC │ BSLS │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┐ ┌──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ F7 │ F8 │ F9 │ F10 │ F11 │ │ │ │ F12 │ NUHS │ NUBS │ │ │ │ + * └──────┴──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┴──────┘ + * │ │ │ │ │ │ │ │ │ │ │ │ + * └──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │RESET │RGB_TO│RGB_MO│RGB_HU│RGB_HU│ │RGB_SA│RGB_SA│RGB_VA│RGB_VA│ │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │AU_ON │AU_OFF│AG_NOR│ │AG_SWA│ │BL_TOG│BL_STE│ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┐ ┌──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │QWERTY│COLEMA│DVORAK│ │ │ │ │ │ │ │ │ │ │ │ │ + * └──────┴──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┴──────┘ + * │ │ │ │ │ │ │ │ │ │ │ │ + * └──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ diff --git a/test/expect/helix_fancy.c b/test/expect/helix_fancy.c new file mode 100644 index 0000000..a00a8d7 --- /dev/null +++ b/test/expect/helix_fancy.c @@ -0,0 +1,144 @@ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ GRV │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ DEL │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ TAB │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LCTL │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ SCLN │ QUOT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┐ ┌──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ Z │ X │ C │ V │ B │ LBRC │ │ RBRC │ N │ M │ COMM │ DOT │ SLSH │ ENT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ADJUST│ ESC │ LALT │ LGUI │ EISU │LOWER │ SPC │ │ SPC │RAISE │ KANA │ LEFT │ DOWN │ UP │ RGHT │ + * └──────┴──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ GRV │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ DEL │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ TAB │ Q │ W │ F │ P │ G │ │ J │ L │ U │ Y │ SCLN │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LCTL │ A │ R │ S │ T │ D │ │ H │ N │ E │ I │ O │ QUOT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┐ ┌──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ Z │ X │ C │ V │ B │ LBRC │ │ RBRC │ K │ M │ COMM │ DOT │ SLSH │ ENT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ADJUST│ ESC │ LALT │ LGUI │ EISU │LOWER │ SPC │ │ SPC │RAISE │ KANA │ LEFT │ DOWN │ UP │ RGHT │ + * └──────┴──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ GRV │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ TAB │ QUOT │ COMM │ DOT │ P │ Y │ │ F │ G │ C │ R │ L │ DEL │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LCTL │ A │ O │ E │ U │ I │ │ D │ H │ T │ N │ S │ SLSH │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┐ ┌──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ SCLN │ Q │ J │ K │ X │ LBRC │ │ RBRC │ B │ M │ W │ V │ Z │ ENT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ADJUST│ ESC │ LALT │ LGUI │ EISU │LOWER │ SPC │ │ SPC │RAISE │ KANA │ LEFT │ DOWN │ UP │ RGHT │ + * └──────┴──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ TILD │ EXLM │ AT │ HASH │ DLR │ PERC │ │ CIRC │ AMPR │ ASTR │ LPRN │ RPRN │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ TILD │ EXLM │ AT │ HASH │ DLR │ PERC │ │ CIRC │ AMPR │ ASTR │ LPRN │ RPRN │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ F1 │ F2 │ F3 │ F4 │ F5 │ │ F6 │ UNDS │ PLUS │ LCBR │ RCBR │ PIPE │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┐ ┌──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ CAPS │ F7 │ F8 │ F9 │ F10 │ F11 │ LPRN │ │ RPRN │ F12 │ │ │ HOME │ END │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ MNXT │ VOLD │ VOLU │ MPLY │ + * └──────┴──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ GRV │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ GRV │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ DEL │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ F1 │ F2 │ F3 │ F4 │ F5 │ │ F6 │ MINS │ EQL │ LBRC │ RBRC │ BSLS │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┐ ┌──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ CAPS │ F7 │ F8 │ F9 │ F10 │ F11 │ │ │ │ F12 │ │ │ PGDN │ PGUP │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ MNXT │ VOLD │ VOLU │ MPLY │ + * └──────┴──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │RESET │RGBRST│ │ │ │ │ │ │ │ │ │ DEL │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │AU_ON │AU_OFF│AG_NOR│ │AG_SWA│QWERTY│COLEMA│DVORAK│ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┐ ┌──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │ │ │RGB_TO│RGB_HU│RGB_SA│RGB_VA│ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │ │ │RGB_MO│RGB_HU│RGB_SA│RGB_VA│ + * └──────┴──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ TAB │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LCTL │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ SCLN │ QUOT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ Z │ X │ C │ V │ B │ │ N │ M │ COMM │ DOT │ SLSH │ ENT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┐ ┌──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ADJUST│ ESC │ LALT │ LGUI │ EISU │LOWER │ SPC │ │ SPC │RAISE │ KANA │ LEFT │ DOWN │ UP │ RGHT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * └──────┴──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ TAB │ Q │ W │ F │ P │ G │ │ J │ L │ U │ Y │ SCLN │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LCTL │ A │ R │ S │ T │ D │ │ H │ N │ E │ I │ O │ QUOT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ Z │ X │ C │ V │ B │ │ K │ M │ COMM │ DOT │ SLSH │ ENT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┐ ┌──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ADJUST│ ESC │ LALT │ LGUI │ EISU │LOWER │ SPC │ │ SPC │RAISE │ KANA │ LEFT │ DOWN │ UP │ RGHT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * └──────┴──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ TAB │ QUOT │ COMM │ DOT │ P │ Y │ │ F │ G │ C │ R │ L │ DEL │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LCTL │ A │ O │ E │ U │ I │ │ D │ H │ T │ N │ S │ SLSH │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ SCLN │ Q │ J │ K │ X │ │ B │ M │ W │ V │ Z │ ENT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┐ ┌──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ADJUST│ ESC │ LALT │ LGUI │ EISU │LOWER │ SPC │ │ SPC │RAISE │ KANA │ LEFT │ DOWN │ UP │ RGHT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * └──────┴──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ TILD │ EXLM │ AT │ HASH │ DLR │ PERC │ │ CIRC │ AMPR │ ASTR │ LPRN │ RPRN │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ F1 │ F2 │ F3 │ F4 │ F5 │ │ F6 │ UNDS │ PLUS │ LCBR │ RCBR │ PIPE │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ F7 │ F8 │ F9 │ F10 │ F11 │ │ F12 │ │ │ HOME │ END │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┐ ┌──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ MNXT │ VOLD │ VOLU │ MPLY │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * └──────┴──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ GRV │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ DEL │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ F1 │ F2 │ F3 │ F4 │ F5 │ │ F6 │ MINS │ EQL │ LBRC │ RBRC │ BSLS │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ F7 │ F8 │ F9 │ F10 │ F11 │ │ F12 │ │ │ PGDN │ PGUP │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┐ ┌──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ MNXT │ VOLD │ VOLU │ MPLY │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * └──────┴──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ │RESET │RGBRST│ │ │ │ │ │ │ │ │ │ DEL │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │AU_ON │AU_OFF│AG_NOR│ │AG_SWA│QWERTY│COLEMA│DVORAK│ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │RGB_TO│RGB_HU│RGB_SA│RGB_VA│ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┐ ┌──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │ │ │RGB_MO│RGB_HU│RGB_SA│RGB_VA│ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * └──────┴──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ diff --git a/test/expect/kaishi65.c b/test/expect/kaishi65.c new file mode 100644 index 0000000..93636d5 --- /dev/null +++ b/test/expect/kaishi65.c @@ -0,0 +1,26 @@ +/*,----------------------------------------------------------------. + *|ES | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | MI| EQ| BS | GR | + *|----------------------------------------------------------------| + *| TA | Q | W | E | R | T | Y | U | I | O | P | LB| RB| BS | DE | + *|----------------------------------------------------------------| + *| CA | A | S | D | F | G | H | J | K | L | SC| QU| EN | PG | + *|----------------------------------------------------------------| + *| LS | Z | X | C | V | B | N | M | CO| DO| SL| RS | UP| PG | + *|----------------------------------------------------------------| + *| LC | LG | LA | SP | RA| MO| RC | LE| DO| RG | + *`----------------------------------------------------------------' + * generated by [keymapviz] + */ +/*,----------------------------------------------------------------. + *| | F1| F2| F3| F4| F5| F6| F7| F8| F9| F1| F1| F1| DE | | + *|----------------------------------------------------------------| + *| | BT| MS| BT| | | | | | | | | | | IN | + *|----------------------------------------------------------------| + *| | MS| MS| MS| | | | | | | | | | HO | + *|----------------------------------------------------------------| + *| | | | | | | | MU| | | | | VO| EN | + *|----------------------------------------------------------------| + *| | | | | | | | MP| VO| MN | + *`----------------------------------------------------------------' + * generated by [keymapviz] + */ diff --git a/test/expect/kaishi65_0.json b/test/expect/kaishi65_0.json new file mode 100644 index 0000000..9ecb4fd --- /dev/null +++ b/test/expect/kaishi65_0.json @@ -0,0 +1,117 @@ +[ + [ + "ESC", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "0", + "MINS", + "EQL", + { + "w": 2 + }, + "BSPC", + "GRV" + ], + [ + { + "w": 1.5 + }, + "TAB", + "Q", + "W", + "E", + "R", + "T", + "Y", + "U", + "I", + "O", + "P", + "LBRC", + "RBRC", + { + "w": 1.5 + }, + "BSLS", + "DEL" + ], + [ + { + "w": 1.75 + }, + "CAPS", + "A", + "S", + "D", + "F", + "G", + "H", + "J", + "K", + "L", + "SCLN", + "QUOT", + { + "w": 2.25 + }, + "ENT", + "PGUP" + ], + [ + { + "w": 2.25 + }, + "LSFT", + "Z", + "X", + "C", + "V", + "B", + "N", + "M", + "COMM", + "DOT", + "SLSH", + { + "w": 1.75 + }, + "RSFT", + "UP", + "PGDN" + ], + [ + { + "w": 1.25 + }, + "LCTL", + { + "w": 1.25 + }, + "LGUI", + { + "w": 1.25 + }, + "LALT", + { + "a": 7, + "w": 6.25 + }, + "SPC", + { + "a": 4 + }, + "RALT", + "MO(_FN)", + "RCTL", + "LEFT", + "DOWN", + "RGHT" + ] +] diff --git a/test/expect/kaishi65_1.json b/test/expect/kaishi65_1.json new file mode 100644 index 0000000..f333cfb --- /dev/null +++ b/test/expect/kaishi65_1.json @@ -0,0 +1,117 @@ +[ + [ + "", + "F1", + "F2", + "F3", + "F4", + "F5", + "F6", + "F7", + "F8", + "F9", + "F10", + "F11", + "F12", + { + "w": 2 + }, + "DEL", + "" + ], + [ + { + "w": 1.5 + }, + "", + "BTN1", + "MS_U", + "BTN2", + "", + "", + "", + "", + "", + "", + "", + "", + "", + { + "w": 1.5 + }, + "", + "INS" + ], + [ + { + "w": 1.75 + }, + "", + "MS_L", + "MS_D", + "MS_R", + "", + "", + "", + "", + "", + "", + "", + "", + { + "w": 2.25 + }, + "", + "HOME" + ], + [ + { + "w": 2.25 + }, + "", + "", + "", + "", + "", + "", + "", + "MUTE", + "", + "", + "", + { + "w": 1.75 + }, + "", + "VOLU", + "END" + ], + [ + { + "w": 1.25 + }, + "", + { + "w": 1.25 + }, + "", + { + "w": 1.25 + }, + "", + { + "a": 7, + "w": 6.25 + }, + "", + { + "a": 4 + }, + "", + "", + "", + "MPRV", + "VOLD", + "MNXT" + ] +] diff --git a/test/expect/kaishi65_fancy.c b/test/expect/kaishi65_fancy.c new file mode 100644 index 0000000..a78a730 --- /dev/null +++ b/test/expect/kaishi65_fancy.c @@ -0,0 +1,26 @@ +/*┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬────┐ + *│ES │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ MI│ EQ│ BS │ GR │ + *├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼────┤ + *│ TA │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ LB│ RB│ BS │ DE │ + *├─────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─────┼────┤ + *│ CA │ A │ S │ D │ F │ G │ H │ J │ K │ L │ SC│ QU│ EN │ PG │ + *├───────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┬───┼────┤ + *│ LS │ Z │ X │ C │ V │ B │ N │ M │ CO│ DO│ SL│ RS │ UP│ PG │ + *├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴─┬─┴─┬─┴─┬─┴──┬───┼───┼────┤ + *│ LC │ LG │ LA │ SP │ RA│ MO│ RC │ LE│ DO│ RG │ + *└────┴────┴────┴───────────────────────┴───┴───┴────┴───┴───┴────┘ + * generated by [keymapviz] + */ +/*┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬────┐ + *│ │ F1│ F2│ F3│ F4│ F5│ F6│ F7│ F8│ F9│ F1│ F1│ F1│ DE │ │ + *├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼────┤ + *│ │ BT│ MS│ BT│ │ │ │ │ │ │ │ │ │ │ IN │ + *├─────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─────┼────┤ + *│ │ MS│ MS│ MS│ │ │ │ │ │ │ │ │ │ HO │ + *├───────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┬───┼────┤ + *│ │ │ │ │ │ │ │ MU│ │ │ │ │ VO│ EN │ + *├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴─┬─┴─┬─┴─┬─┴──┬───┼───┼────┤ + *│ │ │ │ │ │ │ │ MP│ VO│ MN │ + *└────┴────┴────┴───────────────────────┴───┴───┴────┴───┴───┴────┘ + * generated by [keymapviz] + */ diff --git a/test/expect/kinesis_fancy.c b/test/expect/kinesis_fancy.c new file mode 100644 index 0000000..3628236 --- /dev/null +++ b/test/expect/kinesis_fancy.c @@ -0,0 +1,21 @@ +/* ┌────────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬────────┐ + * │ ESC │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ PSCR │ SLCK │ PAUS │ │RESET │ + * ├────────┼──────┼──────┼──────┼──────┼──────┼──────┴──────┴──────┴──────┴──────┴──────┼──────┼──────┼──────┼──────┼──────┼────────┤ + * │ EQL │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ MINS │ + * ├────────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼────────┤ + * │ TAB │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ BSLS │ + * ├────────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼────────┤ + * │ CAPS │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ SCLN │ QUOT │ + * ├────────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼────────┤ + * │ LSFT │ Z │ X │ C │ V │ B │ │ N │ M │ COMM │ DOT │ SLSH │ RSFT │ + * └────────┼──────┼──────┼──────┼──────┼──────┘ └──────┼──────┼──────┼──────┼──────┼────────┘ + * │ GRV │ INS │ LEFT │ RGHT │ │ UP │ DOWN │ LBRC │ RBRC │ + * └──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┘ + * ┌──────┬──────┐ ┌──────┬──────┐ + * │ LCTL │ LALT │ │ RGUI │ RCTL │ + * ┌──────┼──────┼──────┤ ├──────┼──────┼──────┐ + * │ │ │ HOME │ │ PGUP │ │ │ + * │ BSPC │ DEL ├──────┤ ├──────┤ PGDN │ENTER │ + * │ │ │ END │ │ SPC │ │ │ + * └──────┴──────┴──────┘ └──────┴──────┴──────┘ + * generated by [keymapviz] */ diff --git a/test/expect/kyria_fancy.c b/test/expect/kyria_fancy.c new file mode 100644 index 0000000..9db2bb1 --- /dev/null +++ b/test/expect/kyria_fancy.c @@ -0,0 +1,77 @@ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ TAB │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │CTL_ES│ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ SCLN │CTL_QU│ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┬──────┐ ┌──────┬──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ Z │ X │ C │ V │ B │ LBRC │ CAPS │ │FKEYS │ RBRC │ N │ M │ COMM │ DOT │ SLSH │ RSFT │ + * └──────┴──────┴──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┴──────┴──────┘ + * │ADJUST│ LGUI │ALT_EN│ SPC │ NAV │ │ SYM │ SPC │ RALT │ RGUI │ APP │ + * │ │ │ │ │ │ │ │ │ │ │ │ + * └──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ TAB │QUOTE │ COMM │ DOT │ P │ Y │ │ F │ G │ C │ R │ L │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │CTL_ES│ A │ O │ E │ U │ I │ │ D │ H │ T │ N │ S │CTL_MI│ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┬──────┐ ┌──────┬──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ SCLN │ Q │ J │ K │ X │ LBRC │ CAPS │ │FKEYS │ RBRC │ B │ M │ W │ V │ Z │ RSFT │ + * └──────┴──────┴──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┴──────┴──────┘ + * │ADJUST│ LGUI │ALT_EN│ SPC │ NAV │ │ SYM │ SPC │ RALT │ RGUI │ APP │ + * │ │ │ │ │ │ │ │ │ │ │ │ + * └──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ TAB │ Q │ W │ F │ P │ B │ │ J │ L │ U │ Y │ SCLN │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │CTL_ES│ A │ R │ S │ T │ G │ │ M │ N │ E │ I │ O │CTL_QU│ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┬──────┐ ┌──────┬──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ Z │ X │ C │ D │ V │ LBRC │ CAPS │ │FKEYS │ RBRC │ K │ H │ COMM │ DOT │ SLSH │ RSFT │ + * └──────┴──────┴──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┴──────┴──────┘ + * │ADJUST│ LGUI │ALT_EN│ SPC │ NAV │ │ SYM │ SPC │ RALT │ RGUI │ APP │ + * │ │ │ │ │ │ │ │ │ │ │ │ + * └──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ │ │ │ │ │ │ │ PGUP │ HOME │ UP │ END │ VOLU │ DEL │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ LGUI │ LALT │ LCTL │ LSFT │ │ │ PGDN │ LEFT │ DOWN │ RGHT │ VOLD │ INS │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┬──────┐ ┌──────┬──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ SLCK │ │ │ │PAUSE │ MPRV │ MPLY │ MNXT │ MUTE │ PSCR │ + * └──────┴──────┴──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┴──────┴──────┘ + * │ │ │ │ │ │ │ │ │ │ │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ + * └──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ GRV │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ EQL │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ TILD │ EXLM │ AT │ HASH │ DLR │ PERC │ │ CIRC │ AMPR │ ASTR │ LPRN │ RPRN │ PLUS │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┬──────┐ ┌──────┬──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ PIPE │ BSLS │ COLN │ SCLN │ MINS │ LBRC │ LCBR │ │ │ │ RCBR │ RBRC │ UNDS │ COMM │ DOT │ SLSH │ QUES │ + * └──────┴──────┴──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┴──────┴──────┘ + * │ │ │ │ │ │ │ │ │ │ │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ + * └──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ │ F9 │ F10 │ F11 │ F12 │ │ │ │ │ │ │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ F5 │ F6 │ F7 │ F8 │ │ │ │ RSFT │ RCTL │ LALT │ RGUI │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┬──────┐ ┌──────┬──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ F1 │ F2 │ F3 │ F4 │ │ │ │ │ │ │ │ │ │ │ │ │ + * └──────┴──────┴──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┴──────┴──────┘ + * │ │ │ │ │ │ │ │ │ │ │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ + * └──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ │ │ │QWERTY│ │ │ │ │ │ │ │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │DVORAK│ │ │ │RGB_TO│RGB_SA│RGB_HU│RGB_VA│RGB_MO│ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┬──────┐ ┌──────┬──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │COLEMA│ │ │ │ │ │ │ │ │RGB_SA│RGB_HU│RGB_VA│RGB_RM│ │ + * └──────┴──────┴──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┴──────┴──────┘ + * │ │ │ │ │ │ │ │ │ │ │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ + * └──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ diff --git a/test/expect/lets_split_fancy.c b/test/expect/lets_split_fancy.c new file mode 100644 index 0000000..442e7e1 --- /dev/null +++ b/test/expect/lets_split_fancy.c @@ -0,0 +1,60 @@ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ TAB │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ ESC │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ SCLN │ QUOT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ Z │ X │ C │ V │ B │ │ N │ M │ COMM │ DOT │ SLSH │ ENT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ADJUST│ LCTL │ LALT │ LGUI │LOWER │ SPC │ │ SPC │RAISE │ LEFT │ DOWN │ UP │ RGHT │ + * └──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ TAB │ Q │ W │ F │ P │ G │ │ J │ L │ U │ Y │ SCLN │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ ESC │ A │ R │ S │ T │ D │ │ H │ N │ E │ I │ O │ QUOT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ Z │ X │ C │ V │ B │ │ K │ M │ COMM │ DOT │ SLSH │ ENT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ADJUST│ LCTL │ LALT │ LGUI │LOWER │ SPC │ │ SPC │RAISE │ LEFT │ DOWN │ UP │ RGHT │ + * └──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ TAB │ QUOT │ COMM │ DOT │ P │ Y │ │ F │ G │ C │ R │ L │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ ESC │ A │ O │ E │ U │ I │ │ D │ H │ T │ N │ S │ SLSH │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ SCLN │ Q │ J │ K │ X │ │ B │ M │ W │ V │ Z │ ENT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ADJUST│ LCTL │ LALT │ LGUI │LOWER │ SPC │ │ SPC │RAISE │ LEFT │ DOWN │ UP │ RGHT │ + * └──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ TILD │ EXLM │ AT │ HASH │ DLR │ PERC │ │ CIRC │ AMPR │ ASTR │ LPRN │ RPRN │ DEL │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ DEL │ F1 │ F2 │ F3 │ F4 │ F5 │ │ F6 │ UNDS │ PLUS │ LCBR │ RCBR │ PIPE │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ F7 │ F8 │ F9 │ F10 │ F11 │ │ F12 │S(KC_N│S(KC_N│ │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │ MNXT │ VOLD │ VOLU │ MPLY │ + * └──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ GRV │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ DEL │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ DEL │ F1 │ F2 │ F3 │ F4 │ F5 │ │ F6 │ MINS │ EQL │ LBRC │ RBRC │ BSLS │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ F7 │ F8 │ F9 │ F10 │ F11 │ │ F12 │ NUHS │ NUBS │ │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │ MNXT │ VOLD │ VOLU │ MPLY │ + * └──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ │RESET │ │ │ │ │ │ │ │ │ │ │ DEL │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │AU_ON │AU_OFF│AG_NOR│ │AG_SWA│QWERTY│COLEMA│DVORAK│ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * └──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ diff --git a/test/expect/lily58_fancy.c b/test/expect/lily58_fancy.c new file mode 100644 index 0000000..250be45 --- /dev/null +++ b/test/expect/lily58_fancy.c @@ -0,0 +1,52 @@ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ GRV │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ TAB │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ MINS │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │LCTRL │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ SCLN │ QUOT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼───────┐ ┌───────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ Z │ X │ C │ V │ B │ LBRC │ │ RBRC │ N │ M │ COMM │ DOT │ SLSH │ RSFT │ + * └──────┴──────┴───┬──┴───┬──┴───┬──┴───┬─┬┴──────┬┘ └┬──────┴┬──┬──┴───┬──┴───┬──┴───┬──┴──────┴──────┘ + * │ LALT │ LGUI │MO(_LO│ ╵ SPC ╵ ╵ ENT ╵ │MO(_RA│ BSPC │ RGUI │ + * │ │ │ ├┐ ╷ │ │ │ │ + * └──────┴──────┴──────┴┴──────╴ ╶──────┴─┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ GRV │ EXLM │ AT │ HASH │ DLR │ PERC │ │ CIRC │ AMPR │ ASTR │ LPRN │ RPRN │ TILD │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼───────┐ ┌───────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │ │ UNDS │ PLUS │ LCBR │ RCBR │ PIPE │ + * └──────┴──────┴───┬──┴───┬──┴───┬──┴───┬─┬┴──────┬┘ └┬──────┴┬──┬──┴───┬──┴───┬──┴───┬──┴──────┴──────┘ + * │ │ │ │ ╵ ╵ ╵ ╵ │ │ │ │ + * │ │ │ ├┐ ╷ │ │ │ │ + * └──────┴──────┴──────┴┴──────╴ ╶──────┴─┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ GRV │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ │ │ LEFT │ DOWN │ UP │ RGHT │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼───────┐ ┌───────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ │ │ │ PLUS │ MINS │ EQL │ LBRC │ RBRC │ BSLS │ + * └──────┴──────┴───┬──┴───┬──┴───┬──┴───┬─┬┴──────┬┘ └┬──────┴┬──┬──┴───┬──┴───┬──┴───┬──┴──────┴──────┘ + * │ │ │ │ ╵ ╵ ╵ ╵ │ │ │ │ + * │ │ │ ├┐ ╷ │ │ │ │ + * └──────┴──────┴──────┴┴──────╴ ╶──────┴─┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼───────┐ ┌───────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * └──────┴──────┴───┬──┴───┬──┴───┬──┴───┬─┬┴──────┬┘ └┬──────┴┬──┬──┴───┬──┴───┬──┴───┬──┴──────┴──────┘ + * │ │ │ │ ╵ ╵ ╵ ╵ │ │ │ │ + * │ │ │ ├┐ ╷ │ │ │ │ + * └──────┴──────┴──────┴┴──────╴ ╶──────┴─┴──────┴──────┴──────┘ + * generated by [keymapviz] */ diff --git a/test/expect/mint60_fancy.c b/test/expect/mint60_fancy.c new file mode 100644 index 0000000..a717264 --- /dev/null +++ b/test/expect/mint60_fancy.c @@ -0,0 +1,26 @@ +/* + * ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ GRV │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ MINS │ EQL │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ TAB │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ LBRC │ RBRC │ BSLS │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┴──────┤ + * │ CAPS │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ SCLN │ QUOT │ ENT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┬──────┤ + * │ LSFT │ Z │ X │ C │ V │ B │ │ N │ M │ COMM │ DOT │ SLSH │ RSFT │ UP │MO(1) │ + * ├──────┼──────┼──────┼──────┼──────┴──────┤ ├──────┼──────┼──────┴──────┴──────┼──────┼──────┼──────┤ + * │ ESC │ LCTL │ LGUI │ LALT │ SPC │ │ BSPC │ ENT │ LALT(KC_GRV) │ LEFT │ DOWN │ RGHT │ + * └──────┴──────┴──────┴──────┴─────────────┘ └──────┴──────┴────────────────────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* + * ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ ESC │ F1 │ F2 │ F3 │ F4 │ F5 │ │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ DEL │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │RGB_TO│RGBRST│RGB_HU│RGB_SA│RGB_VA│ │ │ │ │ │ │ │ │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┴──────┤ + * │ │RGB_MO│RGB_HU│RGB_SA│RGB_VA│ │ │ │ │ │ │ │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┬──────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ PGUP │ │ + * ├──────┼──────┼──────┼──────┼──────┴──────┤ ├──────┼──────┼──────┴──────┴──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │ HOME │ PGDN │ END │ + * └──────┴──────┴──────┴──────┴─────────────┘ └──────┴──────┴────────────────────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ diff --git a/test/expect/moonlander.c b/test/expect/moonlander.c new file mode 100644 index 0000000..6d61aac --- /dev/null +++ b/test/expect/moonlander.c @@ -0,0 +1,51 @@ +/* .---------------------------------------------. .---------------------------------------------. + * | EQL | 1 | 2 | 3 | 4 | 5 | LEFT | ! RGHT | 6 | 7 | 8 | 9 | 0 | MINS | + * !-------+-----+-----+-----+-----+-----+-------! !-------+-----+-----+-----+-----+-----+-------! + * | DEL | Q | W | E | R | T |TG(SYMB| !TG(SYMB| Y | U | I | O | P | BSLS | + * !-------+-----+-----+-----+-----+-----+-------! !-------+-----+-----+-----+-----+-----+-------! + * | BSPC | A | S | D | F | G | HYPR ! ! MEH | H | J | K | L |LT(MD|LGUI_T(| + * !-------+-----+-----+-----+-----+-----+-------' '-------+-----+-----+-----+-----+-----+-------! + * | LSFT |LCTL_| X | C | V | B | | N | M |COMM | DOT |RCTL_| RSFT | + * !-------+-----+-----+-----+-----+-----' '-----+-----+-----+-----+-----+-------! + * |LT(SYMB|WEBUS|A(KC_|LEFT |RGHT | | UP |DOWN |LBRC |RBRC |MO(SYMB| + * '-------------------------------' '-------------------------------' + * .---------------. .---------------. + * |LALT_T(KC_APP) | !RCTL_T(KC_ESC) | + * .-------+---------------! !---------------+-------. + * ! SPC ! BSPC | LGUI | ! LALT | TAB ! ENT ! + * '-----------------------' '-----------------------' + * generated by [keymapviz] */ +/* .---------------------------------------------. .---------------------------------------------. + * | VRSN | F1 | F2 | F3 | F4 | F5 | | ! | F6 | F7 | F8 | F9 | F10 | F11 | + * !-------+-----+-----+-----+-----+-----+-------! !-------+-----+-----+-----+-----+-----+-------! + * | |EXLM | AT |LCBR |RCBR |PIPE | | ! | UP | 7 | 8 | 9 |ASTR | F12 | + * !-------+-----+-----+-----+-----+-----+-------! !-------+-----+-----+-----+-----+-----+-------! + * | |HASH | DLR |LPRN |RPRN | GRV | ! ! |DOWN | 4 | 5 | 6 |PLUS | | + * !-------+-----+-----+-----+-----+-----+-------' '-------+-----+-----+-----+-----+-----+-------! + * | |PERC |CIRC |LBRC |RBRC |TILD | |AMPR | 1 | 2 | 3 |BSLS | | + * !-------+-----+-----+-----+-----+-----' '-----+-----+-----+-----+-----+-------! + * |EEP_RST| | | | | | | DOT | 0 | EQL | | + * '-------------------------------' '-------------------------------' + * .---------------. .---------------. + * | RGB_VAI | ! RGB_TOG | + * .-------+---------------! !---------------+-------. + * !RGB_HUD!RGB_VAD|RGB_HUI| !TOGGLE_| ! ! + * '-----------------------' '-----------------------' + * generated by [keymapviz] */ +/* .---------------------------------------------. .---------------------------------------------. + * |LED_LEV| | | | | | | ! | | | | | | RESET | + * !-------+-----+-----+-----+-----+-----+-------! !-------+-----+-----+-----+-----+-----+-------! + * | | | |MS_U | | | | ! | | | | | | | + * !-------+-----+-----+-----+-----+-----+-------! !-------+-----+-----+-----+-----+-----+-------! + * | | |MS_L |MS_D |MS_R | | ! ! | | | | | | MPLY | + * !-------+-----+-----+-----+-----+-----+-------' '-------+-----+-----+-----+-----+-----+-------! + * | | | | | | | | | |MPRV |MNXT | | | + * !-------+-----+-----+-----+-----+-----' '-----+-----+-----+-----+-----+-------! + * | | | |BTN1 |BTN2 | |VOLU |VOLD |MUTE | | | + * '-------------------------------' '-------------------------------' + * .---------------. .---------------. + * | | ! | + * .-------+---------------! !---------------+-------. + * ! ! | | ! | ! ! + * '-----------------------' '-----------------------' + * generated by [keymapviz] */ diff --git a/test/expect/moonlander_0.json b/test/expect/moonlander_0.json new file mode 100644 index 0000000..de0a8d6 --- /dev/null +++ b/test/expect/moonlander_0.json @@ -0,0 +1,370 @@ +[ + [ + { + "x": 3, + "a": 7 + }, + "3", + { + "x": 9 + }, + "8" + ], + [ + { + "y": -0.9, + "x": 2 + }, + "2", + { + "x": 1 + }, + "4", + { + "x": 7 + }, + "7", + { + "x": 1 + }, + "9" + ], + [ + { + "y": -0.8, + "x": 1 + }, + "1", + { + "x": 3 + }, + "5", + { + "x": 5 + }, + "6", + { + "x": 3 + }, + "0" + ], + [ + { + "y": -0.9 + }, + "EQL", + { + "x": 5 + }, + "LEFT", + { + "x": 3 + }, + "RGHT", + { + "x": 5 + }, + "MINS" + ], + [ + { + "y": -0.4, + "x": 3 + }, + "E", + { + "x": 9 + }, + "I" + ], + [ + { + "y": -0.8999999999999999, + "x": 2 + }, + "W", + { + "x": 1 + }, + "R", + { + "x": 7 + }, + "U", + { + "x": 1 + }, + "O" + ], + [ + { + "y": -0.8, + "x": 1 + }, + "Q", + { + "x": 3 + }, + "T", + { + "x": 5 + }, + "Y", + { + "x": 3 + }, + "P" + ], + [ + { + "y": -0.8999999999999999 + }, + "DEL", + { + "x": 5 + }, + "TG(SYMB)", + { + "x": 3 + }, + "TG(SYMB)", + { + "x": 5 + }, + "BSLS" + ], + [ + { + "y": -0.3999999999999999, + "x": 3 + }, + "D", + { + "x": 9 + }, + "K" + ], + [ + { + "y": -0.8999999999999999, + "x": 2 + }, + "S", + { + "x": 1, + "n": true + }, + "F", + { + "x": 7, + "n": true + }, + "J", + { + "x": 1 + }, + "L" + ], + [ + { + "y": -0.8000000000000003, + "x": 1 + }, + "A", + { + "x": 3 + }, + "G", + { + "x": 5 + }, + "H", + { + "x": 3 + }, + "LT(MDIA,KC_SCLN)" + ], + [ + { + "y": -0.8999999999999999 + }, + "BSPC", + { + "x": 5 + }, + "HYPR", + { + "x": 3 + }, + "MEH", + { + "x": 5 + }, + "LGUI_T(KC_QUOT)" + ], + [ + { + "y": -0.3999999999999999, + "x": 3 + }, + "C", + { + "x": 9 + }, + "COMM" + ], + [ + { + "y": -0.8999999999999999, + "x": 2 + }, + "X", + { + "x": 1 + }, + "V", + { + "x": 7 + }, + "M", + { + "x": 1 + }, + "DOT" + ], + [ + { + "y": -0.7999999999999998, + "x": 1 + }, + "LCTL_T(KC_Z)", + { + "x": 3 + }, + "B", + { + "x": 5 + }, + "N", + { + "x": 3 + }, + "RCTL_T(KC_SLSH)" + ], + [ + { + "y": -0.8999999999999999 + }, + "LSFT", + { + "x": 15 + }, + "RSFT" + ], + [ + { + "y": -0.40000000000000036, + "x": 3 + }, + "LEFT", + { + "x": 9 + }, + "DOWN" + ], + [ + { + "y": -0.9000000000000004, + "x": 2 + }, + "A(KC_LSFT)", + { + "x": 1 + }, + "RGHT", + { + "x": 7 + }, + "UP", + { + "x": 1 + }, + "LBRC" + ], + [ + { + "y": -0.7999999999999998, + "x": 1 + }, + "WEBUSB_PAIR", + { + "x": 13 + }, + "RBRC" + ], + [ + { + "y": -0.9000000000000004 + }, + "LT(SYMB,KC_GRV)", + { + "x": 15 + }, + "MO(SYMB)" + ], + [ + { + "r": 50, + "rx": 5, + "y": 1, + "x": 4.5, + "c": "#bd667d", + "w": 2, + "w2": 1.5 + }, + "LALT_T(KC_APP)" + ], + [ + { + "x": 4.5, + "c": "#cccccc", + "h": 1.5 + }, + "SPC", + { + "h": 1.5 + }, + "BSPC", + { + "h": 1.5 + }, + "LGUI" + ], + [ + { + "r": -50, + "rx": 12, + "y": 1, + "x": -6.5, + "c": "#bd667d", + "w": 2 + }, + "RCTL_T(KC_ESC)" + ], + [ + { + "x": -7.5, + "c": "#cccccc", + "h": 1.5 + }, + "LALT", + { + "h": 1.5 + }, + "TAB", + { + "h": 1.5 + }, + "ENT" + ] +] diff --git a/test/expect/moonlander_1.json b/test/expect/moonlander_1.json new file mode 100644 index 0000000..0fc411a --- /dev/null +++ b/test/expect/moonlander_1.json @@ -0,0 +1,370 @@ +[ + [ + { + "x": 3, + "a": 7 + }, + "F3", + { + "x": 9 + }, + "F8" + ], + [ + { + "y": -0.9, + "x": 2 + }, + "F2", + { + "x": 1 + }, + "F4", + { + "x": 7 + }, + "F7", + { + "x": 1 + }, + "F9" + ], + [ + { + "y": -0.8, + "x": 1 + }, + "F1", + { + "x": 3 + }, + "F5", + { + "x": 5 + }, + "F6", + { + "x": 3 + }, + "F10" + ], + [ + { + "y": -0.9 + }, + "VRSN", + { + "x": 5 + }, + "", + { + "x": 3 + }, + "", + { + "x": 5 + }, + "F11" + ], + [ + { + "y": -0.4, + "x": 3 + }, + "LCBR", + { + "x": 9 + }, + "8" + ], + [ + { + "y": -0.8999999999999999, + "x": 2 + }, + "AT", + { + "x": 1 + }, + "RCBR", + { + "x": 7 + }, + "7", + { + "x": 1 + }, + "9" + ], + [ + { + "y": -0.8, + "x": 1 + }, + "EXLM", + { + "x": 3 + }, + "PIPE", + { + "x": 5 + }, + "UP", + { + "x": 3 + }, + "ASTR" + ], + [ + { + "y": -0.8999999999999999 + }, + "", + { + "x": 5 + }, + "", + { + "x": 3 + }, + "", + { + "x": 5 + }, + "F12" + ], + [ + { + "y": -0.3999999999999999, + "x": 3 + }, + "LPRN", + { + "x": 9 + }, + "5" + ], + [ + { + "y": -0.8999999999999999, + "x": 2 + }, + "DLR", + { + "x": 1, + "n": true + }, + "RPRN", + { + "x": 7, + "n": true + }, + "4", + { + "x": 1 + }, + "6" + ], + [ + { + "y": -0.8000000000000003, + "x": 1 + }, + "HASH", + { + "x": 3 + }, + "GRV", + { + "x": 5 + }, + "DOWN", + { + "x": 3 + }, + "PLUS" + ], + [ + { + "y": -0.8999999999999999 + }, + "", + { + "x": 5 + }, + "", + { + "x": 3 + }, + "", + { + "x": 5 + }, + "" + ], + [ + { + "y": -0.3999999999999999, + "x": 3 + }, + "LBRC", + { + "x": 9 + }, + "2" + ], + [ + { + "y": -0.8999999999999999, + "x": 2 + }, + "CIRC", + { + "x": 1 + }, + "RBRC", + { + "x": 7 + }, + "1", + { + "x": 1 + }, + "3" + ], + [ + { + "y": -0.7999999999999998, + "x": 1 + }, + "PERC", + { + "x": 3 + }, + "TILD", + { + "x": 5 + }, + "AMPR", + { + "x": 3 + }, + "BSLS" + ], + [ + { + "y": -0.8999999999999999 + }, + "", + { + "x": 15 + }, + "" + ], + [ + { + "y": -0.40000000000000036, + "x": 3 + }, + "", + { + "x": 9 + }, + "DOT" + ], + [ + { + "y": -0.9000000000000004, + "x": 2 + }, + "", + { + "x": 1 + }, + "", + { + "x": 7 + }, + "", + { + "x": 1 + }, + "0" + ], + [ + { + "y": -0.7999999999999998, + "x": 1 + }, + "", + { + "x": 13 + }, + "EQL" + ], + [ + { + "y": -0.9000000000000004 + }, + "EEP_RST", + { + "x": 15 + }, + "" + ], + [ + { + "r": 50, + "rx": 5, + "y": 1, + "x": 4.5, + "c": "#bd667d", + "w": 2, + "w2": 1.5 + }, + "RGB_VAI" + ], + [ + { + "x": 4.5, + "c": "#cccccc", + "h": 1.5 + }, + "RGB_HUD", + { + "h": 1.5 + }, + "RGB_VAD", + { + "h": 1.5 + }, + "RGB_HUI" + ], + [ + { + "r": -50, + "rx": 12, + "y": 1, + "x": -6.5, + "c": "#bd667d", + "w": 2 + }, + "RGB_TOG" + ], + [ + { + "x": -7.5, + "c": "#cccccc", + "h": 1.5 + }, + "TOGGLE_LAYER_COLOR", + { + "h": 1.5 + }, + "", + { + "h": 1.5 + }, + "" + ] +] diff --git a/test/expect/moonlander_2.json b/test/expect/moonlander_2.json new file mode 100644 index 0000000..cf490bf --- /dev/null +++ b/test/expect/moonlander_2.json @@ -0,0 +1,370 @@ +[ + [ + { + "x": 3, + "a": 7 + }, + "", + { + "x": 9 + }, + "" + ], + [ + { + "y": -0.9, + "x": 2 + }, + "", + { + "x": 1 + }, + "", + { + "x": 7 + }, + "", + { + "x": 1 + }, + "" + ], + [ + { + "y": -0.8, + "x": 1 + }, + "", + { + "x": 3 + }, + "", + { + "x": 5 + }, + "", + { + "x": 3 + }, + "" + ], + [ + { + "y": -0.9 + }, + "LED_LEVEL", + { + "x": 5 + }, + "", + { + "x": 3 + }, + "", + { + "x": 5 + }, + "RESET" + ], + [ + { + "y": -0.4, + "x": 3 + }, + "MS_U", + { + "x": 9 + }, + "" + ], + [ + { + "y": -0.8999999999999999, + "x": 2 + }, + "", + { + "x": 1 + }, + "", + { + "x": 7 + }, + "", + { + "x": 1 + }, + "" + ], + [ + { + "y": -0.8, + "x": 1 + }, + "", + { + "x": 3 + }, + "", + { + "x": 5 + }, + "", + { + "x": 3 + }, + "" + ], + [ + { + "y": -0.8999999999999999 + }, + "", + { + "x": 5 + }, + "", + { + "x": 3 + }, + "", + { + "x": 5 + }, + "" + ], + [ + { + "y": -0.3999999999999999, + "x": 3 + }, + "MS_D", + { + "x": 9 + }, + "" + ], + [ + { + "y": -0.8999999999999999, + "x": 2 + }, + "MS_L", + { + "x": 1, + "n": true + }, + "MS_R", + { + "x": 7, + "n": true + }, + "", + { + "x": 1 + }, + "" + ], + [ + { + "y": -0.8000000000000003, + "x": 1 + }, + "", + { + "x": 3 + }, + "", + { + "x": 5 + }, + "", + { + "x": 3 + }, + "" + ], + [ + { + "y": -0.8999999999999999 + }, + "", + { + "x": 5 + }, + "", + { + "x": 3 + }, + "", + { + "x": 5 + }, + "MPLY" + ], + [ + { + "y": -0.3999999999999999, + "x": 3 + }, + "", + { + "x": 9 + }, + "MPRV" + ], + [ + { + "y": -0.8999999999999999, + "x": 2 + }, + "", + { + "x": 1 + }, + "", + { + "x": 7 + }, + "", + { + "x": 1 + }, + "MNXT" + ], + [ + { + "y": -0.7999999999999998, + "x": 1 + }, + "", + { + "x": 3 + }, + "", + { + "x": 5 + }, + "", + { + "x": 3 + }, + "" + ], + [ + { + "y": -0.8999999999999999 + }, + "", + { + "x": 15 + }, + "" + ], + [ + { + "y": -0.40000000000000036, + "x": 3 + }, + "BTN1", + { + "x": 9 + }, + "VOLD" + ], + [ + { + "y": -0.9000000000000004, + "x": 2 + }, + "", + { + "x": 1 + }, + "BTN2", + { + "x": 7 + }, + "VOLU", + { + "x": 1 + }, + "MUTE" + ], + [ + { + "y": -0.7999999999999998, + "x": 1 + }, + "", + { + "x": 13 + }, + "" + ], + [ + { + "y": -0.9000000000000004 + }, + "", + { + "x": 15 + }, + "" + ], + [ + { + "r": 50, + "rx": 5, + "y": 1, + "x": 4.5, + "c": "#bd667d", + "w": 2, + "w2": 1.5 + }, + "" + ], + [ + { + "x": 4.5, + "c": "#cccccc", + "h": 1.5 + }, + "", + { + "h": 1.5 + }, + "", + { + "h": 1.5 + }, + "" + ], + [ + { + "r": -50, + "rx": 12, + "y": 1, + "x": -6.5, + "c": "#bd667d", + "w": 2 + }, + "" + ], + [ + { + "x": -7.5, + "c": "#cccccc", + "h": 1.5 + }, + "", + { + "h": 1.5 + }, + "", + { + "h": 1.5 + }, + "" + ] +] diff --git a/test/expect/moonlander_fancy.c b/test/expect/moonlander_fancy.c new file mode 100644 index 0000000..0a22088 --- /dev/null +++ b/test/expect/moonlander_fancy.c @@ -0,0 +1,51 @@ +/* ┌───────┬─────┬─────┬─────┬─────┬─────┬───────┐ ┌───────┬─────┬─────┬─────┬─────┬─────┬───────┐ + * │ EQL │ 1 │ 2 │ 3 │ 4 │ 5 │ LEFT │ │ RGHT │ 6 │ 7 │ 8 │ 9 │ 0 │ MINS │ + * ├───────┼─────┼─────┼─────┼─────┼─────┼───────┤ ├───────┼─────┼─────┼─────┼─────┼─────┼───────┤ + * │ DEL │ Q │ W │ E │ R │ T │TG(SYMB│ │TG(SYMB│ Y │ U │ I │ O │ P │ BSLS │ + * ├───────┼─────┼─────┼─────┼─────┼─────┼───────┤ ├───────┼─────┼─────┼─────┼─────┼─────┼───────┤ + * │ BSPC │ A │ S │ D │ F │ G │ HYPR │ │ MEH │ H │ J │ K │ L │LT(MD│LGUI_T(│ + * ├───────┼─────┼─────┼─────┼─────┼─────┼───────┘ └───────┼─────┼─────┼─────┼─────┼─────┼───────┤ + * │ LSFT │LCTL_│ X │ C │ V │ B │ │ N │ M │COMM │ DOT │RCTL_│ RSFT │ + * ├───────┼─────┼─────┼─────┼─────┼─────┘ └─────┼─────┼─────┼─────┼─────┼───────┤ + * │LT(SYMB│WEBUS│A(KC_│LEFT │RGHT │ │ UP │DOWN │LBRC │RBRC │MO(SYMB│ + * └───────┴─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┴───────┘ + * ┌───────────────┐ ┌───────────────┐ + * │LALT_T(KC_APP) │ │RCTL_T(KC_ESC) │ + * ┌───────┼───────┬───────┤ ├───────┬───────┼───────┐ + * │ SPC │ BSPC │ LGUI │ │ LALT │ TAB │ ENT │ + * └───────┴───────┴───────┘ └───────┴───────┴───────┘ + * generated by [keymapviz] */ +/* ┌───────┬─────┬─────┬─────┬─────┬─────┬───────┐ ┌───────┬─────┬─────┬─────┬─────┬─────┬───────┐ + * │ VRSN │ F1 │ F2 │ F3 │ F4 │ F5 │ │ │ │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ + * ├───────┼─────┼─────┼─────┼─────┼─────┼───────┤ ├───────┼─────┼─────┼─────┼─────┼─────┼───────┤ + * │ │EXLM │ AT │LCBR │RCBR │PIPE │ │ │ │ UP │ 7 │ 8 │ 9 │ASTR │ F12 │ + * ├───────┼─────┼─────┼─────┼─────┼─────┼───────┤ ├───────┼─────┼─────┼─────┼─────┼─────┼───────┤ + * │ │HASH │ DLR │LPRN │RPRN │ GRV │ │ │ │DOWN │ 4 │ 5 │ 6 │PLUS │ │ + * ├───────┼─────┼─────┼─────┼─────┼─────┼───────┘ └───────┼─────┼─────┼─────┼─────┼─────┼───────┤ + * │ │PERC │CIRC │LBRC │RBRC │TILD │ │AMPR │ 1 │ 2 │ 3 │BSLS │ │ + * ├───────┼─────┼─────┼─────┼─────┼─────┘ └─────┼─────┼─────┼─────┼─────┼───────┤ + * │EEP_RST│ │ │ │ │ │ │ DOT │ 0 │ EQL │ │ + * └───────┴─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┴───────┘ + * ┌───────────────┐ ┌───────────────┐ + * │ RGB_VAI │ │ RGB_TOG │ + * ┌───────┼───────┬───────┤ ├───────┬───────┼───────┐ + * │RGB_HUD│RGB_VAD│RGB_HUI│ │TOGGLE_│ │ │ + * └───────┴───────┴───────┘ └───────┴───────┴───────┘ + * generated by [keymapviz] */ +/* ┌───────┬─────┬─────┬─────┬─────┬─────┬───────┐ ┌───────┬─────┬─────┬─────┬─────┬─────┬───────┐ + * │LED_LEV│ │ │ │ │ │ │ │ │ │ │ │ │ │ RESET │ + * ├───────┼─────┼─────┼─────┼─────┼─────┼───────┤ ├───────┼─────┼─────┼─────┼─────┼─────┼───────┤ + * │ │ │ │MS_U │ │ │ │ │ │ │ │ │ │ │ │ + * ├───────┼─────┼─────┼─────┼─────┼─────┼───────┤ ├───────┼─────┼─────┼─────┼─────┼─────┼───────┤ + * │ │ │MS_L │MS_D │MS_R │ │ │ │ │ │ │ │ │ │ MPLY │ + * ├───────┼─────┼─────┼─────┼─────┼─────┼───────┘ └───────┼─────┼─────┼─────┼─────┼─────┼───────┤ + * │ │ │ │ │ │ │ │ │ │MPRV │MNXT │ │ │ + * ├───────┼─────┼─────┼─────┼─────┼─────┘ └─────┼─────┼─────┼─────┼─────┼───────┤ + * │ │ │ │BTN1 │BTN2 │ │VOLU │VOLD │MUTE │ │ │ + * └───────┴─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┴───────┘ + * ┌───────────────┐ ┌───────────────┐ + * │ │ │ │ + * ┌───────┼───────┬───────┤ ├───────┬───────┼───────┐ + * │ │ │ │ │ │ │ │ + * └───────┴───────┴───────┘ └───────┴───────┴───────┘ + * generated by [keymapviz] */ diff --git a/test/expect/replace_lets_split_keymap_fancy.c b/test/expect/replace_lets_split_keymap_fancy.c new file mode 100644 index 0000000..77cfd85 --- /dev/null +++ b/test/expect/replace_lets_split_keymap_fancy.c @@ -0,0 +1,111 @@ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ TAB │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ ESC │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ SCLN │ QUOT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ Z │ X │ C │ V │ B │ │ N │ M │ COMM │ DOT │ SLSH │ ENT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ADJUST│ LCTL │ LALT │ LGUI │LOWER │ SPC │ │ SPC │RAISE │ LEFT │ DOWN │ UP │ RGHT │ + * └──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +[_QWERTY] = LAYOUT_ortho_4x12( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ TAB │ Q │ W │ F │ P │ G │ │ J │ L │ U │ Y │ SCLN │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ ESC │ A │ R │ S │ T │ D │ │ H │ N │ E │ I │ O │ QUOT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ Z │ X │ C │ V │ B │ │ K │ M │ COMM │ DOT │ SLSH │ ENT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ADJUST│ LCTL │ LALT │ LGUI │LOWER │ SPC │ │ SPC │RAISE │ LEFT │ DOWN │ UP │ RGHT │ + * └──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +[_COLEMAK] = LAYOUT_ortho_4x12( \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ TAB │ QUOT │ COMM │ DOT │ P │ Y │ │ F │ G │ C │ R │ L │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ ESC │ A │ O │ E │ U │ I │ │ D │ H │ T │ N │ S │ SLSH │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ SCLN │ Q │ J │ K │ X │ │ B │ M │ W │ V │ Z │ ENT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ADJUST│ LCTL │ LALT │ LGUI │LOWER │ SPC │ │ SPC │RAISE │ LEFT │ DOWN │ UP │ RGHT │ + * └──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +[_DVORAK] = LAYOUT_ortho_4x12( \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +[_LOWER] = LAYOUT_ortho_4x12( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ TILD │ EXLM │ AT │ HASH │ DLR │ PERC │ │ CIRC │ AMPR │ ASTR │ LPRN │ RPRN │ DEL │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ DEL │ F1 │ F2 │ F3 │ F4 │ F5 │ │ F6 │ UNDS │ PLUS │ LCBR │ RCBR │ PIPE │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ F7 │ F8 │ F9 │ F10 │ F11 │ │ F12 │S(KC_N│S(KC_N│ │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │ MNXT │ VOLD │ VOLU │ MPLY │ + * └──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ + +/* + * other comment + */ + +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ GRV │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ DEL │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ DEL │ F1 │ F2 │ F3 │ F4 │ F5 │ │ F6 │ MINS │ EQL │ LBRC │ RBRC │ BSLS │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ F7 │ F8 │ F9 │ F10 │ F11 │ │ F12 │ NUHS │ NUBS │ │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │ MNXT │ VOLD │ VOLU │ MPLY │ + * └──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +[_RAISE] = LAYOUT_ortho_4x12( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* + * + */ + +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ │RESET │ │ │ │ │ │ │ │ │ │ │ DEL │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │AU_ON │AU_OFF│AG_NOR│ │AG_SWA│QWERTY│COLEMA│DVORAK│ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * └──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +[_ADJUST] = LAYOUT_ortho_4x12( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + diff --git a/test/expect/sofle.c b/test/expect/sofle.c new file mode 100644 index 0000000..337b9bd --- /dev/null +++ b/test/expect/sofle.c @@ -0,0 +1,65 @@ +/* ,-----------------------------------------. ,-----------------------------------------. + * | GRV | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | GRV | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ESC | Q | W | E | R | T | | Y | U | I | O | P | BSPC | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | TAB | A | S | D | F | G |,------. ,------.| H | J | K | L | SCLN | QUOT | + * |------+------+------+------+------+------|| MUTE | | ||------+------+------+------+------+------| + * | LSFT | Z | X | C | V | B |`------' `------'| N | M | COMM | DOT | SLSH | RSFT | + * `-------------+------+------+------+-.------------. ,------------.-+------+------+------+-------------' + * | LGUI | LALT |LCTRL |/LOWER / ENT / \ SPC \RAISE \|RCTRL | RALT | RGUI | + * | | | / / / \ \ \ | | | + * `---------------------------------' `---------------------------------' + * generated by [keymapviz] */ +/* ,-----------------------------------------. ,-----------------------------------------. + * | GRV | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | GRV | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ESC | Q | W | F | P | G | | J | L | U | Y | SCLN | BSPC | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | TAB | A | R | S | T | D |,------. ,------.| H | N | E | I | O | QUOT | + * |------+------+------+------+------+------|| MUTE | | ||------+------+------+------+------+------| + * | LSFT | Z | X | C | V | B |`------' `------'| K | M | COMM | DOT | SLSH | RSFT | + * `-------------+------+------+------+-.------------. ,------------.-+------+------+------+-------------' + * | LGUI | LALT |LCTRL |/LOWER / ENT / \ SPC \RAISE \|RCTRL | RALT | RGUI | + * | | | / / / \ \ \ | | | + * `---------------------------------' `---------------------------------' + * generated by [keymapviz] */ +/* ,-----------------------------------------. ,-----------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | GRV | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | EXLM | AT | HASH | DLR | PERC |,------. ,------.| CIRC | AMPR | ASTR | LPRN | RPRN | PIPE | + * |------+------+------+------+------+------|| | | ||------+------+------+------+------+------| + * | | EQL | MINS | PLUS | LCBR | RCBR |`------' `------'| LBRC | RBRC | SCLN | COLN | BSLS | | + * `-------------+------+------+------+-.------------. ,------------.-+------+------+------+-------------' + * | | | |/ / / \ \ \| | | | + * | | | / / / \ \ \ | | | + * `---------------------------------' `---------------------------------' + * generated by [keymapviz] */ +/* ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | INS | PSCR | APP | | | | PGUP |PRVWD | UP |NXTWD |DLINE | BSPC | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | LALT | LCTL | LSFT | | CAPS |,------. ,------.| PGDN | LEFT | DOWN | RGHT | DEL | BSPC | + * |------+------+------+------+------+------|| | | ||------+------+------+------+------+------| + * | | UNDO | CUT | COPY |PASTE | |`------' `------'| |LSTRT | | LEND | | | + * `-------------+------+------+------+-.------------. ,------------.-+------+------+------+-------------' + * | | | |/ / / \ \ \| | | | + * | | | / / / \ \ \ | | | + * `---------------------------------' `---------------------------------' + * generated by [keymapviz] */ +/* ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |RESET | |QWERTY|COLEMA|CG_TOG| | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | |CG_TOG| | | |,------. ,------.| | VOLD | MUTE | VOLU | | | + * |------+------+------+------+------+------|| | | ||------+------+------+------+------+------| + * | | | | | | |`------' `------'| | MPRV | MPLY | MNXT | | | + * `-------------+------+------+------+-.------------. ,------------.-+------+------+------+-------------' + * | | | |/ / / \ \ \| | | | + * | | | / / / \ \ \ | | | + * `---------------------------------' `---------------------------------' + * generated by [keymapviz] */ diff --git a/test/expect/sofle_0.json b/test/expect/sofle_0.json new file mode 100644 index 0000000..baed3ba --- /dev/null +++ b/test/expect/sofle_0.json @@ -0,0 +1,301 @@ +[ + [ + { + "y": 0.2, + "x": 3, + "c": "#e8e7e3", + "a": 7, + "f": 7 + }, + "3", + { + "x": 7 + }, + "8" + ], + [ + { + "y": -0.95, + "x": 10 + }, + "7" + ], + [ + { + "y": -0.9, + "x": 2 + }, + "2", + { + "x": 1 + }, + "4", + { + "x": 7 + }, + "9" + ], + [ + { + "y": -0.85 + }, + "GRV", + "1", + { + "x": 3 + }, + "5", + { + "x": 3 + }, + "6", + { + "x": 3 + }, + "0", + "GRV" + ], + [ + { + "y": -0.30000000000000004, + "x": 3 + }, + "E", + { + "x": 7 + }, + "I" + ], + [ + { + "y": -0.95, + "x": 10 + }, + "U" + ], + [ + { + "y": -0.8999999999999999, + "x": 2 + }, + "W", + { + "x": 1 + }, + "R", + { + "x": 7 + }, + "O" + ], + [ + { + "y": -0.8500000000000001 + }, + "ESC", + "Q", + { + "x": 3 + }, + "T", + { + "x": 3 + }, + "Y", + { + "x": 3 + }, + "P", + "BSPC" + ], + [ + { + "y": -0.2999999999999998, + "x": 3 + }, + "D", + { + "x": 7 + }, + "K" + ], + [ + { + "y": -0.8500000000000001, + "x": 2 + }, + "S", + { + "x": 1, + "n": true + }, + "F", + { + "x": 5, + "n": true + }, + "J", + { + "x": 1 + }, + "L" + ], + [ + { + "y": -0.8500000000000001 + }, + "TAB", + "A", + { + "x": 3 + }, + "G", + { + "x": 3 + }, + "H", + { + "x": 3 + }, + "SCLN", + "QUOT" + ], + [ + { + "y": -0.2999999999999998, + "x": 3 + }, + "C", + { + "x": 7 + }, + "COMM" + ], + [ + { + "y": -0.9500000000000002, + "x": 6.25, + "p": "CHICKLET" + }, + "MUTE", + { + "x": 0.5 + }, + "" + ], + [ + { + "y": -0.8999999999999999, + "x": 2, + "p": "default" + }, + "X", + { + "x": 1 + }, + "V", + { + "x": 5 + }, + "M", + { + "x": 1 + }, + "DOT" + ], + [ + { + "y": -0.8500000000000001 + }, + "LSFT", + "Z", + { + "x": 3 + }, + "B", + { + "x": 3, + "p": "CHICKLET" + }, + "N", + { + "x": 3, + "p": "default" + }, + "SLSH", + "RSFT" + ], + [ + { + "y": -0.15000000000000036, + "x": 2.75 + }, + "LALT", + "LCTRL", + { + "x": 5.5 + }, + "RCTRL" + ], + [ + { + "y": -0.8499999999999996, + "x": 1.75 + }, + "LGUI" + ], + [ + { + "rx": 0.25, + "y": 4.35, + "x": 11 + }, + "RALT" + ], + [ + { + "rx": 0.5, + "y": 4.5, + "x": 11.75 + }, + "RGUI" + ], + [ + { + "r": 15, + "rx": 0.75, + "y": 3.25, + "x": 5.25 + }, + "LOWER" + ], + [ + { + "r": 30, + "rx": 0, + "y": 0.6, + "x": 7.75, + "h": 1.5 + }, + "ENT" + ], + [ + { + "r": -30, + "rx": 0.5, + "y": 7.85, + "x": 3.75, + "h": 1.5 + }, + "SPC" + ], + [ + { + "r": -15, + "rx": 0, + "y": 6.9, + "x": 7.5 + }, + "RAISE" + ] +] diff --git a/test/expect/sofle_1.json b/test/expect/sofle_1.json new file mode 100644 index 0000000..5948c42 --- /dev/null +++ b/test/expect/sofle_1.json @@ -0,0 +1,301 @@ +[ + [ + { + "y": 0.2, + "x": 3, + "c": "#e8e7e3", + "a": 7, + "f": 7 + }, + "3", + { + "x": 7 + }, + "8" + ], + [ + { + "y": -0.95, + "x": 10 + }, + "7" + ], + [ + { + "y": -0.9, + "x": 2 + }, + "2", + { + "x": 1 + }, + "4", + { + "x": 7 + }, + "9" + ], + [ + { + "y": -0.85 + }, + "GRV", + "1", + { + "x": 3 + }, + "5", + { + "x": 3 + }, + "6", + { + "x": 3 + }, + "0", + "GRV" + ], + [ + { + "y": -0.30000000000000004, + "x": 3 + }, + "F", + { + "x": 7 + }, + "U" + ], + [ + { + "y": -0.95, + "x": 10 + }, + "L" + ], + [ + { + "y": -0.8999999999999999, + "x": 2 + }, + "W", + { + "x": 1 + }, + "P", + { + "x": 7 + }, + "Y" + ], + [ + { + "y": -0.8500000000000001 + }, + "ESC", + "Q", + { + "x": 3 + }, + "G", + { + "x": 3 + }, + "J", + { + "x": 3 + }, + "SCLN", + "BSPC" + ], + [ + { + "y": -0.2999999999999998, + "x": 3 + }, + "S", + { + "x": 7 + }, + "E" + ], + [ + { + "y": -0.8500000000000001, + "x": 2 + }, + "R", + { + "x": 1, + "n": true + }, + "T", + { + "x": 5, + "n": true + }, + "N", + { + "x": 1 + }, + "I" + ], + [ + { + "y": -0.8500000000000001 + }, + "TAB", + "A", + { + "x": 3 + }, + "D", + { + "x": 3 + }, + "H", + { + "x": 3 + }, + "O", + "QUOT" + ], + [ + { + "y": -0.2999999999999998, + "x": 3 + }, + "C", + { + "x": 7 + }, + "COMM" + ], + [ + { + "y": -0.9500000000000002, + "x": 6.25, + "p": "CHICKLET" + }, + "MUTE", + { + "x": 0.5 + }, + "" + ], + [ + { + "y": -0.8999999999999999, + "x": 2, + "p": "default" + }, + "X", + { + "x": 1 + }, + "V", + { + "x": 5 + }, + "M", + { + "x": 1 + }, + "DOT" + ], + [ + { + "y": -0.8500000000000001 + }, + "LSFT", + "Z", + { + "x": 3 + }, + "B", + { + "x": 3, + "p": "CHICKLET" + }, + "K", + { + "x": 3, + "p": "default" + }, + "SLSH", + "RSFT" + ], + [ + { + "y": -0.15000000000000036, + "x": 2.75 + }, + "LALT", + "LCTRL", + { + "x": 5.5 + }, + "RCTRL" + ], + [ + { + "y": -0.8499999999999996, + "x": 1.75 + }, + "LGUI" + ], + [ + { + "rx": 0.25, + "y": 4.35, + "x": 11 + }, + "RALT" + ], + [ + { + "rx": 0.5, + "y": 4.5, + "x": 11.75 + }, + "RGUI" + ], + [ + { + "r": 15, + "rx": 0.75, + "y": 3.25, + "x": 5.25 + }, + "LOWER" + ], + [ + { + "r": 30, + "rx": 0, + "y": 0.6, + "x": 7.75, + "h": 1.5 + }, + "ENT" + ], + [ + { + "r": -30, + "rx": 0.5, + "y": 7.85, + "x": 3.75, + "h": 1.5 + }, + "SPC" + ], + [ + { + "r": -15, + "rx": 0, + "y": 6.9, + "x": 7.5 + }, + "RAISE" + ] +] diff --git a/test/expect/sofle_2.json b/test/expect/sofle_2.json new file mode 100644 index 0000000..547f277 --- /dev/null +++ b/test/expect/sofle_2.json @@ -0,0 +1,301 @@ +[ + [ + { + "y": 0.2, + "x": 3, + "c": "#e8e7e3", + "a": 7, + "f": 7 + }, + "F3", + { + "x": 7 + }, + "F8" + ], + [ + { + "y": -0.95, + "x": 10 + }, + "F7" + ], + [ + { + "y": -0.9, + "x": 2 + }, + "F2", + { + "x": 1 + }, + "F4", + { + "x": 7 + }, + "F9" + ], + [ + { + "y": -0.85 + }, + "", + "F1", + { + "x": 3 + }, + "F5", + { + "x": 3 + }, + "F6", + { + "x": 3 + }, + "F10", + "F11" + ], + [ + { + "y": -0.30000000000000004, + "x": 3 + }, + "3", + { + "x": 7 + }, + "8" + ], + [ + { + "y": -0.95, + "x": 10 + }, + "7" + ], + [ + { + "y": -0.8999999999999999, + "x": 2 + }, + "2", + { + "x": 1 + }, + "4", + { + "x": 7 + }, + "9" + ], + [ + { + "y": -0.8500000000000001 + }, + "GRV", + "1", + { + "x": 3 + }, + "5", + { + "x": 3 + }, + "6", + { + "x": 3 + }, + "0", + "F12" + ], + [ + { + "y": -0.2999999999999998, + "x": 3 + }, + "HASH", + { + "x": 7 + }, + "ASTR" + ], + [ + { + "y": -0.8500000000000001, + "x": 2 + }, + "AT", + { + "x": 1, + "n": true + }, + "DLR", + { + "x": 5, + "n": true + }, + "AMPR", + { + "x": 1 + }, + "LPRN" + ], + [ + { + "y": -0.8500000000000001 + }, + "", + "EXLM", + { + "x": 3 + }, + "PERC", + { + "x": 3 + }, + "CIRC", + { + "x": 3 + }, + "RPRN", + "PIPE" + ], + [ + { + "y": -0.2999999999999998, + "x": 3 + }, + "PLUS", + { + "x": 7 + }, + "SCLN" + ], + [ + { + "y": -0.9500000000000002, + "x": 6.25, + "p": "CHICKLET" + }, + "", + { + "x": 0.5 + }, + "" + ], + [ + { + "y": -0.8999999999999999, + "x": 2, + "p": "default" + }, + "MINS", + { + "x": 1 + }, + "LCBR", + { + "x": 5 + }, + "RBRC", + { + "x": 1 + }, + "COLN" + ], + [ + { + "y": -0.8500000000000001 + }, + "", + "EQL", + { + "x": 3 + }, + "RCBR", + { + "x": 3, + "p": "CHICKLET" + }, + "LBRC", + { + "x": 3, + "p": "default" + }, + "BSLS", + "" + ], + [ + { + "y": -0.15000000000000036, + "x": 2.75 + }, + "", + "", + { + "x": 5.5 + }, + "" + ], + [ + { + "y": -0.8499999999999996, + "x": 1.75 + }, + "" + ], + [ + { + "rx": 0.25, + "y": 4.35, + "x": 11 + }, + "" + ], + [ + { + "rx": 0.5, + "y": 4.5, + "x": 11.75 + }, + "" + ], + [ + { + "r": 15, + "rx": 0.75, + "y": 3.25, + "x": 5.25 + }, + "" + ], + [ + { + "r": 30, + "rx": 0, + "y": 0.6, + "x": 7.75, + "h": 1.5 + }, + "" + ], + [ + { + "r": -30, + "rx": 0.5, + "y": 7.85, + "x": 3.75, + "h": 1.5 + }, + "" + ], + [ + { + "r": -15, + "rx": 0, + "y": 6.9, + "x": 7.5 + }, + "" + ] +] diff --git a/test/expect/sofle_3.json b/test/expect/sofle_3.json new file mode 100644 index 0000000..12e6eef --- /dev/null +++ b/test/expect/sofle_3.json @@ -0,0 +1,301 @@ +[ + [ + { + "y": 0.2, + "x": 3, + "c": "#e8e7e3", + "a": 7, + "f": 7 + }, + "", + { + "x": 7 + }, + "" + ], + [ + { + "y": -0.95, + "x": 10 + }, + "" + ], + [ + { + "y": -0.9, + "x": 2 + }, + "", + { + "x": 1 + }, + "", + { + "x": 7 + }, + "" + ], + [ + { + "y": -0.85 + }, + "", + "", + { + "x": 3 + }, + "", + { + "x": 3 + }, + "", + { + "x": 3 + }, + "", + "" + ], + [ + { + "y": -0.30000000000000004, + "x": 3 + }, + "APP", + { + "x": 7 + }, + "UP" + ], + [ + { + "y": -0.95, + "x": 10 + }, + "PRVWD" + ], + [ + { + "y": -0.8999999999999999, + "x": 2 + }, + "PSCR", + { + "x": 1 + }, + "", + { + "x": 7 + }, + "NXTWD" + ], + [ + { + "y": -0.8500000000000001 + }, + "", + "INS", + { + "x": 3 + }, + "", + { + "x": 3 + }, + "PGUP", + { + "x": 3 + }, + "DLINE", + "BSPC" + ], + [ + { + "y": -0.2999999999999998, + "x": 3 + }, + "LSFT", + { + "x": 7 + }, + "DOWN" + ], + [ + { + "y": -0.8500000000000001, + "x": 2 + }, + "LCTL", + { + "x": 1, + "n": true + }, + "", + { + "x": 5, + "n": true + }, + "LEFT", + { + "x": 1 + }, + "RGHT" + ], + [ + { + "y": -0.8500000000000001 + }, + "", + "LALT", + { + "x": 3 + }, + "CAPS", + { + "x": 3 + }, + "PGDN", + { + "x": 3 + }, + "DEL", + "BSPC" + ], + [ + { + "y": -0.2999999999999998, + "x": 3 + }, + "COPY", + { + "x": 7 + }, + "" + ], + [ + { + "y": -0.9500000000000002, + "x": 6.25, + "p": "CHICKLET" + }, + "", + { + "x": 0.5 + }, + "" + ], + [ + { + "y": -0.8999999999999999, + "x": 2, + "p": "default" + }, + "CUT", + { + "x": 1 + }, + "PASTE", + { + "x": 5 + }, + "LSTRT", + { + "x": 1 + }, + "LEND" + ], + [ + { + "y": -0.8500000000000001 + }, + "", + "UNDO", + { + "x": 3 + }, + "", + { + "x": 3, + "p": "CHICKLET" + }, + "", + { + "x": 3, + "p": "default" + }, + "", + "" + ], + [ + { + "y": -0.15000000000000036, + "x": 2.75 + }, + "", + "", + { + "x": 5.5 + }, + "" + ], + [ + { + "y": -0.8499999999999996, + "x": 1.75 + }, + "" + ], + [ + { + "rx": 0.25, + "y": 4.35, + "x": 11 + }, + "" + ], + [ + { + "rx": 0.5, + "y": 4.5, + "x": 11.75 + }, + "" + ], + [ + { + "r": 15, + "rx": 0.75, + "y": 3.25, + "x": 5.25 + }, + "" + ], + [ + { + "r": 30, + "rx": 0, + "y": 0.6, + "x": 7.75, + "h": 1.5 + }, + "" + ], + [ + { + "r": -30, + "rx": 0.5, + "y": 7.85, + "x": 3.75, + "h": 1.5 + }, + "" + ], + [ + { + "r": -15, + "rx": 0, + "y": 6.9, + "x": 7.5 + }, + "" + ] +] diff --git a/test/expect/sofle_4.json b/test/expect/sofle_4.json new file mode 100644 index 0000000..4ee9b12 --- /dev/null +++ b/test/expect/sofle_4.json @@ -0,0 +1,301 @@ +[ + [ + { + "y": 0.2, + "x": 3, + "c": "#e8e7e3", + "a": 7, + "f": 7 + }, + "", + { + "x": 7 + }, + "" + ], + [ + { + "y": -0.95, + "x": 10 + }, + "" + ], + [ + { + "y": -0.9, + "x": 2 + }, + "", + { + "x": 1 + }, + "", + { + "x": 7 + }, + "" + ], + [ + { + "y": -0.85 + }, + "", + "", + { + "x": 3 + }, + "", + { + "x": 3 + }, + "", + { + "x": 3 + }, + "", + "" + ], + [ + { + "y": -0.30000000000000004, + "x": 3 + }, + "COLEMAK", + { + "x": 7 + }, + "" + ], + [ + { + "y": -0.95, + "x": 10 + }, + "" + ], + [ + { + "y": -0.8999999999999999, + "x": 2 + }, + "QWERTY", + { + "x": 1 + }, + "CG_TOGG", + { + "x": 7 + }, + "" + ], + [ + { + "y": -0.8500000000000001 + }, + "RESET", + "", + { + "x": 3 + }, + "", + { + "x": 3 + }, + "", + { + "x": 3 + }, + "", + "" + ], + [ + { + "y": -0.2999999999999998, + "x": 3 + }, + "", + { + "x": 7 + }, + "MUTE" + ], + [ + { + "y": -0.8500000000000001, + "x": 2 + }, + "CG_TOGG", + { + "x": 1, + "n": true + }, + "", + { + "x": 5, + "n": true + }, + "VOLD", + { + "x": 1 + }, + "VOLU" + ], + [ + { + "y": -0.8500000000000001 + }, + "", + "", + { + "x": 3 + }, + "", + { + "x": 3 + }, + "", + { + "x": 3 + }, + "", + "" + ], + [ + { + "y": -0.2999999999999998, + "x": 3 + }, + "", + { + "x": 7 + }, + "MPLY" + ], + [ + { + "y": -0.9500000000000002, + "x": 6.25, + "p": "CHICKLET" + }, + "", + { + "x": 0.5 + }, + "" + ], + [ + { + "y": -0.8999999999999999, + "x": 2, + "p": "default" + }, + "", + { + "x": 1 + }, + "", + { + "x": 5 + }, + "MPRV", + { + "x": 1 + }, + "MNXT" + ], + [ + { + "y": -0.8500000000000001 + }, + "", + "", + { + "x": 3 + }, + "", + { + "x": 3, + "p": "CHICKLET" + }, + "", + { + "x": 3, + "p": "default" + }, + "", + "" + ], + [ + { + "y": -0.15000000000000036, + "x": 2.75 + }, + "", + "", + { + "x": 5.5 + }, + "" + ], + [ + { + "y": -0.8499999999999996, + "x": 1.75 + }, + "" + ], + [ + { + "rx": 0.25, + "y": 4.35, + "x": 11 + }, + "" + ], + [ + { + "rx": 0.5, + "y": 4.5, + "x": 11.75 + }, + "" + ], + [ + { + "r": 15, + "rx": 0.75, + "y": 3.25, + "x": 5.25 + }, + "" + ], + [ + { + "r": 30, + "rx": 0, + "y": 0.6, + "x": 7.75, + "h": 1.5 + }, + "" + ], + [ + { + "r": -30, + "rx": 0.5, + "y": 7.85, + "x": 3.75, + "h": 1.5 + }, + "" + ], + [ + { + "r": -15, + "rx": 0, + "y": 6.9, + "x": 7.5 + }, + "" + ] +] diff --git a/test/expect/sofle_fancy.c b/test/expect/sofle_fancy.c new file mode 100644 index 0000000..91d703c --- /dev/null +++ b/test/expect/sofle_fancy.c @@ -0,0 +1,65 @@ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ GRV │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ GRV │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ ESC │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ TAB │ A │ S │ D │ F │ G │┌──────┐ ┌──────┐│ H │ J │ K │ L │ SCLN │ QUOT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤│ MUTE │ │ │├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ Z │ X │ C │ V │ B │└──────┘ └──────┘│ N │ M │ COMM │ DOT │ SLSH │ RSFT │ + * └──────┴──────┼──────┼──────┼──────┼──────┼───────┐ ┌───────┼──────┼──────┼──────┼──────┼──────┴──────┘ + * │ LGUI │ LALT │LCTRL │LOWER │ ENT │ │ SPC │RAISE │RCTRL │ RALT │ RGUI │ + * │ │ │ │ │ │ │ │ │ │ │ │ + * └──────┴──────┴──────┴──────┴───────┘ └───────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ GRV │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ GRV │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ ESC │ Q │ W │ F │ P │ G │ │ J │ L │ U │ Y │ SCLN │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ TAB │ A │ R │ S │ T │ D │┌──────┐ ┌──────┐│ H │ N │ E │ I │ O │ QUOT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤│ MUTE │ │ │├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ Z │ X │ C │ V │ B │└──────┘ └──────┘│ K │ M │ COMM │ DOT │ SLSH │ RSFT │ + * └──────┴──────┼──────┼──────┼──────┼──────┼───────┐ ┌───────┼──────┼──────┼──────┼──────┼──────┴──────┘ + * │ LGUI │ LALT │LCTRL │LOWER │ ENT │ │ SPC │RAISE │RCTRL │ RALT │ RGUI │ + * │ │ │ │ │ │ │ │ │ │ │ │ + * └──────┴──────┴──────┴──────┴───────┘ └───────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ │ F1 │ F2 │ F3 │ F4 │ F5 │ │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ GRV │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ F12 │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ EXLM │ AT │ HASH │ DLR │ PERC │┌──────┐ ┌──────┐│ CIRC │ AMPR │ ASTR │ LPRN │ RPRN │ PIPE │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤│ │ │ │├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ EQL │ MINS │ PLUS │ LCBR │ RCBR │└──────┘ └──────┘│ LBRC │ RBRC │ SCLN │ COLN │ BSLS │ │ + * └──────┴──────┼──────┼──────┼──────┼──────┼───────┐ ┌───────┼──────┼──────┼──────┼──────┼──────┴──────┘ + * │ │ │ │ │ │ │ │ │ │ │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ + * └──────┴──────┴──────┴──────┴───────┘ └───────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ INS │ PSCR │ APP │ │ │ │ PGUP │PRVWD │ UP │NXTWD │DLINE │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ LALT │ LCTL │ LSFT │ │ CAPS │┌──────┐ ┌──────┐│ PGDN │ LEFT │ DOWN │ RGHT │ DEL │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤│ │ │ │├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ UNDO │ CUT │ COPY │PASTE │ │└──────┘ └──────┘│ │LSTRT │ │ LEND │ │ │ + * └──────┴──────┼──────┼──────┼──────┼──────┼───────┐ ┌───────┼──────┼──────┼──────┼──────┼──────┴──────┘ + * │ │ │ │ │ │ │ │ │ │ │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ + * └──────┴──────┴──────┴──────┴───────┘ └───────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │RESET │ │QWERTY│COLEMA│CG_TOG│ │ │ │ │ │ │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │CG_TOG│ │ │ │┌──────┐ ┌──────┐│ │ VOLD │ MUTE │ VOLU │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤│ │ │ │├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │└──────┘ └──────┘│ │ MPRV │ MPLY │ MNXT │ │ │ + * └──────┴──────┼──────┼──────┼──────┼──────┼───────┐ ┌───────┼──────┼──────┼──────┼──────┼──────┴──────┘ + * │ │ │ │ │ │ │ │ │ │ │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ + * └──────┴──────┴──────┴──────┴───────┘ └───────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ diff --git a/test/expect/sweet16_fancy.c b/test/expect/sweet16_fancy.c new file mode 100644 index 0000000..cc56fa3 --- /dev/null +++ b/test/expect/sweet16_fancy.c @@ -0,0 +1,10 @@ +/* ┌──────┬──────┬──────┬──────┐ + * │ 7 │ 8 │ 9 │ ASTR │ + * ├──────┼──────┼──────┼──────┤ + * │ 4 │ 5 │ 6 │ SLSH │ + * ├──────┼──────┼──────┼──────┤ + * │ 1 │ 2 │ 3 │ MINS │ + * ├──────┼──────┼──────┼──────┤ + * │ 0 │ ENT │ DOT │ EQL │ + * └──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ diff --git a/test/input/replace_lets_split_keymap_fancy.c b/test/input/replace_lets_split_keymap_fancy.c new file mode 100644 index 0000000..7a1ce18 --- /dev/null +++ b/test/input/replace_lets_split_keymap_fancy.c @@ -0,0 +1,68 @@ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ + * │ TAB │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ ESC │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ SCLN │ QUOT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ Z │ X │ C │ V │ B │ │ N │ M │ COMM │ DOT │ SLSH │ ENT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ + * │ADJUST│ LCTL │ LALT │ LGUI │LOWER │ SPC │ │ SPC │RAISE │ LEFT │ DOWN │ UP │ RGHT │ + * └──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +[_QWERTY] = LAYOUT_ortho_4x12( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* [keymapviz] */ +[_COLEMAK] = LAYOUT_ortho_4x12( \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* +[keymapviz] + */ +[_DVORAK] = LAYOUT_ortho_4x12( \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +[_LOWER] = LAYOUT_ortho_4x12( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), +/*[keymapviz]*/ + +/* + * other comment + */ + +/*[keymapviz]*/ +[_RAISE] = LAYOUT_ortho_4x12( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* + * + */ + +/*[keymapviz]*/ +[_ADJUST] = LAYOUT_ortho_4x12( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + diff --git a/test/test.py b/test/test.py index 38ce803..57e01ab 100644 --- a/test/test.py +++ b/test/test.py @@ -11,119 +11,221 @@ def exe(cmd): status &= (r == 0) +# crkbd exe('keymapviz ./qmk_firmware/keyboards/crkbd/keymaps/default/keymap.c -o crkbd.c') +exe('keymapviz ./qmk_firmware/keyboards/crkbd/keymaps/default/keymap.c -o crkbd_fancy.c -t fancy') exe('keymapviz ./qmk_firmware/keyboards/crkbd/keymaps/default/keymap.c -o crkbd_{}.json -t json') + +exe('diff -u expect/crkbd.c crkbd.c') +exe('diff -u expect/crkbd_fancy.c crkbd_fancy.c') +exe('diff -u expect/crkbd_0.json crkbd_0.json') +exe('diff -u expect/crkbd_1.json crkbd_1.json') +exe('diff -u expect/crkbd_2.json crkbd_2.json') +exe('diff -u expect/crkbd_3.json crkbd_3.json') + +# dactyl_manuform5x6 +exe('keymapviz -k dactyl_manuform5x6 ./qmk_firmware/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/keymap.c -o dactyl_manuform5x6.c') +exe('keymapviz -k dactyl_manuform5x6 ./qmk_firmware/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/keymap.c -o dactyl_manuform5x6_fancy.c -t fancy') +exe('keymapviz -k dactyl_manuform5x6 ./qmk_firmware/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/keymap.c -o dactyl_manuform5x6_{}.json -t json') + +exe('diff -u expect/dactyl_manuform5x6.c dactyl_manuform5x6.c') +exe('diff -u expect/dactyl_manuform5x6_fancy.c dactyl_manuform5x6_fancy.c') +exe('diff -u expect/dactyl_manuform5x6_0.json dactyl_manuform5x6_0.json') + +# ergo42 exe('keymapviz ./qmk_firmware/keyboards/ergo42/keymaps/default/keymap.c -o ergo42.c') +exe('keymapviz ./qmk_firmware/keyboards/ergo42/keymaps/default/keymap.c -o ergo42_fancy.c -t fancy') exe('keymapviz ./qmk_firmware/keyboards/ergo42/keymaps/default/keymap.c -o ergo42_{}.json -t json') + +exe('diff -u expect/ergo42.c ergo42.c') +exe('diff -u expect/ergo42_fancy.c ergo42_fancy.c') +exe('diff -u expect/ergo42_0.json ergo42_0.json') +exe('diff -u expect/ergo42_1.json ergo42_1.json') +exe('diff -u expect/ergo42_2.json ergo42_2.json') + +# ergodash exe('keymapviz ./qmk_firmware/keyboards/ergodash/rev1/keymaps/default/keymap.c -o ergodash.c') +exe('keymapviz ./qmk_firmware/keyboards/ergodash/rev1/keymaps/default/keymap.c -o ergodash_fancy.c -t fancy') exe('keymapviz ./qmk_firmware/keyboards/ergodash/rev1/keymaps/default/keymap.c -o ergodash_{}.json -t json') + +exe('diff -u expect/ergodash.c ergodash.c') +exe('diff -u expect/ergodash_fancy.c ergodash_fancy.c') +exe('diff -u expect/ergodash_0.json ergodash_0.json') +exe('diff -u expect/ergodash_1.json ergodash_1.json') +exe('diff -u expect/ergodash_2.json ergodash_2.json') +exe('diff -u expect/ergodash_3.json ergodash_3.json') + +# ergodash (2u_inner) +exe('keymapviz ./qmk_firmware/keyboards/ergodash/rev1/keymaps/default/keymap.c -l 2u_inner -o ergodash_L2u_inner.c') +exe('keymapviz ./qmk_firmware/keyboards/ergodash/rev1/keymaps/default/keymap.c -l 2u_inner -o ergodash_L2u_inner_fancy.c -t fancy ') +exe('keymapviz ./qmk_firmware/keyboards/ergodash/rev1/keymaps/default/keymap.c -l 2u_inner -o ergodash_L2u_inner_{}.json -t json') + +exe('diff -u expect/ergodash_L2u_inner.c ergodash_L2u_inner.c') +exe('diff -u expect/ergodash_L2u_inner_fancy.c ergodash_L2u_inner_fancy.c') +exe('diff -u expect/ergodash_L2u_inner_0.json ergodash_L2u_inner_0.json') +exe('diff -u expect/ergodash_L2u_inner_1.json ergodash_L2u_inner_1.json') +exe('diff -u expect/ergodash_L2u_inner_2.json ergodash_L2u_inner_2.json') +exe('diff -u expect/ergodash_L2u_inner_3.json ergodash_L2u_inner_3.json') + +# ergodox_ez exe('keymapviz ./qmk_firmware/keyboards/ergodox_ez/keymaps/default/keymap.c -o ergodox.c') +exe('keymapviz ./qmk_firmware/keyboards/ergodox_ez/keymaps/default/keymap.c -o ergodox_fancy.c -t fancy') exe('keymapviz ./qmk_firmware/keyboards/ergodox_ez/keymaps/default/keymap.c -o ergodox_{}.json -t json') + +exe('diff -u expect/ergodox.c ergodox.c') +exe('diff -u expect/ergodox_fancy.c ergodox_fancy.c') +exe('diff -u expect/ergodox_0.json ergodox_0.json') +exe('diff -u expect/ergodox_1.json ergodox_1.json') +exe('diff -u expect/ergodox_2.json ergodox_2.json') + +# fortitude60 exe('keymapviz ./qmk_firmware/keyboards/fortitude60/keymaps/default/keymap.c -o fortitude60.c') +exe('keymapviz ./qmk_firmware/keyboards/fortitude60/keymaps/default/keymap.c -o fortitude60_fancy.c -t fancy') exe('keymapviz ./qmk_firmware/keyboards/fortitude60/keymaps/default/keymap.c -o fortitude60_{}.json -t json') + +exe('diff -u expect/fortitude60.c fortitude60.c') +exe('diff -u expect/fortitude60_fancy.c fortitude60_fancy.c') +exe('diff -u expect/fortitude60_0.json fortitude60_0.json') +exe('diff -u expect/fortitude60_1.json fortitude60_1.json') +exe('diff -u expect/fortitude60_2.json fortitude60_2.json') +exe('diff -u expect/fortitude60_3.json fortitude60_3.json') +exe('diff -u expect/fortitude60_4.json fortitude60_4.json') +exe('diff -u expect/fortitude60_5.json fortitude60_5.json') + +# helix exe('keymapviz ./qmk_firmware/keyboards/helix/rev2/keymaps/default/keymap.c -o helix.c') +exe('keymapviz ./qmk_firmware/keyboards/helix/rev2/keymaps/default/keymap.c -o helix_fancy.c -t fancy') exe('keymapviz ./qmk_firmware/keyboards/helix/rev2/keymaps/default/keymap.c -o helix_{}.json -t json') + +exe('diff -u expect/helix.c helix.c') +exe('diff -u expect/helix_fancy.c helix_fancy.c') +exe('diff -u expect/helix_0.json helix_0.json') +exe('diff -u expect/helix_1.json helix_1.json') +exe('diff -u expect/helix_2.json helix_2.json') +exe('diff -u expect/helix_3.json helix_3.json') +exe('diff -u expect/helix_4.json helix_4.json') +exe('diff -u expect/helix_5.json helix_5.json') +exe('diff -u expect/helix_6.json helix_6.json') +exe('diff -u expect/helix_7.json helix_7.json') +exe('diff -u expect/helix_8.json helix_8.json') +exe('diff -u expect/helix_9.json helix_9.json') +exe('diff -u expect/helix_10.json helix_10.json') +exe('diff -u expect/helix_11.json helix_11.json') + +# kaishi65 +exe('keymapviz ./qmk_firmware/keyboards/kbdclack/kaishi65/keymaps/default/keymap.c -o kaishi65.c') +exe('keymapviz ./qmk_firmware/keyboards/kbdclack/kaishi65/keymaps/default/keymap.c -o kaishi65_fancy.c -t fancy') +exe('keymapviz ./qmk_firmware/keyboards/kbdclack/kaishi65/keymaps/default/keymap.c -o kaishi65_{}.json -t json') + +exe('diff -u expect/kaishi65.c kaishi65.c') +exe('diff -u expect/kaishi65_fancy.c kaishi65_fancy.c') +exe('diff -u expect/kaishi65_0.json kaishi65_0.json') +exe('diff -u expect/kaishi65_1.json kaishi65_1.json') + +# kinesis exe('keymapviz ./qmk_firmware/keyboards/kinesis/keymaps/default/keymap.c -o kinesis.c') +exe('keymapviz ./qmk_firmware/keyboards/kinesis/keymaps/default/keymap.c -o kinesis_fancy.c -t fancy') exe('keymapviz ./qmk_firmware/keyboards/kinesis/keymaps/default/keymap.c -o kinesis_{}.json -t json') -exe('keymapviz ./qmk_firmware/keyboards/lets_split/keymaps/default/keymap.c -o lets_split.c') -exe('keymapviz ./qmk_firmware/keyboards/lets_split/keymaps/default/keymap.c -o lets_split_{}.json -t json') -exe('keymapviz ./qmk_firmware/keyboards/mint60/keymaps/default/keymap.c -o mint60.c') -exe('keymapviz ./qmk_firmware/keyboards/mint60/keymaps/default/keymap.c -o mint60_{}.json -t json') + +exe('diff -u expect/kinesis.c kinesis.c') +exe('diff -u expect/kinesis_fancy.c kinesis_fancy.c') +exe('diff -u expect/kinesis_0.json kinesis_0.json') + +# kyria exe('keymapviz ./qmk_firmware/keyboards/splitkb/kyria/keymaps/default/keymap.c -o kyria.c') +exe('keymapviz ./qmk_firmware/keyboards/splitkb/kyria/keymaps/default/keymap.c -o kyria_fancy.c -t fancy') exe('keymapviz ./qmk_firmware/keyboards/splitkb/kyria/keymaps/default/keymap.c -o kyria_{}.json -t json') + +exe('diff -u expect/kyria.c kyria.c') +exe('diff -u expect/kyria_fancy.c kyria_fancy.c') +exe('diff -u expect/kyria_0.json kyria_0.json') +exe('diff -u expect/kyria_1.json kyria_1.json') +exe('diff -u expect/kyria_2.json kyria_2.json') +exe('diff -u expect/kyria_3.json kyria_3.json') +exe('diff -u expect/kyria_4.json kyria_4.json') +exe('diff -u expect/kyria_5.json kyria_5.json') +exe('diff -u expect/kyria_6.json kyria_6.json') + +# lets_split +exe('keymapviz ./qmk_firmware/keyboards/lets_split/keymaps/default/keymap.c -o lets_split.c') +exe('keymapviz ./qmk_firmware/keyboards/lets_split/keymaps/default/keymap.c -o lets_split_fancy.c -t fancy') +exe('keymapviz ./qmk_firmware/keyboards/lets_split/keymaps/default/keymap.c -o lets_split_{}.json -t json') + +exe('diff -u expect/lets_split.c lets_split.c') +exe('diff -u expect/lets_split_fancy.c lets_split_fancy.c') +exe('diff -u expect/lets_split_0.json lets_split_0.json') +exe('diff -u expect/lets_split_1.json lets_split_1.json') +exe('diff -u expect/lets_split_2.json lets_split_2.json') +exe('diff -u expect/lets_split_3.json lets_split_3.json') +exe('diff -u expect/lets_split_4.json lets_split_4.json') +exe('diff -u expect/lets_split_5.json lets_split_5.json') + +# lily58 exe('keymapviz ./qmk_firmware/keyboards/lily58/keymaps/default/keymap.c -o lily58.c') +exe('keymapviz ./qmk_firmware/keyboards/lily58/keymaps/default/keymap.c -o lily58_fancy.c -t fancy') exe('keymapviz ./qmk_firmware/keyboards/lily58/keymaps/default/keymap.c -o lily58_{}.json -t json') + +exe('diff -u expect/lily58.c lily58.c') +exe('diff -u expect/lily58_fancy.c lily58_fancy.c') +exe('diff -u expect/lily58_0.json lily58_0.json') +exe('diff -u expect/lily58_1.json lily58_1.json') +exe('diff -u expect/lily58_2.json lily58_2.json') +exe('diff -u expect/lily58_3.json lily58_3.json') + +# mint60 +exe('keymapviz ./qmk_firmware/keyboards/mint60/keymaps/default/keymap.c -o mint60.c') +exe('keymapviz ./qmk_firmware/keyboards/mint60/keymaps/default/keymap.c -o mint60_fancy.c -t fancy') +exe('keymapviz ./qmk_firmware/keyboards/mint60/keymaps/default/keymap.c -o mint60_{}.json -t json') + +exe('diff -u expect/mint60.c mint60.c') +exe('diff -u expect/mint60_fancy.c mint60_fancy.c') +exe('diff -u expect/mint60_0.json mint60_0.json') +exe('diff -u expect/mint60_1.json mint60_1.json') + +# moonlander +exe('keymapviz ./qmk_firmware/keyboards/moonlander/keymaps/default/keymap.c -o moonlander.c') +exe('keymapviz ./qmk_firmware/keyboards/moonlander/keymaps/default/keymap.c -o moonlander_fancy.c -t fancy') +exe('keymapviz ./qmk_firmware/keyboards/moonlander/keymaps/default/keymap.c -o moonlander_{}.json -t json') + +exe('diff -u expect/moonlander.c moonlander.c') +exe('diff -u expect/moonlander_fancy.c moonlander_fancy.c') +exe('diff -u expect/moonlander_0.json moonlander_0.json') +exe('diff -u expect/moonlander_1.json moonlander_1.json') +exe('diff -u expect/moonlander_2.json moonlander_2.json') + +# sofle +exe('keymapviz ./qmk_firmware/keyboards/sofle/keymaps/default/keymap.c -o sofle.c') +exe('keymapviz ./qmk_firmware/keyboards/sofle/keymaps/default/keymap.c -o sofle_fancy.c -t fancy') +exe('keymapviz ./qmk_firmware/keyboards/sofle/keymaps/default/keymap.c -o sofle_{}.json -t json') + +exe('diff -u expect/sofle.c sofle.c') +exe('diff -u expect/sofle_fancy.c sofle_fancy.c') +exe('diff -u expect/sofle_0.json sofle_0.json') +exe('diff -u expect/sofle_1.json sofle_1.json') +exe('diff -u expect/sofle_2.json sofle_2.json') +exe('diff -u expect/sofle_3.json sofle_3.json') +exe('diff -u expect/sofle_4.json sofle_4.json') + +# sweet16 exe('keymapviz ./qmk_firmware/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c -o sweet16.c') +exe('keymapviz ./qmk_firmware/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c -o sweet16_fancy.c -t fancy') exe('keymapviz ./qmk_firmware/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c -o sweet16_{}.json -t json') -exe('keymapviz -k dactyl_manuform5x6 ./qmk_firmware/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/keymap.c -o dactyl_manuform5x6.c') -exe('keymapviz -k dactyl_manuform5x6 ./qmk_firmware/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/keymap.c -o dactyl_manuform5x6_fancy.c -t fancy') -exe('keymapviz -k dactyl_manuform5x6 ./qmk_firmware/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/keymap.c -o dactyl_manuform5x6_{}.json -t json') +exe('diff -u expect/sweet16.c sweet16.c') +exe('diff -u expect/sweet16_fancy.c sweet16_fancy.c') +exe('diff -u expect/sweet16_0.json sweet16_0.json') + +# replace option exe('keymapviz -r -k lets_split ./input/replace_lets_split_keymap.c >/dev/null 2>&1') -exe('keymapviz -k lets_split ./input/custom_legends_lets_split_keymap.c -c ./input/custom_legends_config.properties -o custom_legends_lets_split.c') +exe('diff -u expect/replace_lets_split_keymap.c input/replace_lets_split_keymap.c') -exe('diff -u expect/crkbd.c crkbd.c') -exe('diff -u expect/crkbd_0.json crkbd_0.json') -exe('diff -u expect/crkbd_1.json crkbd_1.json') -exe('diff -u expect/crkbd_2.json crkbd_2.json') -exe('diff -u expect/crkbd_3.json crkbd_3.json') - -exe('diff -u expect/ergo42.c ergo42.c') -exe('diff -u expect/ergo42_0.json ergo42_0.json') -exe('diff -u expect/ergo42_1.json ergo42_1.json') -exe('diff -u expect/ergo42_2.json ergo42_2.json') - -exe('diff -u expect/ergodash.c ergodash.c') -exe('diff -u expect/ergodash_0.json ergodash_0.json') -exe('diff -u expect/ergodash_1.json ergodash_1.json') -exe('diff -u expect/ergodash_2.json ergodash_2.json') -exe('diff -u expect/ergodash_3.json ergodash_3.json') - -exe('diff -u expect/ergodox.c ergodox.c') -exe('diff -u expect/ergodox_0.json ergodox_0.json') -exe('diff -u expect/ergodox_1.json ergodox_1.json') -exe('diff -u expect/ergodox_2.json ergodox_2.json') - -exe('diff -u expect/fortitude60.c fortitude60.c') -exe('diff -u expect/fortitude60_0.json fortitude60_0.json') -exe('diff -u expect/fortitude60_1.json fortitude60_1.json') -exe('diff -u expect/fortitude60_2.json fortitude60_2.json') -exe('diff -u expect/fortitude60_3.json fortitude60_3.json') -exe('diff -u expect/fortitude60_4.json fortitude60_4.json') -exe('diff -u expect/fortitude60_5.json fortitude60_5.json') - -exe('diff -u expect/helix.c helix.c') -exe('diff -u expect/helix_0.json helix_0.json') -exe('diff -u expect/helix_1.json helix_1.json') -exe('diff -u expect/helix_2.json helix_2.json') -exe('diff -u expect/helix_3.json helix_3.json') -exe('diff -u expect/helix_4.json helix_4.json') -exe('diff -u expect/helix_5.json helix_5.json') -exe('diff -u expect/helix_6.json helix_6.json') -exe('diff -u expect/helix_7.json helix_7.json') -exe('diff -u expect/helix_8.json helix_8.json') -exe('diff -u expect/helix_9.json helix_9.json') -exe('diff -u expect/helix_10.json helix_10.json') -exe('diff -u expect/helix_11.json helix_11.json') - -exe('diff -u expect/kinesis.c kinesis.c') -exe('diff -u expect/kinesis_0.json kinesis_0.json') - -exe('diff -u expect/lets_split.c lets_split.c') -exe('diff -u expect/lets_split_0.json lets_split_0.json') -exe('diff -u expect/lets_split_1.json lets_split_1.json') -exe('diff -u expect/lets_split_2.json lets_split_2.json') -exe('diff -u expect/lets_split_3.json lets_split_3.json') -exe('diff -u expect/lets_split_4.json lets_split_4.json') -exe('diff -u expect/lets_split_5.json lets_split_5.json') - -exe('diff -u expect/mint60.c mint60.c') -exe('diff -u expect/mint60_0.json mint60_0.json') -exe('diff -u expect/mint60_1.json mint60_1.json') - -exe('diff -u expect/kyria.c kyria.c') -exe('diff -u expect/kyria_0.json kyria_0.json') -exe('diff -u expect/kyria_1.json kyria_1.json') -exe('diff -u expect/kyria_2.json kyria_2.json') -exe('diff -u expect/kyria_3.json kyria_3.json') -exe('diff -u expect/kyria_4.json kyria_4.json') -exe('diff -u expect/kyria_5.json kyria_5.json') -exe('diff -u expect/kyria_6.json kyria_6.json') - -exe('diff -u expect/lily58.c lily58.c') -exe('diff -u expect/lily58_0.json lily58_0.json') -exe('diff -u expect/lily58_1.json lily58_1.json') -exe('diff -u expect/lily58_2.json lily58_2.json') -exe('diff -u expect/lily58_3.json lily58_3.json') - -exe('diff -u expect/sweet16.c sweet16.c') -exe('diff -u expect/sweet16_0.json sweet16_0.json') +exe('keymapviz -r -k lets_split -t fancy ./input/replace_lets_split_keymap_fancy.c >/dev/null 2>&1') +exe('diff -u expect/replace_lets_split_keymap_fancy.c input/replace_lets_split_keymap_fancy.c') -exe('diff -u expect/dactyl_manuform5x6.c dactyl_manuform5x6.c') -exe('diff -u expect/dactyl_manuform5x6_fancy.c dactyl_manuform5x6_fancy.c') -exe('diff -u expect/dactyl_manuform5x6_0.json dactyl_manuform5x6_0.json') - -exe('diff -u expect/replace_lets_split_keymap.c input/replace_lets_split_keymap.c') +# custom config +exe('keymapviz -k lets_split ./input/custom_legends_lets_split_keymap.c -c ./input/custom_legends_config.properties -o custom_legends_lets_split.c') exe('diff -u expect/custom_legends_lets_split.c custom_legends_lets_split.c') +if status: + print('\nAll test were passed successfully!') sys.exit(0 if status else 1) From ba1a0ce528a40677b8df650cdae4de7307cbe7ac Mon Sep 17 00:00:00 2001 From: yskoht Date: Thu, 30 Dec 2021 16:58:33 +0900 Subject: [PATCH 10/34] Update version --- keymapviz/keymapviz.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keymapviz/keymapviz.py b/keymapviz/keymapviz.py index b3eae7b..d63a947 100755 --- a/keymapviz/keymapviz.py +++ b/keymapviz/keymapviz.py @@ -9,7 +9,7 @@ from keymapviz.legends import * -VERSION = 'v1.9.1' +VERSION = 'v1.10.0' TYPES = { 'ascii': 'ascii_art', diff --git a/setup.py b/setup.py index caaf69a..eb2ea08 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ def search_json_files(): setup( name='keymapviz', - version='1.9.1', + version='1.10.0', description='keymap.c visualizer', long_description=long_description, long_description_content_type='text/markdown', From 06e92dd89ec3531da8183227dea9ada079a5bd1b Mon Sep 17 00:00:00 2001 From: Yusuke Ohta <34795067+yskoht@users.noreply.github.com> Date: Thu, 30 Dec 2021 17:19:14 +0900 Subject: [PATCH 11/34] Fix documents (#73) --- CONTRIBUTING.md | 30 +++++++++++++++--------------- README.md | 18 +++++++++++++----- 2 files changed, 28 insertions(+), 20 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 522582f..cd92c56 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,3 @@ - # Contributing Your any contributions are welcome! Adding keyboard, fixing bug, updating document, adding test and creating new feature, etc. @@ -6,10 +5,10 @@ Your any contributions are welcome! Adding keyboard, fixing bug, updating docume - 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.json - - Fixing keymapviz/\_\_init__.py - - Fixing keymapviz/README.md + - 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 @@ -37,33 +36,34 @@ $ git branch ## If you want to add a new keyboard -You need to add two new files. (Replace *keyboard_name* with the name of the keyboard you want to add.) +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.json +- keymapviz/keyboards/_keyboard_name_/\_\_init\_\_.py +- keymapviz/keyboards/_keyboard_name_/layout_editor/default.json And fix two files. -- keymapviz/\_\_init__.py +- keymapviz/\_\_init\_\_.py - keymapviz/README.md -### Adding keymapviz/keyboards/*keyboard_name*/\_\_init__.py +### Adding keymapviz/keyboards/_keyboard_name_/\_\_init\_\_.py 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 in `keymap.c` of qmk. - `layout_editor_json`: The path to `layout_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. - - [keymapviz/keyboards/lets_split/\_\_init__.py](#keymapviz/keyboards/lets_split/__init__.py) - - [keymapviz/keyboards/ergodox/\_\_init__.py](#keymapviz/keyboards/ergodox/__init__.py) + - [keymapviz/keyboards/lets_split/\_\_init\_\_.py](https://github.com/yskoht/keymapviz/blob/develop/keymapviz/keyboards/lets_split/__init__.py) + - [keymapviz/keyboards/ergodox/\_\_init\_\_.py](https://github.com/yskoht/keymapviz/blob/develop/keymapviz/keyboards/ergodox/__init__.py) -### Adding keymapviz/keyboards/*keyboard_name*/layout_editor.json +### Adding keymapviz/keyboards/_keyboard_name_/layout_editor/default.json Download json of your keyboard from [http://www.keyboard-layout-editor.com/](http://www.keyboard-layout-editor.com/) and replace legend with `{number}`. Please refer to the file. -- [keymapviz/keyboards/lets_split/layout_editor.json](#keymapviz/keyboards/lets_split/layout_editor.json) +- [keymapviz/keyboards/lets_split/layout_editor/default.json](https://github.com/yskoht/keymapviz/blob/develop/keymapviz/keyboards/lets_split/layout_editor/default.json) -### Fixing keymapviz/\_\_init__.py +### Fixing keymapviz/\_\_init\_\_.py Add keyboard. diff --git a/README.md b/README.md index 9d9a7e8..0a9e2e8 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ $ pip3 install keymapviz ## Usage -Output ascii art. +### Output ascii art ```sh $ keymapviz qmk_firmware/keyboards/ergodox_ez/keymaps/default/keymap.c @@ -109,7 +109,8 @@ $ keymapviz qmk_firmware/keyboards/ergodox_ez/keymaps/default/keymap.c */ ``` -Legend replacements. +### Legend replacements + A config file containing legend replacements can be provided to change the legends to your liking. It should have a section named 'legends' and e.g. look like: ``` @@ -135,11 +136,12 @@ $ ls lets_split*.json lets_split0.json lets_split1.json lets_split2.json lets_split3.json lets_split4.json lets_split5.json ``` -Output fancy ascii art. +### Output fancy ascii art + Uses unicode symbols for drawing the box outlines. ```sh -$ keymapviz -t fancy ~/qmk_firmware/keyboards/kbdclack/kaishi65/keymaps/default/keymap.c +$ keymapviz -t fancy qmk_firmware/keyboards/kbdclack/kaishi65/keymaps/default/keymap.c /*┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬────┐ *│ES │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ MI│ EQ│ BS │ GR │ @@ -170,12 +172,18 @@ $ keymapviz -t fancy ~/qmk_firmware/keyboards/kbdclack/kaishi65/keymaps/default */ ``` -Replace ascii-art in keymap.c. (Generate backup as keymap.c.bac) +### Replace ascii-art in keymap.c + +Generate backup as keymap.c.bac ```sh $ keymapviz -r keymap.c ``` +## Contributing + +Please see [CONTRIBUTING.md](./CONTRIBUTING.md). + ## License This software is released under the MIT License, see LICENSE. From bd164668569a28ba9b1f8b07fd5821d355c5185c Mon Sep 17 00:00:00 2001 From: yskoht Date: Thu, 30 Dec 2021 17:20:34 +0900 Subject: [PATCH 12/34] Update version --- keymapviz/keymapviz.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keymapviz/keymapviz.py b/keymapviz/keymapviz.py index d63a947..28518b5 100755 --- a/keymapviz/keymapviz.py +++ b/keymapviz/keymapviz.py @@ -9,7 +9,7 @@ from keymapviz.legends import * -VERSION = 'v1.10.0' +VERSION = 'v1.10.1' TYPES = { 'ascii': 'ascii_art', diff --git a/setup.py b/setup.py index eb2ea08..9f3dc4b 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ def search_json_files(): setup( name='keymapviz', - version='1.10.0', + version='1.10.1', description='keymap.c visualizer', long_description=long_description, long_description_content_type='text/markdown', From b9556e40a23a61968f11cf21563f9e76bf592cca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20GERMAIN?= Date: Sun, 27 Feb 2022 10:29:16 +0100 Subject: [PATCH 13/34] Add support for dactyl manuform 6x6 (#79) --- README.md | 1 + keymapviz/__init__.py | 2 + .../keyboards/dactyl_manuform6x6/__init__.py | 57 ++++ .../layout_editor/default.json | 248 ++++++++++++++++++ 4 files changed, 308 insertions(+) create mode 100644 keymapviz/keyboards/dactyl_manuform6x6/__init__.py create mode 100644 keymapviz/keyboards/dactyl_manuform6x6/layout_editor/default.json diff --git a/README.md b/README.md index 0a9e2e8..4f8d9c5 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ Following keyboards are supported. - [dactyl_manuform5x6](https://github.com/qmk/qmk_firmware/tree/master/keyboards/handwired/dactyl_manuform/5x6) - [sofle](https://github.com/qmk/qmk_firmware/tree/master/keyboards/sofle) - [moonlander](https://github.com/qmk/qmk_firmware/tree/master/keyboards/moonlander) +- [dactyl_manuform6x6](https://github.com/qmk/qmk_firmware/tree/master/keyboards/handwired/dactyl_manuform/6x6) ## Install diff --git a/keymapviz/__init__.py b/keymapviz/__init__.py index b6d6c5a..cc9d92d 100644 --- a/keymapviz/__init__.py +++ b/keymapviz/__init__.py @@ -23,6 +23,7 @@ import keymapviz.keyboards.dactyl_manuform5x6 import keymapviz.keyboards.sofle import keymapviz.keyboards.moonlander +import keymapviz.keyboards.dactyl_manuform6x6 KEYBOARDS = { @@ -44,6 +45,7 @@ 'dactyl_manuform5x6': keymapviz.keyboards.dactyl_manuform5x6, 'sofle': keymapviz.keyboards.sofle, 'moonlander': keymapviz.keyboards.moonlander, + 'dactyl_manuform6x6': keymapviz.keyboards.dactyl_manuform6x6, } diff --git a/keymapviz/keyboards/dactyl_manuform6x6/__init__.py b/keymapviz/keyboards/dactyl_manuform6x6/__init__.py new file mode 100644 index 0000000..dc31451 --- /dev/null +++ b/keymapviz/keyboards/dactyl_manuform6x6/__init__.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- + +keymap_keyword = '(?:KEYMAP|LAYOUT_6x6)' +layout_editor_json = { + 'default': 'keyboards/dactyl_manuform6x6/layout_editor/default.json', +} + +ascii_art = { + 'default': ''' +/* ,-------------------------------. ,-------------------------------. + * ,---------------|{ 2 }|{ 3 }|{ 4 }|{ 5 }| |{ 6 }|{ 7 }|{ 8 }|{ 9 }|--------------. + * |{ 0 }|{ 1 }|-------+-------+-------+-------| |-------+-------+-------+-------|{ 10 }|{ 11 }| + * |-------+-------|{ 14 }|{ 15 }|{ 16 }|{ 17 }| |{ 18 }|{ 19 }|{ 20 }|{ 21 }|-------+------| + * |{ 12 }|{ 13 }|-------+-------+-------+-------| |-------+-------+-------+-------|{ 22 }|{ 23 }| + * |-------+-------|{ 26 }|{ 27 }|{ 28 }|{ 29 }| |{ 30 }|{ 31 }|{ 32 }|{ 33 }|-------+------| + * |{ 24 }|{ 25 }|-------+-------+-------+-------| |-------+-------+-------+-------|{ 34 }|{ 35 }| + * |-------+-------|{ 38 }|{ 39 }|{ 40 }|{ 41 }| |{ 42 }|{ 43 }|{ 44 }|{ 45 }|-------+------| + * |{ 36 }|{ 37 }|-------+-------+---------------| |---------------+-------+-------|{ 46 }|{ 47 }| + * |-------+-------|{ 50 }|{ 51 }|{ 52 }|{ 53 }| |{ 54 }|{ 55 }|{ 56 }|{ 57 }|-------+------| + * |{ 48 }|{ 49 }|-------+-------+---------------' `---------------+-------+-------|{ 58 }|{ 59 }| + * `---------------|{ 60 }|{ 61 }| |{ 62 }|{ 63 }|--------------' + * `---------------' ,-------. ,-------. `---------------' + * |{ 64 }|-------. ,-------|{ 67 }| + * `-------+{ 65 }| |{ 66 }+-------' + * `-------' `-------' + * ,----------------. ,----------------. + * |{ 68 }|{ 69 }| |{ 70 }|{ 71 }| + * |-------+--------/ \--------+-------| + * |{ 72 }|{ 73 }| |{ 74 }|{ 75 }| + * `---------------' `---------------' generated by [keymapviz] */ +''', +} + +fancy_ascii_art = { + 'default': ''' +/* ┌───────┬───────┬───────┬───────┐ ┌───────┬───────┬───────┬───────┐ + * ┌───────┬───────┤{ 2 }│{ 3 }│{ 4 }│{ 5 }│ │{ 6 }│{ 7 }│{ 8 }│{ 9 }├───────┬──────┐ + * │{ 0 }│{ 1 }├───────┼───────┼───────┼───────┤ ├───────┼───────┼───────┼───────┤{ 10 }│{ 11 }│ + * ├───────┼───────┤{ 14 }│{ 15 }│{ 16 }│{ 17 }│ │{ 18 }│{ 19 }│{ 20 }│{ 21 }├───────┼──────┤ + * │{ 12 }│{ 13 }├───────┼───────┼───────┼───────┤ ├───────┼───────┼───────┼───────┤{ 22 }│{ 23 }│ + * ├───────┼───────┤{ 26 }│{ 27 }│{ 28 }│{ 29 }│ │{ 30 }│{ 31 }│{ 32 }│{ 33 }├───────┼──────┤ + * │{ 24 }│{ 25 }├───────┼───────┼───────┼───────┤ ├───────┼───────┼───────┼───────┤{ 34 }│{ 35 }│ + * ├───────┼───────┤{ 38 }│{ 39 }│{ 40 }│{ 41 }│ │{ 42 }│{ 43 }│{ 44 }│{ 45 }├───────┼──────┤ + * │{ 36 }│{ 37 }├───────┼───────┼───────┴───────┘ └───────┴───────┼───────┼───────┤{ 46 }│{ 47 }│ + * ├───────┼───────┤{ 50 }│{ 51 }│{ 52 }│{ 53 }│ │{ 54 }│{ 55 }│{ 56 }│{ 57 }├───────┼──────┤ + * │{ 48 }│{ 49 }├───────┼───────┼───────┴───────┘ └───────┴───────┼───────┼───────┤{ 58 }│{ 59 }│ + * └───────┴───────┤{ 60 }│{ 61 }│ │{ 62 }│{ 63 }├───────┴──────┘ + * └───────┴───────┘ └───────┴───────┘ + * ┏━━━━━━━┳━━━━━━━┓ ┏━━━━━━━┳━━━━━━━┓ + * ┃{ 64 }┃{ 65 }┃ ┃{ 66 }┃{ 67 }┃ + * ┡━━━━━━━╋━━━━━━━┫ ┣━━━━━━━╋━━━━━━━┩ + * │{ 68 }┃{ 69 }┃ ┃{ 70 }┃{ 71 }│ + * ├───────╄━━━━━━━┩ ┡━━━━━━━╃───────┤ + * │{ 72 }│{ 73 }│ │{ 74 }│{ 75 }│ + * └───────┴───────┘ └───────┴───────┘ generated by [keymapviz] */ +''', +} diff --git a/keymapviz/keyboards/dactyl_manuform6x6/layout_editor/default.json b/keymapviz/keyboards/dactyl_manuform6x6/layout_editor/default.json new file mode 100644 index 0000000..9e5a11a --- /dev/null +++ b/keymapviz/keyboards/dactyl_manuform6x6/layout_editor/default.json @@ -0,0 +1,248 @@ +[ + [ + { + "y": 0.15, + "x": 2, + "a": 7 + }, + "{2}", + "{3}", + "{4}", + "{5}", + { + "x": 5.5 + }, + "{6}", + "{7}", + "{8}", + "{9}" + ], + [ + { + "y": -0.5 + }, + "{0}", + "{1}", + { + "x": 13.5 + }, + "{10}", + "{11}" + ], + [ + { + "y": -0.5, + "x": 2 + }, + "{14}", + "{15}", + "{16}", + "{17}", + { + "x": 5.5 + }, + "{18}", + "{19}", + "{20}", + "{21}" + ], + [ + { + "y": -0.5 + }, + "{12}", + "{13}", + { + "x": 13.5 + }, + "{22}", + "{23}" + ], + [ + { + "y": -0.5, + "x": 2 + }, + "{26}", + "{27}", + "{28}", + "{29}", + { + "x": 5.5 + }, + "{30}", + "{31}", + "{32}", + "{33}" + ], + [ + { + "y": -0.5 + }, + "{24}", + "{25}", + { + "x": 13.5 + }, + "{34}", + "{35}" + ], + [ + { + "y": -0.5, + "x": 2 + }, + "{38}", + "{39}", + "{40}", + "{41}", + { + "x": 5.5 + }, + "{42}", + "{43}", + "{44}", + "{45}" + ], + [ + { + "y": -0.5 + }, + "{36}", + "{37}", + { + "x": 13.5 + }, + "{46}", + "{47}" + ], + [ + { + "y": -0.5, + "x": 2 + }, + "{50}", + "{51}", + "{52}", + "{53}", + { + "x": 5.5 + }, + "{54}", + "{55}", + "{56}", + "{57}" + ], + [ + { + "y":-0.5 + }, + "{48}", + "{49}", + { + "x":13.5 + }, + "{58}", + "{59}" + ], + [ + { + "y": -0.5, + "x": 2 + }, + "{60}", + "{61}", + { + "x": 9.5 + }, + "{62}", + "{63}" + ], + [ + { + "r": 30, + "rx": 5.5, + "ry": 4.25, + "y": 0.5, + "x": 1.25, + "h": 1.5 + }, + "{65}" + ], + [ + { + "y": -0.5, + "x": 0.25, + "h": 1.5 + }, + "{64}" + ], + [ + { + "r": 65, + "rx": 13.25, + "y": 6.3, + "x": -0.35 + }, + "{69}" + ], + [ + { + "r": 75, + "rx": 5.5, + "y": -1.25, + "x": 4 + }, + "{73}" + ], + [ + { + "x": 3 + }, + "{68}", + "{72}" + ], + [ + { + "r": -75, + "rx": 12, + "y": -1.25, + "x": -5 + }, + "{74}" + ], + [ + { + "x": -5 + }, + "{75}", + "{71}" + ], + [ + { + "r": -65, + "rx": 13.25, + "y": -1.9, + "x": -4.5 + }, + "{70}" + ], + [ + { + "r": -30, + "rx": 12, + "y": 0.75, + "x": -2, + "h": 1.5 + }, + "{66}" + ], + [ + { + "y": -0.5, + "x": -1, + "h": 1.5 + }, + "{67}" + ] +] From 920656ca891dc398562736d18fc84e59cbca0666 Mon Sep 17 00:00:00 2001 From: yskoht Date: Sun, 27 Feb 2022 18:53:30 +0900 Subject: [PATCH 14/34] Update version --- keymapviz/keymapviz.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keymapviz/keymapviz.py b/keymapviz/keymapviz.py index 28518b5..8932dcd 100755 --- a/keymapviz/keymapviz.py +++ b/keymapviz/keymapviz.py @@ -9,7 +9,7 @@ from keymapviz.legends import * -VERSION = 'v1.10.1' +VERSION = 'v1.11.0' TYPES = { 'ascii': 'ascii_art', diff --git a/setup.py b/setup.py index 9f3dc4b..d717d84 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ def search_json_files(): setup( name='keymapviz', - version='1.10.1', + version='1.11.0', description='keymap.c visualizer', long_description=long_description, long_description_content_type='text/markdown', From c233eb58e15f1b409b4dacf3ec905aad0b239d6d Mon Sep 17 00:00:00 2001 From: yskoht Date: Sun, 27 Feb 2022 19:37:16 +0900 Subject: [PATCH 15/34] Fix tests ref: - https://github.com/qmk/qmk_firmware/pull/16080 - https://github.com/qmk/qmk_firmware/pull/16116 --- test/test.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test/test.py b/test/test.py index 57e01ab..4e76672 100644 --- a/test/test.py +++ b/test/test.py @@ -33,9 +33,9 @@ def exe(cmd): exe('diff -u expect/dactyl_manuform5x6_0.json dactyl_manuform5x6_0.json') # ergo42 -exe('keymapviz ./qmk_firmware/keyboards/ergo42/keymaps/default/keymap.c -o ergo42.c') -exe('keymapviz ./qmk_firmware/keyboards/ergo42/keymaps/default/keymap.c -o ergo42_fancy.c -t fancy') -exe('keymapviz ./qmk_firmware/keyboards/ergo42/keymaps/default/keymap.c -o ergo42_{}.json -t json') +exe('keymapviz ./qmk_firmware/keyboards/biacco42/ergo42/keymaps/default/keymap.c -o ergo42.c') +exe('keymapviz ./qmk_firmware/keyboards/biacco42/ergo42/keymaps/default/keymap.c -o ergo42_fancy.c -t fancy') +exe('keymapviz ./qmk_firmware/keyboards/biacco42/ergo42/keymaps/default/keymap.c -o ergo42_{}.json -t json') exe('diff -u expect/ergo42.c ergo42.c') exe('diff -u expect/ergo42_fancy.c ergo42_fancy.c') @@ -44,9 +44,9 @@ def exe(cmd): exe('diff -u expect/ergo42_2.json ergo42_2.json') # ergodash -exe('keymapviz ./qmk_firmware/keyboards/ergodash/rev1/keymaps/default/keymap.c -o ergodash.c') -exe('keymapviz ./qmk_firmware/keyboards/ergodash/rev1/keymaps/default/keymap.c -o ergodash_fancy.c -t fancy') -exe('keymapviz ./qmk_firmware/keyboards/ergodash/rev1/keymaps/default/keymap.c -o ergodash_{}.json -t json') +exe('keymapviz ./qmk_firmware/keyboards/omkbd/ergodash/rev1/keymaps/default/keymap.c -o ergodash.c') +exe('keymapviz ./qmk_firmware/keyboards/omkbd/ergodash/rev1/keymaps/default/keymap.c -o ergodash_fancy.c -t fancy') +exe('keymapviz ./qmk_firmware/keyboards/omkbd/ergodash/rev1/keymaps/default/keymap.c -o ergodash_{}.json -t json') exe('diff -u expect/ergodash.c ergodash.c') exe('diff -u expect/ergodash_fancy.c ergodash_fancy.c') @@ -56,9 +56,9 @@ def exe(cmd): exe('diff -u expect/ergodash_3.json ergodash_3.json') # ergodash (2u_inner) -exe('keymapviz ./qmk_firmware/keyboards/ergodash/rev1/keymaps/default/keymap.c -l 2u_inner -o ergodash_L2u_inner.c') -exe('keymapviz ./qmk_firmware/keyboards/ergodash/rev1/keymaps/default/keymap.c -l 2u_inner -o ergodash_L2u_inner_fancy.c -t fancy ') -exe('keymapviz ./qmk_firmware/keyboards/ergodash/rev1/keymaps/default/keymap.c -l 2u_inner -o ergodash_L2u_inner_{}.json -t json') +exe('keymapviz ./qmk_firmware/keyboards/omkbd/ergodash/rev1/keymaps/default/keymap.c -l 2u_inner -o ergodash_L2u_inner.c') +exe('keymapviz ./qmk_firmware/keyboards/omkbd/ergodash/rev1/keymaps/default/keymap.c -l 2u_inner -o ergodash_L2u_inner_fancy.c -t fancy ') +exe('keymapviz ./qmk_firmware/keyboards/omkbd/ergodash/rev1/keymaps/default/keymap.c -l 2u_inner -o ergodash_L2u_inner_{}.json -t json') exe('diff -u expect/ergodash_L2u_inner.c ergodash_L2u_inner.c') exe('diff -u expect/ergodash_L2u_inner_fancy.c ergodash_L2u_inner_fancy.c') From d45aacf072d8c04e66a13894c13c084f9b75c116 Mon Sep 17 00:00:00 2001 From: Robert Enzmann <32076780+renzmann@users.noreply.github.com> Date: Mon, 28 Feb 2022 12:06:25 -0500 Subject: [PATCH 16/34] Add mit and grid planck layouts (#78) --- README.md | 1 + keymapviz/__init__.py | 2 + keymapviz/keyboards/planck/__init__.py | 47 ++++++++ .../planck/layout_editor/default.json | 62 +++++++++++ .../keyboards/planck/layout_editor/grid.json | 62 +++++++++++ .../keyboards/planck/layout_editor/mit.json | 64 +++++++++++ test/expect/planck_default.c | 70 ++++++++++++ test/expect/planck_default_0.json | 62 +++++++++++ test/expect/planck_default_1.json | 62 +++++++++++ test/expect/planck_default_2.json | 62 +++++++++++ test/expect/planck_default_3.json | 62 +++++++++++ test/expect/planck_default_4.json | 62 +++++++++++ test/expect/planck_default_5.json | 62 +++++++++++ test/expect/planck_default_6.json | 62 +++++++++++ test/expect/planck_default_fancy.c | 70 ++++++++++++ test/expect/planck_grid.c | 70 ++++++++++++ test/expect/planck_grid_0.json | 62 +++++++++++ test/expect/planck_grid_1.json | 62 +++++++++++ test/expect/planck_grid_2.json | 62 +++++++++++ test/expect/planck_grid_3.json | 62 +++++++++++ test/expect/planck_grid_4.json | 62 +++++++++++ test/expect/planck_grid_5.json | 62 +++++++++++ test/expect/planck_grid_6.json | 62 +++++++++++ test/expect/planck_grid_fancy.c | 70 ++++++++++++ test/expect/planck_mit.c | 100 ++++++++++++++++++ test/expect/planck_mit_0.json | 64 +++++++++++ test/expect/planck_mit_1.json | 64 +++++++++++ test/expect/planck_mit_2.json | 64 +++++++++++ test/expect/planck_mit_3.json | 64 +++++++++++ test/expect/planck_mit_4.json | 64 +++++++++++ test/expect/planck_mit_5.json | 64 +++++++++++ test/expect/planck_mit_6.json | 64 +++++++++++ test/expect/planck_mit_7.json | 64 +++++++++++ test/expect/planck_mit_8.json | 64 +++++++++++ test/expect/planck_mit_9.json | 64 +++++++++++ test/expect/planck_mit_fancy.c | 100 ++++++++++++++++++ test/test.py | 42 ++++++++ 37 files changed, 2268 insertions(+) create mode 100644 keymapviz/keyboards/planck/__init__.py create mode 100644 keymapviz/keyboards/planck/layout_editor/default.json create mode 100644 keymapviz/keyboards/planck/layout_editor/grid.json create mode 100644 keymapviz/keyboards/planck/layout_editor/mit.json create mode 100644 test/expect/planck_default.c create mode 100644 test/expect/planck_default_0.json create mode 100644 test/expect/planck_default_1.json create mode 100644 test/expect/planck_default_2.json create mode 100644 test/expect/planck_default_3.json create mode 100644 test/expect/planck_default_4.json create mode 100644 test/expect/planck_default_5.json create mode 100644 test/expect/planck_default_6.json create mode 100644 test/expect/planck_default_fancy.c create mode 100644 test/expect/planck_grid.c create mode 100644 test/expect/planck_grid_0.json create mode 100644 test/expect/planck_grid_1.json create mode 100644 test/expect/planck_grid_2.json create mode 100644 test/expect/planck_grid_3.json create mode 100644 test/expect/planck_grid_4.json create mode 100644 test/expect/planck_grid_5.json create mode 100644 test/expect/planck_grid_6.json create mode 100644 test/expect/planck_grid_fancy.c create mode 100644 test/expect/planck_mit.c create mode 100644 test/expect/planck_mit_0.json create mode 100644 test/expect/planck_mit_1.json create mode 100644 test/expect/planck_mit_2.json create mode 100644 test/expect/planck_mit_3.json create mode 100644 test/expect/planck_mit_4.json create mode 100644 test/expect/planck_mit_5.json create mode 100644 test/expect/planck_mit_6.json create mode 100644 test/expect/planck_mit_7.json create mode 100644 test/expect/planck_mit_8.json create mode 100644 test/expect/planck_mit_9.json create mode 100644 test/expect/planck_mit_fancy.c diff --git a/README.md b/README.md index 4f8d9c5..6c1978c 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ Following keyboards are supported. - [dactyl_manuform5x6](https://github.com/qmk/qmk_firmware/tree/master/keyboards/handwired/dactyl_manuform/5x6) - [sofle](https://github.com/qmk/qmk_firmware/tree/master/keyboards/sofle) - [moonlander](https://github.com/qmk/qmk_firmware/tree/master/keyboards/moonlander) +- [planck](https://github.com/qmk/qmk_firmware/tree/master/keyboards/planck) (layout: `grid`, `mit`) - [dactyl_manuform6x6](https://github.com/qmk/qmk_firmware/tree/master/keyboards/handwired/dactyl_manuform/6x6) ## Install diff --git a/keymapviz/__init__.py b/keymapviz/__init__.py index cc9d92d..753b619 100644 --- a/keymapviz/__init__.py +++ b/keymapviz/__init__.py @@ -23,6 +23,7 @@ import keymapviz.keyboards.dactyl_manuform5x6 import keymapviz.keyboards.sofle import keymapviz.keyboards.moonlander +import keymapviz.keyboards.planck import keymapviz.keyboards.dactyl_manuform6x6 @@ -45,6 +46,7 @@ 'dactyl_manuform5x6': keymapviz.keyboards.dactyl_manuform5x6, 'sofle': keymapviz.keyboards.sofle, 'moonlander': keymapviz.keyboards.moonlander, + 'planck': keymapviz.keyboards.planck, 'dactyl_manuform6x6': keymapviz.keyboards.dactyl_manuform6x6, } diff --git a/keymapviz/keyboards/planck/__init__.py b/keymapviz/keyboards/planck/__init__.py new file mode 100644 index 0000000..c8b4099 --- /dev/null +++ b/keymapviz/keyboards/planck/__init__.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- + +keymap_keyword = '(?:LAYOUT_planck_grid|LAYOUT_planck_mit|LAYOUT_ortho_4x12|LAYOUT_planck_1x2uC)' +layout_editor_json = { + 'default': 'keyboards/planck/layout_editor/grid.json', + 'grid': 'keyboards/planck/layout_editor/grid.json', + 'mit': 'keyboards/planck/layout_editor/mit.json' +} + +ascii_art = { + 'default': ''' +/* ,-----------------------------------------------------------------------------------. + * |{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }| + * `-----------------------------------------------------------------------------------' + * generated by [keymapviz] */ +''', + 'grid': ''' +/* ,-----------------------------------------------------------------------------------. + * |{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }| + * `-----------------------------------------------------------------------------------' + * generated by [keymapviz] */ +''', + 'mit': ''' +/* ,-----------------------------------------------------------------------------------. + * |{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |{ }|{ }|{ }|{ }|{ }| { } |{ }|{ }|{ }|{ }|{ }| + * `-----------------------------------------------------------------------------------' + * generated by [keymapviz] */ +''', +} diff --git a/keymapviz/keyboards/planck/layout_editor/default.json b/keymapviz/keyboards/planck/layout_editor/default.json new file mode 100644 index 0000000..b3da13d --- /dev/null +++ b/keymapviz/keyboards/planck/layout_editor/default.json @@ -0,0 +1,62 @@ +[ + [ + { + "a": 7 + }, + "{0}", + "{1}", + "{2}", + "{3}", + "{4}", + "{5}", + "{6}", + "{7}", + "{8}", + "{9}", + "{10}", + "{11}", + "{12}" + ], + [ + "{13}", + "{14}", + "{15}", + "{16}", + "{17}", + "{18}", + "{19}", + "{20}", + "{21}", + "{22}", + "{23}", + "{24}" + ], + [ + "{25}", + "{26}", + "{27}", + "{28}", + "{29}", + "{30}", + "{31}", + "{32}", + "{33}", + "{34}", + "{35}", + "{36}" + ], + [ + "{37}", + "{38}", + "{39}", + "{40}", + "{41}", + "{42}", + "{43}", + "{44}", + "{45}", + "{46}", + "{47}", + "{48}" + ] +] diff --git a/keymapviz/keyboards/planck/layout_editor/grid.json b/keymapviz/keyboards/planck/layout_editor/grid.json new file mode 100644 index 0000000..b3da13d --- /dev/null +++ b/keymapviz/keyboards/planck/layout_editor/grid.json @@ -0,0 +1,62 @@ +[ + [ + { + "a": 7 + }, + "{0}", + "{1}", + "{2}", + "{3}", + "{4}", + "{5}", + "{6}", + "{7}", + "{8}", + "{9}", + "{10}", + "{11}", + "{12}" + ], + [ + "{13}", + "{14}", + "{15}", + "{16}", + "{17}", + "{18}", + "{19}", + "{20}", + "{21}", + "{22}", + "{23}", + "{24}" + ], + [ + "{25}", + "{26}", + "{27}", + "{28}", + "{29}", + "{30}", + "{31}", + "{32}", + "{33}", + "{34}", + "{35}", + "{36}" + ], + [ + "{37}", + "{38}", + "{39}", + "{40}", + "{41}", + "{42}", + "{43}", + "{44}", + "{45}", + "{46}", + "{47}", + "{48}" + ] +] diff --git a/keymapviz/keyboards/planck/layout_editor/mit.json b/keymapviz/keyboards/planck/layout_editor/mit.json new file mode 100644 index 0000000..e45084c --- /dev/null +++ b/keymapviz/keyboards/planck/layout_editor/mit.json @@ -0,0 +1,64 @@ +[ + [ + { + "a": 7 + }, + "{0}", + "{1}", + "{2}", + "{3}", + "{4}", + "{5}", + "{6}", + "{7}", + "{8}", + "{9}", + "{10}", + "{11}", + "{12}" + ], + [ + "{13}", + "{14}", + "{15}", + "{16}", + "{17}", + "{18}", + "{19}", + "{20}", + "{21}", + "{22}", + "{23}", + "{24}" + ], + [ + "{25}", + "{26}", + "{27}", + "{28}", + "{29}", + "{30}", + "{31}", + "{32}", + "{33}", + "{34}", + "{35}", + "{36}" + ], + [ + "{37}", + "{38}", + "{39}", + "{40}", + "{41}", + { + "w": 2 + }, + "{42}", + "{43}", + "{44}", + "{45}", + "{46}", + "{47}" + ] +] diff --git a/test/expect/planck_default.c b/test/expect/planck_default.c new file mode 100644 index 0000000..a2ae7f2 --- /dev/null +++ b/test/expect/planck_default.c @@ -0,0 +1,70 @@ +/* ,-----------------------------------------------------------------------------------. + * | TAB | Q | W | E | R | T | Y | U | I | O | P | BSPC | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ESC | A | S | D | F | G | H | J | K | L | SCLN | QUOT | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | LSFT | Z | X | C | V | B | N | M | COMM | DOT | SLSH | ENT | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |BACKLI| LCTL | LALT | LGUI |LOWER | SPC | SPC |RAISE | LEFT | DOWN | UP | RGHT | + * `-----------------------------------------------------------------------------------' + * generated by [keymapviz] */ +/* ,-----------------------------------------------------------------------------------. + * | TAB | Q | W | F | P | G | J | L | U | Y | SCLN | BSPC | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ESC | A | R | S | T | D | H | N | E | I | O | QUOT | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | LSFT | Z | X | C | V | B | K | M | COMM | DOT | SLSH | ENT | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |BACKLI| LCTL | LALT | LGUI |LOWER | SPC | SPC |RAISE | LEFT | DOWN | UP | RGHT | + * `-----------------------------------------------------------------------------------' + * generated by [keymapviz] */ +/* ,-----------------------------------------------------------------------------------. + * | TAB | QUOT | COMM | DOT | P | Y | F | G | C | R | L | BSPC | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ESC | A | O | E | U | I | D | H | T | N | S | SLSH | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | LSFT | SCLN | Q | J | K | X | B | M | W | V | Z | ENT | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |BACKLI| LCTL | LALT | LGUI |LOWER | SPC | SPC |RAISE | LEFT | DOWN | UP | RGHT | + * `-----------------------------------------------------------------------------------' + * generated by [keymapviz] */ +/* ,-----------------------------------------------------------------------------------. + * | TILD | EXLM | AT | HASH | DLR | PERC | CIRC | AMPR | ASTR | LPRN | RPRN | BSPC | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | DEL | F1 | F2 | F3 | F4 | F5 | F6 | UNDS | PLUS | LCBR | RCBR | PIPE | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |S(KC_N|S(KC_N| HOME | END | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | MNXT | VOLD | VOLU | MPLY | + * `-----------------------------------------------------------------------------------' + * generated by [keymapviz] */ +/* ,-----------------------------------------------------------------------------------. + * | GRV | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BSPC | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | DEL | F1 | F2 | F3 | F4 | F5 | F6 | MINS | EQL | LBRC | RBRC | BSLS | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | NUHS | NUBS | PGUP | PGDN | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | MNXT | VOLD | VOLU | MPLY | + * `-----------------------------------------------------------------------------------' + * generated by [keymapviz] */ +/* ,-----------------------------------------------------------------------------------. + * | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | Q | W | E | R | T | Y | U | I | O | P | LBRC | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | A | S | D | F | G | H | J | K | L | SCLN | QUOT | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |EXT_PL| | | C | V | | | N | M | | | | + * `-----------------------------------------------------------------------------------' + * generated by [keymapviz] */ +/* ,-----------------------------------------------------------------------------------. + * | |RESET |DEBUG |RGB_TO|RGB_MO|RGB_HU|RGB_HU|RGB_SA|RGB_SA|RGB_VA|RGB_VA| DEL | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | |MU_MOD|AU_ON |AU_OFF|AG_NOR|AG_SWA|QWERTY|COLEMA|DVORAK|PLOVER| | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | |MUV_DE|MUV_IN|MU_ON |MU_OFF|MI_ON |MI_OFF|TERM_O|TERM_O| | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + * generated by [keymapviz] */ diff --git a/test/expect/planck_default_0.json b/test/expect/planck_default_0.json new file mode 100644 index 0000000..6480712 --- /dev/null +++ b/test/expect/planck_default_0.json @@ -0,0 +1,62 @@ +[ + [ + { + "a": 7 + }, + "TAB", + "Q", + "W", + "E", + "R", + "T", + "Y", + "U", + "I", + "O", + "P", + "BSPC", + "ESC" + ], + [ + "A", + "S", + "D", + "F", + "G", + "H", + "J", + "K", + "L", + "SCLN", + "QUOT", + "LSFT" + ], + [ + "Z", + "X", + "C", + "V", + "B", + "N", + "M", + "COMM", + "DOT", + "SLSH", + "ENT", + "BACKLIT" + ], + [ + "LCTL", + "LALT", + "LGUI", + "LOWER", + "SPC", + "SPC", + "RAISE", + "LEFT", + "DOWN", + "UP", + "RGHT", + "" + ] +] diff --git a/test/expect/planck_default_1.json b/test/expect/planck_default_1.json new file mode 100644 index 0000000..21fb0ef --- /dev/null +++ b/test/expect/planck_default_1.json @@ -0,0 +1,62 @@ +[ + [ + { + "a": 7 + }, + "TAB", + "Q", + "W", + "F", + "P", + "G", + "J", + "L", + "U", + "Y", + "SCLN", + "BSPC", + "ESC" + ], + [ + "A", + "R", + "S", + "T", + "D", + "H", + "N", + "E", + "I", + "O", + "QUOT", + "LSFT" + ], + [ + "Z", + "X", + "C", + "V", + "B", + "K", + "M", + "COMM", + "DOT", + "SLSH", + "ENT", + "BACKLIT" + ], + [ + "LCTL", + "LALT", + "LGUI", + "LOWER", + "SPC", + "SPC", + "RAISE", + "LEFT", + "DOWN", + "UP", + "RGHT", + "" + ] +] diff --git a/test/expect/planck_default_2.json b/test/expect/planck_default_2.json new file mode 100644 index 0000000..6cdc0ab --- /dev/null +++ b/test/expect/planck_default_2.json @@ -0,0 +1,62 @@ +[ + [ + { + "a": 7 + }, + "TAB", + "QUOT", + "COMM", + "DOT", + "P", + "Y", + "F", + "G", + "C", + "R", + "L", + "BSPC", + "ESC" + ], + [ + "A", + "O", + "E", + "U", + "I", + "D", + "H", + "T", + "N", + "S", + "SLSH", + "LSFT" + ], + [ + "SCLN", + "Q", + "J", + "K", + "X", + "B", + "M", + "W", + "V", + "Z", + "ENT", + "BACKLIT" + ], + [ + "LCTL", + "LALT", + "LGUI", + "LOWER", + "SPC", + "SPC", + "RAISE", + "LEFT", + "DOWN", + "UP", + "RGHT", + "" + ] +] diff --git a/test/expect/planck_default_3.json b/test/expect/planck_default_3.json new file mode 100644 index 0000000..6d75fd2 --- /dev/null +++ b/test/expect/planck_default_3.json @@ -0,0 +1,62 @@ +[ + [ + { + "a": 7 + }, + "TILD", + "EXLM", + "AT", + "HASH", + "DLR", + "PERC", + "CIRC", + "AMPR", + "ASTR", + "LPRN", + "RPRN", + "BSPC", + "DEL" + ], + [ + "F1", + "F2", + "F3", + "F4", + "F5", + "F6", + "UNDS", + "PLUS", + "LCBR", + "RCBR", + "PIPE", + "" + ], + [ + "F7", + "F8", + "F9", + "F10", + "F11", + "F12", + "S(KC_NUHS)", + "S(KC_NUBS)", + "HOME", + "END", + "", + "" + ], + [ + "", + "", + "", + "", + "", + "", + "", + "MNXT", + "VOLD", + "VOLU", + "MPLY", + "" + ] +] diff --git a/test/expect/planck_default_4.json b/test/expect/planck_default_4.json new file mode 100644 index 0000000..a625716 --- /dev/null +++ b/test/expect/planck_default_4.json @@ -0,0 +1,62 @@ +[ + [ + { + "a": 7 + }, + "GRV", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "0", + "BSPC", + "DEL" + ], + [ + "F1", + "F2", + "F3", + "F4", + "F5", + "F6", + "MINS", + "EQL", + "LBRC", + "RBRC", + "BSLS", + "" + ], + [ + "F7", + "F8", + "F9", + "F10", + "F11", + "F12", + "NUHS", + "NUBS", + "PGUP", + "PGDN", + "", + "" + ], + [ + "", + "", + "", + "", + "", + "", + "", + "MNXT", + "VOLD", + "VOLU", + "MPLY", + "" + ] +] diff --git a/test/expect/planck_default_5.json b/test/expect/planck_default_5.json new file mode 100644 index 0000000..732b066 --- /dev/null +++ b/test/expect/planck_default_5.json @@ -0,0 +1,62 @@ +[ + [ + { + "a": 7 + }, + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "" + ], + [ + "Q", + "W", + "E", + "R", + "T", + "Y", + "U", + "I", + "O", + "P", + "LBRC", + "" + ], + [ + "A", + "S", + "D", + "F", + "G", + "H", + "J", + "K", + "L", + "SCLN", + "QUOT", + "EXT_PLV" + ], + [ + "", + "", + "C", + "V", + "", + "", + "N", + "M", + "", + "", + "", + "" + ] +] diff --git a/test/expect/planck_default_6.json b/test/expect/planck_default_6.json new file mode 100644 index 0000000..b7cbc82 --- /dev/null +++ b/test/expect/planck_default_6.json @@ -0,0 +1,62 @@ +[ + [ + { + "a": 7 + }, + "", + "RESET", + "DEBUG", + "RGB_TOG", + "RGB_MOD", + "RGB_HUI", + "RGB_HUD", + "RGB_SAI", + "RGB_SAD", + "RGB_VAI", + "RGB_VAD", + "DEL", + "" + ], + [ + "", + "MU_MOD", + "AU_ON", + "AU_OFF", + "AG_NORM", + "AG_SWAP", + "QWERTY", + "COLEMAK", + "DVORAK", + "PLOVER", + "", + "" + ], + [ + "MUV_DE", + "MUV_IN", + "MU_ON", + "MU_OFF", + "MI_ON", + "MI_OFF", + "TERM_ON", + "TERM_OFF", + "", + "", + "", + "" + ], + [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] +] diff --git a/test/expect/planck_default_fancy.c b/test/expect/planck_default_fancy.c new file mode 100644 index 0000000..3ca56a4 --- /dev/null +++ b/test/expect/planck_default_fancy.c @@ -0,0 +1,70 @@ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ ESC │ A │ S │ D │ F │ G │ H │ J │ K │ L │ SCLN │ QUOT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ Z │ X │ C │ V │ B │ N │ M │ COMM │ DOT │ SLSH │ ENT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │BACKLI│ LCTL │ LALT │ LGUI │LOWER │ SPC │ SPC │RAISE │ LEFT │ DOWN │ UP │ RGHT │ + * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ TAB │ Q │ W │ F │ P │ G │ J │ L │ U │ Y │ SCLN │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ ESC │ A │ R │ S │ T │ D │ H │ N │ E │ I │ O │ QUOT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ Z │ X │ C │ V │ B │ K │ M │ COMM │ DOT │ SLSH │ ENT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │BACKLI│ LCTL │ LALT │ LGUI │LOWER │ SPC │ SPC │RAISE │ LEFT │ DOWN │ UP │ RGHT │ + * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ TAB │ QUOT │ COMM │ DOT │ P │ Y │ F │ G │ C │ R │ L │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ ESC │ A │ O │ E │ U │ I │ D │ H │ T │ N │ S │ SLSH │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ SCLN │ Q │ J │ K │ X │ B │ M │ W │ V │ Z │ ENT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │BACKLI│ LCTL │ LALT │ LGUI │LOWER │ SPC │ SPC │RAISE │ LEFT │ DOWN │ UP │ RGHT │ + * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ TILD │ EXLM │ AT │ HASH │ DLR │ PERC │ CIRC │ AMPR │ ASTR │ LPRN │ RPRN │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ DEL │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ UNDS │ PLUS │ LCBR │ RCBR │ PIPE │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │S(KC_N│S(KC_N│ HOME │ END │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ MNXT │ VOLD │ VOLU │ MPLY │ + * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ GRV │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ DEL │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ MINS │ EQL │ LBRC │ RBRC │ BSLS │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ NUHS │ NUBS │ PGUP │ PGDN │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ MNXT │ VOLD │ VOLU │ MPLY │ + * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ 1 │ 1 │ 1 │ 1 │ 1 │ 1 │ 1 │ 1 │ 1 │ 1 │ 1 │ 1 │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ LBRC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ SCLN │ QUOT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │EXT_PL│ │ │ C │ V │ │ │ N │ M │ │ │ │ + * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ │RESET │DEBUG │RGB_TO│RGB_MO│RGB_HU│RGB_HU│RGB_SA│RGB_SA│RGB_VA│RGB_VA│ DEL │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │MU_MOD│AU_ON │AU_OFF│AG_NOR│AG_SWA│QWERTY│COLEMA│DVORAK│PLOVER│ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │MUV_DE│MUV_IN│MU_ON │MU_OFF│MI_ON │MI_OFF│TERM_O│TERM_O│ │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ + * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ diff --git a/test/expect/planck_grid.c b/test/expect/planck_grid.c new file mode 100644 index 0000000..a2ae7f2 --- /dev/null +++ b/test/expect/planck_grid.c @@ -0,0 +1,70 @@ +/* ,-----------------------------------------------------------------------------------. + * | TAB | Q | W | E | R | T | Y | U | I | O | P | BSPC | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ESC | A | S | D | F | G | H | J | K | L | SCLN | QUOT | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | LSFT | Z | X | C | V | B | N | M | COMM | DOT | SLSH | ENT | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |BACKLI| LCTL | LALT | LGUI |LOWER | SPC | SPC |RAISE | LEFT | DOWN | UP | RGHT | + * `-----------------------------------------------------------------------------------' + * generated by [keymapviz] */ +/* ,-----------------------------------------------------------------------------------. + * | TAB | Q | W | F | P | G | J | L | U | Y | SCLN | BSPC | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ESC | A | R | S | T | D | H | N | E | I | O | QUOT | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | LSFT | Z | X | C | V | B | K | M | COMM | DOT | SLSH | ENT | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |BACKLI| LCTL | LALT | LGUI |LOWER | SPC | SPC |RAISE | LEFT | DOWN | UP | RGHT | + * `-----------------------------------------------------------------------------------' + * generated by [keymapviz] */ +/* ,-----------------------------------------------------------------------------------. + * | TAB | QUOT | COMM | DOT | P | Y | F | G | C | R | L | BSPC | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ESC | A | O | E | U | I | D | H | T | N | S | SLSH | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | LSFT | SCLN | Q | J | K | X | B | M | W | V | Z | ENT | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |BACKLI| LCTL | LALT | LGUI |LOWER | SPC | SPC |RAISE | LEFT | DOWN | UP | RGHT | + * `-----------------------------------------------------------------------------------' + * generated by [keymapviz] */ +/* ,-----------------------------------------------------------------------------------. + * | TILD | EXLM | AT | HASH | DLR | PERC | CIRC | AMPR | ASTR | LPRN | RPRN | BSPC | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | DEL | F1 | F2 | F3 | F4 | F5 | F6 | UNDS | PLUS | LCBR | RCBR | PIPE | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |S(KC_N|S(KC_N| HOME | END | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | MNXT | VOLD | VOLU | MPLY | + * `-----------------------------------------------------------------------------------' + * generated by [keymapviz] */ +/* ,-----------------------------------------------------------------------------------. + * | GRV | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BSPC | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | DEL | F1 | F2 | F3 | F4 | F5 | F6 | MINS | EQL | LBRC | RBRC | BSLS | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | NUHS | NUBS | PGUP | PGDN | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | MNXT | VOLD | VOLU | MPLY | + * `-----------------------------------------------------------------------------------' + * generated by [keymapviz] */ +/* ,-----------------------------------------------------------------------------------. + * | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | Q | W | E | R | T | Y | U | I | O | P | LBRC | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | A | S | D | F | G | H | J | K | L | SCLN | QUOT | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |EXT_PL| | | C | V | | | N | M | | | | + * `-----------------------------------------------------------------------------------' + * generated by [keymapviz] */ +/* ,-----------------------------------------------------------------------------------. + * | |RESET |DEBUG |RGB_TO|RGB_MO|RGB_HU|RGB_HU|RGB_SA|RGB_SA|RGB_VA|RGB_VA| DEL | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | |MU_MOD|AU_ON |AU_OFF|AG_NOR|AG_SWA|QWERTY|COLEMA|DVORAK|PLOVER| | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | |MUV_DE|MUV_IN|MU_ON |MU_OFF|MI_ON |MI_OFF|TERM_O|TERM_O| | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + * generated by [keymapviz] */ diff --git a/test/expect/planck_grid_0.json b/test/expect/planck_grid_0.json new file mode 100644 index 0000000..6480712 --- /dev/null +++ b/test/expect/planck_grid_0.json @@ -0,0 +1,62 @@ +[ + [ + { + "a": 7 + }, + "TAB", + "Q", + "W", + "E", + "R", + "T", + "Y", + "U", + "I", + "O", + "P", + "BSPC", + "ESC" + ], + [ + "A", + "S", + "D", + "F", + "G", + "H", + "J", + "K", + "L", + "SCLN", + "QUOT", + "LSFT" + ], + [ + "Z", + "X", + "C", + "V", + "B", + "N", + "M", + "COMM", + "DOT", + "SLSH", + "ENT", + "BACKLIT" + ], + [ + "LCTL", + "LALT", + "LGUI", + "LOWER", + "SPC", + "SPC", + "RAISE", + "LEFT", + "DOWN", + "UP", + "RGHT", + "" + ] +] diff --git a/test/expect/planck_grid_1.json b/test/expect/planck_grid_1.json new file mode 100644 index 0000000..21fb0ef --- /dev/null +++ b/test/expect/planck_grid_1.json @@ -0,0 +1,62 @@ +[ + [ + { + "a": 7 + }, + "TAB", + "Q", + "W", + "F", + "P", + "G", + "J", + "L", + "U", + "Y", + "SCLN", + "BSPC", + "ESC" + ], + [ + "A", + "R", + "S", + "T", + "D", + "H", + "N", + "E", + "I", + "O", + "QUOT", + "LSFT" + ], + [ + "Z", + "X", + "C", + "V", + "B", + "K", + "M", + "COMM", + "DOT", + "SLSH", + "ENT", + "BACKLIT" + ], + [ + "LCTL", + "LALT", + "LGUI", + "LOWER", + "SPC", + "SPC", + "RAISE", + "LEFT", + "DOWN", + "UP", + "RGHT", + "" + ] +] diff --git a/test/expect/planck_grid_2.json b/test/expect/planck_grid_2.json new file mode 100644 index 0000000..6cdc0ab --- /dev/null +++ b/test/expect/planck_grid_2.json @@ -0,0 +1,62 @@ +[ + [ + { + "a": 7 + }, + "TAB", + "QUOT", + "COMM", + "DOT", + "P", + "Y", + "F", + "G", + "C", + "R", + "L", + "BSPC", + "ESC" + ], + [ + "A", + "O", + "E", + "U", + "I", + "D", + "H", + "T", + "N", + "S", + "SLSH", + "LSFT" + ], + [ + "SCLN", + "Q", + "J", + "K", + "X", + "B", + "M", + "W", + "V", + "Z", + "ENT", + "BACKLIT" + ], + [ + "LCTL", + "LALT", + "LGUI", + "LOWER", + "SPC", + "SPC", + "RAISE", + "LEFT", + "DOWN", + "UP", + "RGHT", + "" + ] +] diff --git a/test/expect/planck_grid_3.json b/test/expect/planck_grid_3.json new file mode 100644 index 0000000..6d75fd2 --- /dev/null +++ b/test/expect/planck_grid_3.json @@ -0,0 +1,62 @@ +[ + [ + { + "a": 7 + }, + "TILD", + "EXLM", + "AT", + "HASH", + "DLR", + "PERC", + "CIRC", + "AMPR", + "ASTR", + "LPRN", + "RPRN", + "BSPC", + "DEL" + ], + [ + "F1", + "F2", + "F3", + "F4", + "F5", + "F6", + "UNDS", + "PLUS", + "LCBR", + "RCBR", + "PIPE", + "" + ], + [ + "F7", + "F8", + "F9", + "F10", + "F11", + "F12", + "S(KC_NUHS)", + "S(KC_NUBS)", + "HOME", + "END", + "", + "" + ], + [ + "", + "", + "", + "", + "", + "", + "", + "MNXT", + "VOLD", + "VOLU", + "MPLY", + "" + ] +] diff --git a/test/expect/planck_grid_4.json b/test/expect/planck_grid_4.json new file mode 100644 index 0000000..a625716 --- /dev/null +++ b/test/expect/planck_grid_4.json @@ -0,0 +1,62 @@ +[ + [ + { + "a": 7 + }, + "GRV", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "0", + "BSPC", + "DEL" + ], + [ + "F1", + "F2", + "F3", + "F4", + "F5", + "F6", + "MINS", + "EQL", + "LBRC", + "RBRC", + "BSLS", + "" + ], + [ + "F7", + "F8", + "F9", + "F10", + "F11", + "F12", + "NUHS", + "NUBS", + "PGUP", + "PGDN", + "", + "" + ], + [ + "", + "", + "", + "", + "", + "", + "", + "MNXT", + "VOLD", + "VOLU", + "MPLY", + "" + ] +] diff --git a/test/expect/planck_grid_5.json b/test/expect/planck_grid_5.json new file mode 100644 index 0000000..732b066 --- /dev/null +++ b/test/expect/planck_grid_5.json @@ -0,0 +1,62 @@ +[ + [ + { + "a": 7 + }, + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "" + ], + [ + "Q", + "W", + "E", + "R", + "T", + "Y", + "U", + "I", + "O", + "P", + "LBRC", + "" + ], + [ + "A", + "S", + "D", + "F", + "G", + "H", + "J", + "K", + "L", + "SCLN", + "QUOT", + "EXT_PLV" + ], + [ + "", + "", + "C", + "V", + "", + "", + "N", + "M", + "", + "", + "", + "" + ] +] diff --git a/test/expect/planck_grid_6.json b/test/expect/planck_grid_6.json new file mode 100644 index 0000000..b7cbc82 --- /dev/null +++ b/test/expect/planck_grid_6.json @@ -0,0 +1,62 @@ +[ + [ + { + "a": 7 + }, + "", + "RESET", + "DEBUG", + "RGB_TOG", + "RGB_MOD", + "RGB_HUI", + "RGB_HUD", + "RGB_SAI", + "RGB_SAD", + "RGB_VAI", + "RGB_VAD", + "DEL", + "" + ], + [ + "", + "MU_MOD", + "AU_ON", + "AU_OFF", + "AG_NORM", + "AG_SWAP", + "QWERTY", + "COLEMAK", + "DVORAK", + "PLOVER", + "", + "" + ], + [ + "MUV_DE", + "MUV_IN", + "MU_ON", + "MU_OFF", + "MI_ON", + "MI_OFF", + "TERM_ON", + "TERM_OFF", + "", + "", + "", + "" + ], + [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] +] diff --git a/test/expect/planck_grid_fancy.c b/test/expect/planck_grid_fancy.c new file mode 100644 index 0000000..3ca56a4 --- /dev/null +++ b/test/expect/planck_grid_fancy.c @@ -0,0 +1,70 @@ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ ESC │ A │ S │ D │ F │ G │ H │ J │ K │ L │ SCLN │ QUOT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ Z │ X │ C │ V │ B │ N │ M │ COMM │ DOT │ SLSH │ ENT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │BACKLI│ LCTL │ LALT │ LGUI │LOWER │ SPC │ SPC │RAISE │ LEFT │ DOWN │ UP │ RGHT │ + * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ TAB │ Q │ W │ F │ P │ G │ J │ L │ U │ Y │ SCLN │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ ESC │ A │ R │ S │ T │ D │ H │ N │ E │ I │ O │ QUOT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ Z │ X │ C │ V │ B │ K │ M │ COMM │ DOT │ SLSH │ ENT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │BACKLI│ LCTL │ LALT │ LGUI │LOWER │ SPC │ SPC │RAISE │ LEFT │ DOWN │ UP │ RGHT │ + * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ TAB │ QUOT │ COMM │ DOT │ P │ Y │ F │ G │ C │ R │ L │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ ESC │ A │ O │ E │ U │ I │ D │ H │ T │ N │ S │ SLSH │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ SCLN │ Q │ J │ K │ X │ B │ M │ W │ V │ Z │ ENT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │BACKLI│ LCTL │ LALT │ LGUI │LOWER │ SPC │ SPC │RAISE │ LEFT │ DOWN │ UP │ RGHT │ + * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ TILD │ EXLM │ AT │ HASH │ DLR │ PERC │ CIRC │ AMPR │ ASTR │ LPRN │ RPRN │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ DEL │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ UNDS │ PLUS │ LCBR │ RCBR │ PIPE │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │S(KC_N│S(KC_N│ HOME │ END │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ MNXT │ VOLD │ VOLU │ MPLY │ + * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ GRV │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ DEL │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ MINS │ EQL │ LBRC │ RBRC │ BSLS │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ NUHS │ NUBS │ PGUP │ PGDN │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ MNXT │ VOLD │ VOLU │ MPLY │ + * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ 1 │ 1 │ 1 │ 1 │ 1 │ 1 │ 1 │ 1 │ 1 │ 1 │ 1 │ 1 │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ LBRC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ SCLN │ QUOT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │EXT_PL│ │ │ C │ V │ │ │ N │ M │ │ │ │ + * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ │RESET │DEBUG │RGB_TO│RGB_MO│RGB_HU│RGB_HU│RGB_SA│RGB_SA│RGB_VA│RGB_VA│ DEL │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │MU_MOD│AU_ON │AU_OFF│AG_NOR│AG_SWA│QWERTY│COLEMA│DVORAK│PLOVER│ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │MUV_DE│MUV_IN│MU_ON │MU_OFF│MI_ON │MI_OFF│TERM_O│TERM_O│ │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ + * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ diff --git a/test/expect/planck_mit.c b/test/expect/planck_mit.c new file mode 100644 index 0000000..1ff7b30 --- /dev/null +++ b/test/expect/planck_mit.c @@ -0,0 +1,100 @@ +/* ,-----------------------------------------------------------------------------------. + * | GESC | Q | W | E | R | T | Y | U | I | O | P | BSPC | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |LT(_TA| A | S | D | F | G | H | J | K | L | SCLN | QUOT | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |TD(TD_| Z | X | C | V | B | N | M | COMM | DOT | SLSH |SFTENT| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |TD(TD_| LEAD | LGUI |TD(TD_|MO(_SY| SPC |MO(_NU| LEFT | DOWN | UP | RGHT | + * `-----------------------------------------------------------------------------------' + * generated by [keymapviz] */ +/* ,-----------------------------------------------------------------------------------. + * | GESC | Q | W | F | P | G | J | L | U | Y | SCLN | BSPC | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |LT(_TA| A | R | S | T | D | H | N | E | I | O | QUOT | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |TD(TD_| Z | X | C | V | B | K | M | COMM | DOT | SLSH |SFTENT| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |TD(TD_| LEAD | LGUI |TD(TD_|MO(_SY| SPC |MO(_NU| LEFT | DOWN | UP | RGHT | + * `-----------------------------------------------------------------------------------' + * generated by [keymapviz] */ +/* ,-----------------------------------------------------------------------------------. + * | GESC | QUOT | COMM | DOT | P | Y | F | G | C | R | L | BSPC | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |LT(_TA| A | O | E | U | I | D | H | T | | S | SLSH | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |TD(TD_| SCLN | Q | J | K | X | B | M | W | V | Z |SFTENT| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |TD(TD_| LEAD | LGUI |TD(TD_|MO(_SY| SPC |MO(_NU| LEFT | DOWN | UP | RGHT | + * `-----------------------------------------------------------------------------------' + * generated by [keymapviz] */ +/* ,-----------------------------------------------------------------------------------. + * | MPLY | EXLM | AT | HASH | DLR | PERC | CIRC | AMPR | ASTR | LPRN | RPRN | BSPC | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | DEL | F1 | F2 | F3 | F4 | F5 | F6 | UNDS | PLUS | LCBR | RCBR | PIPE | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |LSFT(K|LSFT(K| HOME | END | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |TG(_NU| | | |TO(_BA| | | MNXT | VOLD | VOLU | MPLY | + * `-----------------------------------------------------------------------------------' + * generated by [keymapviz] */ +/* ,-----------------------------------------------------------------------------------. + * | MPLY | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BSPC | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | DEL | F1 | F2 | F3 | F4 | F5 | F6 | MINS | EQL | LBRC | RBRC | BSLS | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | NUHS | NUBS | PGUP | PGDN | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |TG(_NU| | | | | |TO(_BA| MNXT | VOLD | VOLU | MPLY | + * `-----------------------------------------------------------------------------------' + * generated by [keymapviz] */ +/* ,-----------------------------------------------------------------------------------. + * | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | Q | W | E | R | T | Y | U | I | O | P | LBRC | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | A | S | D | F | G | H | J | K | L | SCLN | QUOT | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |EXT_PL| | | C | V | | N | M | | | | + * `-----------------------------------------------------------------------------------' + * generated by [keymapviz] */ +/* ,-----------------------------------------------------------------------------------. + * |LCTL(L|DO_RES|DEBUG |RGB_TO|RGB_MO|RGB_HU|RGB_HU|RGB_SA|RGB_SA|TD(TD_|TD(TD_| DEL | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |RGB_VA|RGB_VA|MU_MOD|AU_ON |AU_OFF|AG_NOR|AG_SWA|DF(_BA|DF(_CO|DF(_DV|TO(_PL|MY_RGB| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | |MUV_DE|MUV_IN|MU_ON |MU_OFF|MI_ON |MI_OFF|TERM_O|TERM_O|CK_ON |CK_OFF|ENTER | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | TG(_MOU | | | | | | + * `-----------------------------------------------------------------------------------' + * generated by [keymapviz] */ +/* ,-----------------------------------------------------------------------------------. + * | ESC | HOME | UP | END | PERC | LCBR | RCBR | TAB | P7 | P8 | P9 | BSPC | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | TILD | LEFT | DOWN | RGHT | BSLS | LBRC | RBRC | PSLS | P4 | P5 | P6 | PMNS | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | LSFT | SLSH | CUT | COPY |PASTE | LT | GT | PAST | P1 | P2 | P3 | PPLS | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |TO(_BA| LEAD | LGUI | LALT | LCPO | SPC | RCPC | HASH | P0 | PDOT | PENT | + * `-----------------------------------------------------------------------------------' + * generated by [keymapviz] */ +/* ,-----------------------------------------------------------------------------------. + * | ESC |ALTF4 |VLK_TO|PRINT_|WAKE_A|WAKE_A| REDO |UC_MOD|UC_M_W|CG_TOG|AG_TOG|DLINE | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |NXTAB |SLCTAL| SAVE | | FIND |SH_TG |SH_TG |IRONY | LCUT |LCOPY | | KILL | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | LSFT | UNDO | CUT | COPY |PASTE |PRVWD |NXTWD |TG(_MO| | HOME | END |SFTENT| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |TO(_BA| LCTL | LGUI | LALT | LSPO | ALT_TAB | RSPC |PRVWD | BRID | BRIU |NXTWD | + * `-----------------------------------------------------------------------------------' + * generated by [keymapviz] */ +/* ,-----------------------------------------------------------------------------------. + * | ESC | BTN1 | MS_U | BTN2 | | | |UC_MOD|UC_M_W|CG_TOG|AG_TOG| BSPC | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | TAB | MS_L | MS_D | MS_R | | | |IRONY |VLK_TO| | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | LSFT | UNDO | CUT | COPY |PASTE |PRVWD |NXTWD | | HOME | BTN3 | END |SFTENT| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |TO(_BA| LCTL | LGUI | LALT | BTN1 | ALT_TAB | BTN2 | WH_L | WH_D | WH_U | WH_R | + * `-----------------------------------------------------------------------------------' + * generated by [keymapviz] */ diff --git a/test/expect/planck_mit_0.json b/test/expect/planck_mit_0.json new file mode 100644 index 0000000..5c65d24 --- /dev/null +++ b/test/expect/planck_mit_0.json @@ -0,0 +1,64 @@ +[ + [ + { + "a": 7 + }, + "GESC", + "Q", + "W", + "E", + "R", + "T", + "Y", + "U", + "I", + "O", + "P", + "BSPC", + "LT(_TABULA,KC_TAB)" + ], + [ + "A", + "S", + "D", + "F", + "G", + "H", + "J", + "K", + "L", + "SCLN", + "QUOT", + "TD(TD_LSHFT_CAPS)" + ], + [ + "Z", + "X", + "C", + "V", + "B", + "N", + "M", + "COMM", + "DOT", + "SLSH", + "SFTENT", + "TD(TD_LCTL_STICKY)" + ], + [ + "LEAD", + "LGUI", + "TD(TD_LALT_STICKY)", + "MO(_SYMBLS)", + "SPC", + { + "w": 2 + }, + "MO(_NUMBRS)", + "LEFT", + "DOWN", + "UP", + "RGHT", + "" + ] +] diff --git a/test/expect/planck_mit_1.json b/test/expect/planck_mit_1.json new file mode 100644 index 0000000..f10dcc7 --- /dev/null +++ b/test/expect/planck_mit_1.json @@ -0,0 +1,64 @@ +[ + [ + { + "a": 7 + }, + "GESC", + "Q", + "W", + "F", + "P", + "G", + "J", + "L", + "U", + "Y", + "SCLN", + "BSPC", + "LT(_TABULA,KC_TAB)" + ], + [ + "A", + "R", + "S", + "T", + "D", + "H", + "N", + "E", + "I", + "O", + "QUOT", + "TD(TD_LSHFT_CAPS)" + ], + [ + "Z", + "X", + "C", + "V", + "B", + "K", + "M", + "COMM", + "DOT", + "SLSH", + "SFTENT", + "TD(TD_LCTL_STICKY)" + ], + [ + "LEAD", + "LGUI", + "TD(TD_LALT_STICKY)", + "MO(_SYMBLS)", + "SPC", + { + "w": 2 + }, + "MO(_NUMBRS)", + "LEFT", + "DOWN", + "UP", + "RGHT", + "" + ] +] diff --git a/test/expect/planck_mit_2.json b/test/expect/planck_mit_2.json new file mode 100644 index 0000000..df24c7c --- /dev/null +++ b/test/expect/planck_mit_2.json @@ -0,0 +1,64 @@ +[ + [ + { + "a": 7 + }, + "GESC", + "QUOT", + "COMM", + "DOT", + "P", + "Y", + "F", + "G", + "C", + "R", + "L", + "BSPC", + "LT(_TABULA,KC_TAB)" + ], + [ + "A", + "O", + "E", + "U", + "I", + "D", + "H", + "T", + "", + "S", + "SLSH", + "TD(TD_LSHFT_CAPS)" + ], + [ + "SCLN", + "Q", + "J", + "K", + "X", + "B", + "M", + "W", + "V", + "Z", + "SFTENT", + "TD(TD_LCTL_STICKY)" + ], + [ + "LEAD", + "LGUI", + "TD(TD_LALT_STICKY)", + "MO(_SYMBLS)", + "SPC", + { + "w": 2 + }, + "MO(_NUMBRS)", + "LEFT", + "DOWN", + "UP", + "RGHT", + "" + ] +] diff --git a/test/expect/planck_mit_3.json b/test/expect/planck_mit_3.json new file mode 100644 index 0000000..63ec30b --- /dev/null +++ b/test/expect/planck_mit_3.json @@ -0,0 +1,64 @@ +[ + [ + { + "a": 7 + }, + "MPLY", + "EXLM", + "AT", + "HASH", + "DLR", + "PERC", + "CIRC", + "AMPR", + "ASTR", + "LPRN", + "RPRN", + "BSPC", + "DEL" + ], + [ + "F1", + "F2", + "F3", + "F4", + "F5", + "F6", + "UNDS", + "PLUS", + "LCBR", + "RCBR", + "PIPE", + "" + ], + [ + "F7", + "F8", + "F9", + "F10", + "F11", + "F12", + "LSFT(KC_LCTL)", + "LSFT(KC_LCTL)", + "HOME", + "END", + "", + "TG(_NUMPD)" + ], + [ + "", + "", + "", + "TO(_BASE)", + "", + { + "w": 2 + }, + "", + "MNXT", + "VOLD", + "VOLU", + "MPLY", + "" + ] +] diff --git a/test/expect/planck_mit_4.json b/test/expect/planck_mit_4.json new file mode 100644 index 0000000..0a0a4fd --- /dev/null +++ b/test/expect/planck_mit_4.json @@ -0,0 +1,64 @@ +[ + [ + { + "a": 7 + }, + "MPLY", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "0", + "BSPC", + "DEL" + ], + [ + "F1", + "F2", + "F3", + "F4", + "F5", + "F6", + "MINS", + "EQL", + "LBRC", + "RBRC", + "BSLS", + "" + ], + [ + "F7", + "F8", + "F9", + "F10", + "F11", + "F12", + "NUHS", + "NUBS", + "PGUP", + "PGDN", + "", + "TG(_NUMPD)" + ], + [ + "", + "", + "", + "", + "", + { + "w": 2 + }, + "TO(_BASE)", + "MNXT", + "VOLD", + "VOLU", + "MPLY", + "" + ] +] diff --git a/test/expect/planck_mit_5.json b/test/expect/planck_mit_5.json new file mode 100644 index 0000000..997b191 --- /dev/null +++ b/test/expect/planck_mit_5.json @@ -0,0 +1,64 @@ +[ + [ + { + "a": 7 + }, + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "" + ], + [ + "Q", + "W", + "E", + "R", + "T", + "Y", + "U", + "I", + "O", + "P", + "LBRC", + "" + ], + [ + "A", + "S", + "D", + "F", + "G", + "H", + "J", + "K", + "L", + "SCLN", + "QUOT", + "EXT_PLV" + ], + [ + "", + "", + "C", + "V", + "", + { + "w": 2 + }, + "N", + "M", + "", + "", + "", + "" + ] +] diff --git a/test/expect/planck_mit_6.json b/test/expect/planck_mit_6.json new file mode 100644 index 0000000..00b5074 --- /dev/null +++ b/test/expect/planck_mit_6.json @@ -0,0 +1,64 @@ +[ + [ + { + "a": 7 + }, + "LCTL(LALT(KC_DEL))", + "DO_RESET", + "DEBUG", + "RGB_TOG", + "RGB_MOD", + "RGB_HUI", + "RGB_HUD", + "RGB_SAI", + "RGB_SAD", + "TD(TD_DEG_DEGF)", + "TD(TD_SMILEY)", + "DEL", + "RGB_VAI" + ], + [ + "RGB_VAD", + "MU_MOD", + "AU_ON", + "AU_OFF", + "AG_NORM", + "AG_SWAP", + "DF(_BASE)", + "DF(_COLEMAK)", + "DF(_DVORAK)", + "TO(_PLOVER)", + "MY_RGBCON", + "" + ], + [ + "MUV_DE", + "MUV_IN", + "MU_ON", + "MU_OFF", + "MI_ON", + "MI_OFF", + "TERM_ON", + "TERM_OFF", + "CK_ON", + "CK_OFF", + "ENTER", + "" + ], + [ + "", + "", + "", + "", + "TG(_MOUSY)", + { + "w": 2 + }, + "", + "", + "", + "", + "", + "" + ] +] diff --git a/test/expect/planck_mit_7.json b/test/expect/planck_mit_7.json new file mode 100644 index 0000000..febbed7 --- /dev/null +++ b/test/expect/planck_mit_7.json @@ -0,0 +1,64 @@ +[ + [ + { + "a": 7 + }, + "ESC", + "HOME", + "UP", + "END", + "PERC", + "LCBR", + "RCBR", + "TAB", + "P7", + "P8", + "P9", + "BSPC", + "TILD" + ], + [ + "LEFT", + "DOWN", + "RGHT", + "BSLS", + "LBRC", + "RBRC", + "PSLS", + "P4", + "P5", + "P6", + "PMNS", + "LSFT" + ], + [ + "SLSH", + "CUT", + "COPY", + "PASTE", + "LT", + "GT", + "PAST", + "P1", + "P2", + "P3", + "PPLS", + "TO(_BASE)" + ], + [ + "LEAD", + "LGUI", + "LALT", + "LCPO", + "SPC", + { + "w": 2 + }, + "RCPC", + "HASH", + "P0", + "PDOT", + "PENT", + "" + ] +] diff --git a/test/expect/planck_mit_8.json b/test/expect/planck_mit_8.json new file mode 100644 index 0000000..eb11b52 --- /dev/null +++ b/test/expect/planck_mit_8.json @@ -0,0 +1,64 @@ +[ + [ + { + "a": 7 + }, + "ESC", + "ALTF4", + "VLK_TOG", + "PRINT_WPM_KEY", + "WAKE_ANI_TOG", + "WAKE_AUD_TOG", + "REDO", + "UC_MOD", + "UC_M_WC", + "CG_TOGG", + "AG_TOGG", + "DLINE", + "NXTAB" + ], + [ + "SLCTALL", + "SAVE", + "", + "FIND", + "SH_TG", + "SH_TG", + "IRONY", + "LCUT", + "LCOPY", + "", + "KILL", + "LSFT" + ], + [ + "UNDO", + "CUT", + "COPY", + "PASTE", + "PRVWD", + "NXTWD", + "TG(_MOUSY)", + "", + "HOME", + "END", + "SFTENT", + "TO(_BASE)" + ], + [ + "LCTL", + "LGUI", + "LALT", + "LSPO", + "ALT_TAB", + { + "w": 2 + }, + "RSPC", + "PRVWD", + "BRID", + "BRIU", + "NXTWD", + "" + ] +] diff --git a/test/expect/planck_mit_9.json b/test/expect/planck_mit_9.json new file mode 100644 index 0000000..3495661 --- /dev/null +++ b/test/expect/planck_mit_9.json @@ -0,0 +1,64 @@ +[ + [ + { + "a": 7 + }, + "ESC", + "BTN1", + "MS_U", + "BTN2", + "", + "", + "", + "UC_MOD", + "UC_M_WC", + "CG_TOGG", + "AG_TOGG", + "BSPC", + "TAB" + ], + [ + "MS_L", + "MS_D", + "MS_R", + "", + "", + "", + "IRONY", + "VLK_TOG", + "", + "", + "", + "LSFT" + ], + [ + "UNDO", + "CUT", + "COPY", + "PASTE", + "PRVWD", + "NXTWD", + "", + "HOME", + "BTN3", + "END", + "SFTENT", + "TO(_BASE)" + ], + [ + "LCTL", + "LGUI", + "LALT", + "BTN1", + "ALT_TAB", + { + "w": 2 + }, + "BTN2", + "WH_L", + "WH_D", + "WH_U", + "WH_R", + "" + ] +] diff --git a/test/expect/planck_mit_fancy.c b/test/expect/planck_mit_fancy.c new file mode 100644 index 0000000..969182f --- /dev/null +++ b/test/expect/planck_mit_fancy.c @@ -0,0 +1,100 @@ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ GESC │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │LT(_TA│ A │ S │ D │ F │ G │ H │ J │ K │ L │ SCLN │ QUOT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │TD(TD_│ Z │ X │ C │ V │ B │ N │ M │ COMM │ DOT │ SLSH │SFTENT│ + * ├──────┼──────┼──────┼──────┼──────┼──────┴──────┼──────┼──────┼──────┼──────┼──────┤ + * │TD(TD_│ LEAD │ LGUI │TD(TD_│MO(_SY│ SPC │MO(_NU│ LEFT │ DOWN │ UP │ RGHT │ + * └──────┴──────┴──────┴──────┴──────┴─────────────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ GESC │ Q │ W │ F │ P │ G │ J │ L │ U │ Y │ SCLN │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │LT(_TA│ A │ R │ S │ T │ D │ H │ N │ E │ I │ O │ QUOT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │TD(TD_│ Z │ X │ C │ V │ B │ K │ M │ COMM │ DOT │ SLSH │SFTENT│ + * ├──────┼──────┼──────┼──────┼──────┼──────┴──────┼──────┼──────┼──────┼──────┼──────┤ + * │TD(TD_│ LEAD │ LGUI │TD(TD_│MO(_SY│ SPC │MO(_NU│ LEFT │ DOWN │ UP │ RGHT │ + * └──────┴──────┴──────┴──────┴──────┴─────────────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ GESC │ QUOT │ COMM │ DOT │ P │ Y │ F │ G │ C │ R │ L │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │LT(_TA│ A │ O │ E │ U │ I │ D │ H │ T │ │ S │ SLSH │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │TD(TD_│ SCLN │ Q │ J │ K │ X │ B │ M │ W │ V │ Z │SFTENT│ + * ├──────┼──────┼──────┼──────┼──────┼──────┴──────┼──────┼──────┼──────┼──────┼──────┤ + * │TD(TD_│ LEAD │ LGUI │TD(TD_│MO(_SY│ SPC │MO(_NU│ LEFT │ DOWN │ UP │ RGHT │ + * └──────┴──────┴──────┴──────┴──────┴─────────────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ MPLY │ EXLM │ AT │ HASH │ DLR │ PERC │ CIRC │ AMPR │ ASTR │ LPRN │ RPRN │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ DEL │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ UNDS │ PLUS │ LCBR │ RCBR │ PIPE │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │LSFT(K│LSFT(K│ HOME │ END │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┴──────┼──────┼──────┼──────┼──────┼──────┤ + * │TG(_NU│ │ │ │TO(_BA│ │ │ MNXT │ VOLD │ VOLU │ MPLY │ + * └──────┴──────┴──────┴──────┴──────┴─────────────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ MPLY │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ DEL │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ MINS │ EQL │ LBRC │ RBRC │ BSLS │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ NUHS │ NUBS │ PGUP │ PGDN │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┴──────┼──────┼──────┼──────┼──────┼──────┤ + * │TG(_NU│ │ │ │ │ │TO(_BA│ MNXT │ VOLD │ VOLU │ MPLY │ + * └──────┴──────┴──────┴──────┴──────┴─────────────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ 1 │ 1 │ 1 │ 1 │ 1 │ 1 │ 1 │ 1 │ 1 │ 1 │ 1 │ 1 │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ LBRC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ SCLN │ QUOT │ + * ├──────┼──────┼──────┼──────┼──────┼──────┴──────┼──────┼──────┼──────┼──────┼──────┤ + * │EXT_PL│ │ │ C │ V │ │ N │ M │ │ │ │ + * └──────┴──────┴──────┴──────┴──────┴─────────────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │LCTL(L│DO_RES│DEBUG │RGB_TO│RGB_MO│RGB_HU│RGB_HU│RGB_SA│RGB_SA│TD(TD_│TD(TD_│ DEL │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │RGB_VA│RGB_VA│MU_MOD│AU_ON │AU_OFF│AG_NOR│AG_SWA│DF(_BA│DF(_CO│DF(_DV│TO(_PL│MY_RGB│ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │MUV_DE│MUV_IN│MU_ON │MU_OFF│MI_ON │MI_OFF│TERM_O│TERM_O│CK_ON │CK_OFF│ENTER │ + * ├──────┼──────┼──────┼──────┼──────┼──────┴──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ TG(_MOU │ │ │ │ │ │ + * └──────┴──────┴──────┴──────┴──────┴─────────────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ ESC │ HOME │ UP │ END │ PERC │ LCBR │ RCBR │ TAB │ P7 │ P8 │ P9 │ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ TILD │ LEFT │ DOWN │ RGHT │ BSLS │ LBRC │ RBRC │ PSLS │ P4 │ P5 │ P6 │ PMNS │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ SLSH │ CUT │ COPY │PASTE │ LT │ GT │ PAST │ P1 │ P2 │ P3 │ PPLS │ + * ├──────┼──────┼──────┼──────┼──────┼──────┴──────┼──────┼──────┼──────┼──────┼──────┤ + * │TO(_BA│ LEAD │ LGUI │ LALT │ LCPO │ SPC │ RCPC │ HASH │ P0 │ PDOT │ PENT │ + * └──────┴──────┴──────┴──────┴──────┴─────────────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ ESC │ALTF4 │VLK_TO│PRINT_│WAKE_A│WAKE_A│ REDO │UC_MOD│UC_M_W│CG_TOG│AG_TOG│DLINE │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │NXTAB │SLCTAL│ SAVE │ │ FIND │SH_TG │SH_TG │IRONY │ LCUT │LCOPY │ │ KILL │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ UNDO │ CUT │ COPY │PASTE │PRVWD │NXTWD │TG(_MO│ │ HOME │ END │SFTENT│ + * ├──────┼──────┼──────┼──────┼──────┼──────┴──────┼──────┼──────┼──────┼──────┼──────┤ + * │TO(_BA│ LCTL │ LGUI │ LALT │ LSPO │ ALT_TAB │ RSPC │PRVWD │ BRID │ BRIU │NXTWD │ + * └──────┴──────┴──────┴──────┴──────┴─────────────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ ESC │ BTN1 │ MS_U │ BTN2 │ │ │ │UC_MOD│UC_M_W│CG_TOG│AG_TOG│ BSPC │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ TAB │ MS_L │ MS_D │ MS_R │ │ │ │IRONY │VLK_TO│ │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ UNDO │ CUT │ COPY │PASTE │PRVWD │NXTWD │ │ HOME │ BTN3 │ END │SFTENT│ + * ├──────┼──────┼──────┼──────┼──────┼──────┴──────┼──────┼──────┼──────┼──────┼──────┤ + * │TO(_BA│ LCTL │ LGUI │ LALT │ BTN1 │ ALT_TAB │ BTN2 │ WH_L │ WH_D │ WH_U │ WH_R │ + * └──────┴──────┴──────┴──────┴──────┴─────────────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ diff --git a/test/test.py b/test/test.py index 4e76672..ced5068 100644 --- a/test/test.py +++ b/test/test.py @@ -226,6 +226,48 @@ def exe(cmd): exe('keymapviz -k lets_split ./input/custom_legends_lets_split_keymap.c -c ./input/custom_legends_config.properties -o custom_legends_lets_split.c') exe('diff -u expect/custom_legends_lets_split.c custom_legends_lets_split.c') +# planck (default/grid) +exe('keymapviz ./qmk_firmware/keyboards/planck/keymaps/default/keymap.c -o planck_default.c') +exe('keymapviz ./qmk_firmware/keyboards/planck/keymaps/default/keymap.c -o planck_default_fancy.c -t fancy') +exe('keymapviz ./qmk_firmware/keyboards/planck/keymaps/default/keymap.c -o planck_default_{}.json -t json') + +exe('diff -u expect/planck_grid.c planck_default.c') +exe('diff -u expect/planck_grid_fancy.c planck_default_fancy.c') +exe('diff -u expect/planck_grid_0.json planck_default_0.json') +exe('diff -u expect/planck_grid_1.json planck_default_1.json') +exe('diff -u expect/planck_grid_2.json planck_default_2.json') +exe('diff -u expect/planck_grid_3.json planck_default_3.json') +exe('diff -u expect/planck_grid_4.json planck_default_4.json') +exe('diff -u expect/planck_grid_5.json planck_default_5.json') + + +exe('keymapviz ./qmk_firmware/keyboards/planck/keymaps/default/keymap.c -o planck_grid.c -l grid') +exe('keymapviz ./qmk_firmware/keyboards/planck/keymaps/default/keymap.c -o planck_grid_fancy.c -t fancy -l grid') +exe('keymapviz ./qmk_firmware/keyboards/planck/keymaps/default/keymap.c -o planck_grid_{}.json -t json -l grid') + +exe('diff -u expect/planck_grid.c planck_grid.c') +exe('diff -u expect/planck_grid_fancy.c planck_grid_fancy.c') +exe('diff -u expect/planck_grid_0.json planck_grid_0.json') +exe('diff -u expect/planck_grid_1.json planck_grid_1.json') +exe('diff -u expect/planck_grid_2.json planck_grid_2.json') +exe('diff -u expect/planck_grid_3.json planck_grid_3.json') +exe('diff -u expect/planck_grid_4.json planck_grid_4.json') +exe('diff -u expect/planck_grid_5.json planck_grid_5.json') + +# planck (mit) +exe('keymapviz ./qmk_firmware/keyboards/planck/keymaps/rootiest/keymap.c -o planck_mit.c -l mit') +exe('keymapviz ./qmk_firmware/keyboards/planck/keymaps/rootiest/keymap.c -o planck_mit_fancy.c -t fancy -l mit') +exe('keymapviz ./qmk_firmware/keyboards/planck/keymaps/rootiest/keymap.c -o planck_mit_{}.json -t json -l mit') + +exe('diff -u expect/planck_mit.c planck_mit.c') +exe('diff -u expect/planck_mit_fancy.c planck_mit_fancy.c') +exe('diff -u expect/planck_mit_0.json planck_mit_0.json') +exe('diff -u expect/planck_mit_1.json planck_mit_1.json') +exe('diff -u expect/planck_mit_2.json planck_mit_2.json') +exe('diff -u expect/planck_mit_3.json planck_mit_3.json') +exe('diff -u expect/planck_mit_4.json planck_mit_4.json') +exe('diff -u expect/planck_mit_5.json planck_mit_5.json') + if status: print('\nAll test were passed successfully!') sys.exit(0 if status else 1) From cf10455be87b886a60f09c1cb02f018bc0c8714b Mon Sep 17 00:00:00 2001 From: Yusuke Ohta <34795067+yskoht@users.noreply.github.com> Date: Mon, 21 Mar 2022 20:00:56 +0900 Subject: [PATCH 17/34] Refactoring (#81) * Refactoring * Fix --- README.md | 2 +- keymapviz/keyboards/planck/__init__.py | 37 +++++----- .../planck/layout_editor/default.json | 62 ---------------- .../keyboards/planck/layout_editor/grid.json | 15 ++-- .../keyboards/planck/layout_editor/mit.json | 17 +++-- test/expect/planck_default.c | 70 ------------------- test/expect/planck_default_0.json | 62 ---------------- test/expect/planck_default_1.json | 62 ---------------- test/expect/planck_default_2.json | 62 ---------------- test/expect/planck_default_3.json | 62 ---------------- test/expect/planck_default_4.json | 62 ---------------- test/expect/planck_default_5.json | 62 ---------------- test/expect/planck_default_6.json | 62 ---------------- test/expect/planck_default_fancy.c | 70 ------------------- test/expect/planck_grid_0.json | 15 ++-- test/expect/planck_grid_1.json | 15 ++-- test/expect/planck_grid_2.json | 15 ++-- test/expect/planck_grid_3.json | 13 ++-- test/expect/planck_grid_4.json | 13 ++-- test/expect/planck_grid_5.json | 13 ++-- test/expect/planck_grid_6.json | 7 +- test/expect/planck_mit_0.json | 17 +++-- test/expect/planck_mit_1.json | 17 +++-- test/expect/planck_mit_2.json | 17 +++-- test/expect/planck_mit_3.json | 17 +++-- test/expect/planck_mit_4.json | 17 +++-- test/expect/planck_mit_5.json | 15 ++-- test/expect/planck_mit_6.json | 15 ++-- test/expect/planck_mit_7.json | 17 +++-- test/expect/planck_mit_8.json | 17 +++-- test/expect/planck_mit_9.json | 17 +++-- test/test.py | 3 +- 32 files changed, 154 insertions(+), 813 deletions(-) delete mode 100644 keymapviz/keyboards/planck/layout_editor/default.json delete mode 100644 test/expect/planck_default.c delete mode 100644 test/expect/planck_default_0.json delete mode 100644 test/expect/planck_default_1.json delete mode 100644 test/expect/planck_default_2.json delete mode 100644 test/expect/planck_default_3.json delete mode 100644 test/expect/planck_default_4.json delete mode 100644 test/expect/planck_default_5.json delete mode 100644 test/expect/planck_default_6.json delete mode 100644 test/expect/planck_default_fancy.c diff --git a/README.md b/README.md index 6c1978c..37c3bc5 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Following keyboards are supported. - [dactyl_manuform5x6](https://github.com/qmk/qmk_firmware/tree/master/keyboards/handwired/dactyl_manuform/5x6) - [sofle](https://github.com/qmk/qmk_firmware/tree/master/keyboards/sofle) - [moonlander](https://github.com/qmk/qmk_firmware/tree/master/keyboards/moonlander) -- [planck](https://github.com/qmk/qmk_firmware/tree/master/keyboards/planck) (layout: `grid`, `mit`) +- [planck](https://github.com/qmk/qmk_firmware/tree/master/keyboards/planck) (layout: `default`(=`grid`), `mit`) - [dactyl_manuform6x6](https://github.com/qmk/qmk_firmware/tree/master/keyboards/handwired/dactyl_manuform/6x6) ## Install diff --git a/keymapviz/keyboards/planck/__init__.py b/keymapviz/keyboards/planck/__init__.py index c8b4099..f6067cd 100644 --- a/keymapviz/keyboards/planck/__init__.py +++ b/keymapviz/keyboards/planck/__init__.py @@ -1,26 +1,17 @@ # -*- coding: utf-8 -*- keymap_keyword = '(?:LAYOUT_planck_grid|LAYOUT_planck_mit|LAYOUT_ortho_4x12|LAYOUT_planck_1x2uC)' + +grid_json = 'keyboards/planck/layout_editor/grid.json' +mit_json = 'keyboards/planck/layout_editor/mit.json' + layout_editor_json = { - 'default': 'keyboards/planck/layout_editor/grid.json', - 'grid': 'keyboards/planck/layout_editor/grid.json', - 'mit': 'keyboards/planck/layout_editor/mit.json' + 'default': grid_json, + 'grid': grid_json, + 'mit': mit_json, } -ascii_art = { - 'default': ''' -/* ,-----------------------------------------------------------------------------------. - * |{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }| - * |------+------+------+------+------+-------------+------+------+------+------+------| - * |{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }| - * |------+------+------+------+------+-------------+------+------+------+------+------| - * |{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }| - * |------+------+------+------+------+-------------+------+------+------+------+------| - * |{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }| - * `-----------------------------------------------------------------------------------' - * generated by [keymapviz] */ -''', - 'grid': ''' +grid_ascii_art = ''' /* ,-----------------------------------------------------------------------------------. * |{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }| * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -31,8 +22,9 @@ * |{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }| * `-----------------------------------------------------------------------------------' * generated by [keymapviz] */ -''', - 'mit': ''' +''' + +mit_ascii_art = ''' /* ,-----------------------------------------------------------------------------------. * |{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }| * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -43,5 +35,10 @@ * |{ }|{ }|{ }|{ }|{ }| { } |{ }|{ }|{ }|{ }|{ }| * `-----------------------------------------------------------------------------------' * generated by [keymapviz] */ -''', +''' + +ascii_art = { + 'default': grid_ascii_art, + 'grid': grid_ascii_art, + 'mit': mit_ascii_art, } diff --git a/keymapviz/keyboards/planck/layout_editor/default.json b/keymapviz/keyboards/planck/layout_editor/default.json deleted file mode 100644 index b3da13d..0000000 --- a/keymapviz/keyboards/planck/layout_editor/default.json +++ /dev/null @@ -1,62 +0,0 @@ -[ - [ - { - "a": 7 - }, - "{0}", - "{1}", - "{2}", - "{3}", - "{4}", - "{5}", - "{6}", - "{7}", - "{8}", - "{9}", - "{10}", - "{11}", - "{12}" - ], - [ - "{13}", - "{14}", - "{15}", - "{16}", - "{17}", - "{18}", - "{19}", - "{20}", - "{21}", - "{22}", - "{23}", - "{24}" - ], - [ - "{25}", - "{26}", - "{27}", - "{28}", - "{29}", - "{30}", - "{31}", - "{32}", - "{33}", - "{34}", - "{35}", - "{36}" - ], - [ - "{37}", - "{38}", - "{39}", - "{40}", - "{41}", - "{42}", - "{43}", - "{44}", - "{45}", - "{46}", - "{47}", - "{48}" - ] -] diff --git a/keymapviz/keyboards/planck/layout_editor/grid.json b/keymapviz/keyboards/planck/layout_editor/grid.json index b3da13d..3526e44 100644 --- a/keymapviz/keyboards/planck/layout_editor/grid.json +++ b/keymapviz/keyboards/planck/layout_editor/grid.json @@ -14,10 +14,10 @@ "{8}", "{9}", "{10}", - "{11}", - "{12}" + "{11}" ], [ + "{12}", "{13}", "{14}", "{15}", @@ -28,10 +28,10 @@ "{20}", "{21}", "{22}", - "{23}", - "{24}" + "{23}" ], [ + "{24}", "{25}", "{26}", "{27}", @@ -42,10 +42,10 @@ "{32}", "{33}", "{34}", - "{35}", - "{36}" + "{35}" ], [ + "{36}", "{37}", "{38}", "{39}", @@ -56,7 +56,6 @@ "{44}", "{45}", "{46}", - "{47}", - "{48}" + "{47}" ] ] diff --git a/keymapviz/keyboards/planck/layout_editor/mit.json b/keymapviz/keyboards/planck/layout_editor/mit.json index e45084c..5ffb2f9 100644 --- a/keymapviz/keyboards/planck/layout_editor/mit.json +++ b/keymapviz/keyboards/planck/layout_editor/mit.json @@ -14,10 +14,10 @@ "{8}", "{9}", "{10}", - "{11}", - "{12}" + "{11}" ], [ + "{12}", "{13}", "{14}", "{15}", @@ -28,10 +28,10 @@ "{20}", "{21}", "{22}", - "{23}", - "{24}" + "{23}" ], [ + "{24}", "{25}", "{26}", "{27}", @@ -42,23 +42,22 @@ "{32}", "{33}", "{34}", - "{35}", - "{36}" + "{35}" ], [ + "{36}", "{37}", "{38}", "{39}", "{40}", - "{41}", { "w": 2 }, + "{41}", "{42}", "{43}", "{44}", "{45}", - "{46}", - "{47}" + "{46}" ] ] diff --git a/test/expect/planck_default.c b/test/expect/planck_default.c deleted file mode 100644 index a2ae7f2..0000000 --- a/test/expect/planck_default.c +++ /dev/null @@ -1,70 +0,0 @@ -/* ,-----------------------------------------------------------------------------------. - * | TAB | Q | W | E | R | T | Y | U | I | O | P | BSPC | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | ESC | A | S | D | F | G | H | J | K | L | SCLN | QUOT | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | LSFT | Z | X | C | V | B | N | M | COMM | DOT | SLSH | ENT | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * |BACKLI| LCTL | LALT | LGUI |LOWER | SPC | SPC |RAISE | LEFT | DOWN | UP | RGHT | - * `-----------------------------------------------------------------------------------' - * generated by [keymapviz] */ -/* ,-----------------------------------------------------------------------------------. - * | TAB | Q | W | F | P | G | J | L | U | Y | SCLN | BSPC | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | ESC | A | R | S | T | D | H | N | E | I | O | QUOT | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | LSFT | Z | X | C | V | B | K | M | COMM | DOT | SLSH | ENT | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * |BACKLI| LCTL | LALT | LGUI |LOWER | SPC | SPC |RAISE | LEFT | DOWN | UP | RGHT | - * `-----------------------------------------------------------------------------------' - * generated by [keymapviz] */ -/* ,-----------------------------------------------------------------------------------. - * | TAB | QUOT | COMM | DOT | P | Y | F | G | C | R | L | BSPC | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | ESC | A | O | E | U | I | D | H | T | N | S | SLSH | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | LSFT | SCLN | Q | J | K | X | B | M | W | V | Z | ENT | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * |BACKLI| LCTL | LALT | LGUI |LOWER | SPC | SPC |RAISE | LEFT | DOWN | UP | RGHT | - * `-----------------------------------------------------------------------------------' - * generated by [keymapviz] */ -/* ,-----------------------------------------------------------------------------------. - * | TILD | EXLM | AT | HASH | DLR | PERC | CIRC | AMPR | ASTR | LPRN | RPRN | BSPC | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | DEL | F1 | F2 | F3 | F4 | F5 | F6 | UNDS | PLUS | LCBR | RCBR | PIPE | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |S(KC_N|S(KC_N| HOME | END | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | | | MNXT | VOLD | VOLU | MPLY | - * `-----------------------------------------------------------------------------------' - * generated by [keymapviz] */ -/* ,-----------------------------------------------------------------------------------. - * | GRV | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BSPC | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | DEL | F1 | F2 | F3 | F4 | F5 | F6 | MINS | EQL | LBRC | RBRC | BSLS | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | NUHS | NUBS | PGUP | PGDN | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | | | MNXT | VOLD | VOLU | MPLY | - * `-----------------------------------------------------------------------------------' - * generated by [keymapviz] */ -/* ,-----------------------------------------------------------------------------------. - * | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | Q | W | E | R | T | Y | U | I | O | P | LBRC | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | A | S | D | F | G | H | J | K | L | SCLN | QUOT | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * |EXT_PL| | | C | V | | | N | M | | | | - * `-----------------------------------------------------------------------------------' - * generated by [keymapviz] */ -/* ,-----------------------------------------------------------------------------------. - * | |RESET |DEBUG |RGB_TO|RGB_MO|RGB_HU|RGB_HU|RGB_SA|RGB_SA|RGB_VA|RGB_VA| DEL | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | |MU_MOD|AU_ON |AU_OFF|AG_NOR|AG_SWA|QWERTY|COLEMA|DVORAK|PLOVER| | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | |MUV_DE|MUV_IN|MU_ON |MU_OFF|MI_ON |MI_OFF|TERM_O|TERM_O| | | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - * generated by [keymapviz] */ diff --git a/test/expect/planck_default_0.json b/test/expect/planck_default_0.json deleted file mode 100644 index 6480712..0000000 --- a/test/expect/planck_default_0.json +++ /dev/null @@ -1,62 +0,0 @@ -[ - [ - { - "a": 7 - }, - "TAB", - "Q", - "W", - "E", - "R", - "T", - "Y", - "U", - "I", - "O", - "P", - "BSPC", - "ESC" - ], - [ - "A", - "S", - "D", - "F", - "G", - "H", - "J", - "K", - "L", - "SCLN", - "QUOT", - "LSFT" - ], - [ - "Z", - "X", - "C", - "V", - "B", - "N", - "M", - "COMM", - "DOT", - "SLSH", - "ENT", - "BACKLIT" - ], - [ - "LCTL", - "LALT", - "LGUI", - "LOWER", - "SPC", - "SPC", - "RAISE", - "LEFT", - "DOWN", - "UP", - "RGHT", - "" - ] -] diff --git a/test/expect/planck_default_1.json b/test/expect/planck_default_1.json deleted file mode 100644 index 21fb0ef..0000000 --- a/test/expect/planck_default_1.json +++ /dev/null @@ -1,62 +0,0 @@ -[ - [ - { - "a": 7 - }, - "TAB", - "Q", - "W", - "F", - "P", - "G", - "J", - "L", - "U", - "Y", - "SCLN", - "BSPC", - "ESC" - ], - [ - "A", - "R", - "S", - "T", - "D", - "H", - "N", - "E", - "I", - "O", - "QUOT", - "LSFT" - ], - [ - "Z", - "X", - "C", - "V", - "B", - "K", - "M", - "COMM", - "DOT", - "SLSH", - "ENT", - "BACKLIT" - ], - [ - "LCTL", - "LALT", - "LGUI", - "LOWER", - "SPC", - "SPC", - "RAISE", - "LEFT", - "DOWN", - "UP", - "RGHT", - "" - ] -] diff --git a/test/expect/planck_default_2.json b/test/expect/planck_default_2.json deleted file mode 100644 index 6cdc0ab..0000000 --- a/test/expect/planck_default_2.json +++ /dev/null @@ -1,62 +0,0 @@ -[ - [ - { - "a": 7 - }, - "TAB", - "QUOT", - "COMM", - "DOT", - "P", - "Y", - "F", - "G", - "C", - "R", - "L", - "BSPC", - "ESC" - ], - [ - "A", - "O", - "E", - "U", - "I", - "D", - "H", - "T", - "N", - "S", - "SLSH", - "LSFT" - ], - [ - "SCLN", - "Q", - "J", - "K", - "X", - "B", - "M", - "W", - "V", - "Z", - "ENT", - "BACKLIT" - ], - [ - "LCTL", - "LALT", - "LGUI", - "LOWER", - "SPC", - "SPC", - "RAISE", - "LEFT", - "DOWN", - "UP", - "RGHT", - "" - ] -] diff --git a/test/expect/planck_default_3.json b/test/expect/planck_default_3.json deleted file mode 100644 index 6d75fd2..0000000 --- a/test/expect/planck_default_3.json +++ /dev/null @@ -1,62 +0,0 @@ -[ - [ - { - "a": 7 - }, - "TILD", - "EXLM", - "AT", - "HASH", - "DLR", - "PERC", - "CIRC", - "AMPR", - "ASTR", - "LPRN", - "RPRN", - "BSPC", - "DEL" - ], - [ - "F1", - "F2", - "F3", - "F4", - "F5", - "F6", - "UNDS", - "PLUS", - "LCBR", - "RCBR", - "PIPE", - "" - ], - [ - "F7", - "F8", - "F9", - "F10", - "F11", - "F12", - "S(KC_NUHS)", - "S(KC_NUBS)", - "HOME", - "END", - "", - "" - ], - [ - "", - "", - "", - "", - "", - "", - "", - "MNXT", - "VOLD", - "VOLU", - "MPLY", - "" - ] -] diff --git a/test/expect/planck_default_4.json b/test/expect/planck_default_4.json deleted file mode 100644 index a625716..0000000 --- a/test/expect/planck_default_4.json +++ /dev/null @@ -1,62 +0,0 @@ -[ - [ - { - "a": 7 - }, - "GRV", - "1", - "2", - "3", - "4", - "5", - "6", - "7", - "8", - "9", - "0", - "BSPC", - "DEL" - ], - [ - "F1", - "F2", - "F3", - "F4", - "F5", - "F6", - "MINS", - "EQL", - "LBRC", - "RBRC", - "BSLS", - "" - ], - [ - "F7", - "F8", - "F9", - "F10", - "F11", - "F12", - "NUHS", - "NUBS", - "PGUP", - "PGDN", - "", - "" - ], - [ - "", - "", - "", - "", - "", - "", - "", - "MNXT", - "VOLD", - "VOLU", - "MPLY", - "" - ] -] diff --git a/test/expect/planck_default_5.json b/test/expect/planck_default_5.json deleted file mode 100644 index 732b066..0000000 --- a/test/expect/planck_default_5.json +++ /dev/null @@ -1,62 +0,0 @@ -[ - [ - { - "a": 7 - }, - "1", - "1", - "1", - "1", - "1", - "1", - "1", - "1", - "1", - "1", - "1", - "1", - "" - ], - [ - "Q", - "W", - "E", - "R", - "T", - "Y", - "U", - "I", - "O", - "P", - "LBRC", - "" - ], - [ - "A", - "S", - "D", - "F", - "G", - "H", - "J", - "K", - "L", - "SCLN", - "QUOT", - "EXT_PLV" - ], - [ - "", - "", - "C", - "V", - "", - "", - "N", - "M", - "", - "", - "", - "" - ] -] diff --git a/test/expect/planck_default_6.json b/test/expect/planck_default_6.json deleted file mode 100644 index b7cbc82..0000000 --- a/test/expect/planck_default_6.json +++ /dev/null @@ -1,62 +0,0 @@ -[ - [ - { - "a": 7 - }, - "", - "RESET", - "DEBUG", - "RGB_TOG", - "RGB_MOD", - "RGB_HUI", - "RGB_HUD", - "RGB_SAI", - "RGB_SAD", - "RGB_VAI", - "RGB_VAD", - "DEL", - "" - ], - [ - "", - "MU_MOD", - "AU_ON", - "AU_OFF", - "AG_NORM", - "AG_SWAP", - "QWERTY", - "COLEMAK", - "DVORAK", - "PLOVER", - "", - "" - ], - [ - "MUV_DE", - "MUV_IN", - "MU_ON", - "MU_OFF", - "MI_ON", - "MI_OFF", - "TERM_ON", - "TERM_OFF", - "", - "", - "", - "" - ], - [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] -] diff --git a/test/expect/planck_default_fancy.c b/test/expect/planck_default_fancy.c deleted file mode 100644 index 3ca56a4..0000000 --- a/test/expect/planck_default_fancy.c +++ /dev/null @@ -1,70 +0,0 @@ -/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ - * │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ BSPC │ - * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ - * │ ESC │ A │ S │ D │ F │ G │ H │ J │ K │ L │ SCLN │ QUOT │ - * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ - * │ LSFT │ Z │ X │ C │ V │ B │ N │ M │ COMM │ DOT │ SLSH │ ENT │ - * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ - * │BACKLI│ LCTL │ LALT │ LGUI │LOWER │ SPC │ SPC │RAISE │ LEFT │ DOWN │ UP │ RGHT │ - * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ - * generated by [keymapviz] */ -/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ - * │ TAB │ Q │ W │ F │ P │ G │ J │ L │ U │ Y │ SCLN │ BSPC │ - * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ - * │ ESC │ A │ R │ S │ T │ D │ H │ N │ E │ I │ O │ QUOT │ - * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ - * │ LSFT │ Z │ X │ C │ V │ B │ K │ M │ COMM │ DOT │ SLSH │ ENT │ - * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ - * │BACKLI│ LCTL │ LALT │ LGUI │LOWER │ SPC │ SPC │RAISE │ LEFT │ DOWN │ UP │ RGHT │ - * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ - * generated by [keymapviz] */ -/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ - * │ TAB │ QUOT │ COMM │ DOT │ P │ Y │ F │ G │ C │ R │ L │ BSPC │ - * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ - * │ ESC │ A │ O │ E │ U │ I │ D │ H │ T │ N │ S │ SLSH │ - * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ - * │ LSFT │ SCLN │ Q │ J │ K │ X │ B │ M │ W │ V │ Z │ ENT │ - * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ - * │BACKLI│ LCTL │ LALT │ LGUI │LOWER │ SPC │ SPC │RAISE │ LEFT │ DOWN │ UP │ RGHT │ - * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ - * generated by [keymapviz] */ -/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ - * │ TILD │ EXLM │ AT │ HASH │ DLR │ PERC │ CIRC │ AMPR │ ASTR │ LPRN │ RPRN │ BSPC │ - * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ - * │ DEL │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ UNDS │ PLUS │ LCBR │ RCBR │ PIPE │ - * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ - * │ │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │S(KC_N│S(KC_N│ HOME │ END │ │ - * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ - * │ │ │ │ │ │ │ │ │ MNXT │ VOLD │ VOLU │ MPLY │ - * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ - * generated by [keymapviz] */ -/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ - * │ GRV │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ BSPC │ - * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ - * │ DEL │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ MINS │ EQL │ LBRC │ RBRC │ BSLS │ - * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ - * │ │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ NUHS │ NUBS │ PGUP │ PGDN │ │ - * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ - * │ │ │ │ │ │ │ │ │ MNXT │ VOLD │ VOLU │ MPLY │ - * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ - * generated by [keymapviz] */ -/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ - * │ 1 │ 1 │ 1 │ 1 │ 1 │ 1 │ 1 │ 1 │ 1 │ 1 │ 1 │ 1 │ - * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ - * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ LBRC │ - * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ - * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ SCLN │ QUOT │ - * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ - * │EXT_PL│ │ │ C │ V │ │ │ N │ M │ │ │ │ - * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ - * generated by [keymapviz] */ -/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ - * │ │RESET │DEBUG │RGB_TO│RGB_MO│RGB_HU│RGB_HU│RGB_SA│RGB_SA│RGB_VA│RGB_VA│ DEL │ - * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ - * │ │ │MU_MOD│AU_ON │AU_OFF│AG_NOR│AG_SWA│QWERTY│COLEMA│DVORAK│PLOVER│ │ - * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ - * │ │MUV_DE│MUV_IN│MU_ON │MU_OFF│MI_ON │MI_OFF│TERM_O│TERM_O│ │ │ │ - * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ - * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ - * generated by [keymapviz] */ diff --git a/test/expect/planck_grid_0.json b/test/expect/planck_grid_0.json index 6480712..78f2953 100644 --- a/test/expect/planck_grid_0.json +++ b/test/expect/planck_grid_0.json @@ -14,10 +14,10 @@ "I", "O", "P", - "BSPC", - "ESC" + "BSPC" ], [ + "ESC", "A", "S", "D", @@ -28,10 +28,10 @@ "K", "L", "SCLN", - "QUOT", - "LSFT" + "QUOT" ], [ + "LSFT", "Z", "X", "C", @@ -42,10 +42,10 @@ "COMM", "DOT", "SLSH", - "ENT", - "BACKLIT" + "ENT" ], [ + "BACKLIT", "LCTL", "LALT", "LGUI", @@ -56,7 +56,6 @@ "LEFT", "DOWN", "UP", - "RGHT", - "" + "RGHT" ] ] diff --git a/test/expect/planck_grid_1.json b/test/expect/planck_grid_1.json index 21fb0ef..862ad4e 100644 --- a/test/expect/planck_grid_1.json +++ b/test/expect/planck_grid_1.json @@ -14,10 +14,10 @@ "U", "Y", "SCLN", - "BSPC", - "ESC" + "BSPC" ], [ + "ESC", "A", "R", "S", @@ -28,10 +28,10 @@ "E", "I", "O", - "QUOT", - "LSFT" + "QUOT" ], [ + "LSFT", "Z", "X", "C", @@ -42,10 +42,10 @@ "COMM", "DOT", "SLSH", - "ENT", - "BACKLIT" + "ENT" ], [ + "BACKLIT", "LCTL", "LALT", "LGUI", @@ -56,7 +56,6 @@ "LEFT", "DOWN", "UP", - "RGHT", - "" + "RGHT" ] ] diff --git a/test/expect/planck_grid_2.json b/test/expect/planck_grid_2.json index 6cdc0ab..e0d1d6a 100644 --- a/test/expect/planck_grid_2.json +++ b/test/expect/planck_grid_2.json @@ -14,10 +14,10 @@ "C", "R", "L", - "BSPC", - "ESC" + "BSPC" ], [ + "ESC", "A", "O", "E", @@ -28,10 +28,10 @@ "T", "N", "S", - "SLSH", - "LSFT" + "SLSH" ], [ + "LSFT", "SCLN", "Q", "J", @@ -42,10 +42,10 @@ "W", "V", "Z", - "ENT", - "BACKLIT" + "ENT" ], [ + "BACKLIT", "LCTL", "LALT", "LGUI", @@ -56,7 +56,6 @@ "LEFT", "DOWN", "UP", - "RGHT", - "" + "RGHT" ] ] diff --git a/test/expect/planck_grid_3.json b/test/expect/planck_grid_3.json index 6d75fd2..2df5380 100644 --- a/test/expect/planck_grid_3.json +++ b/test/expect/planck_grid_3.json @@ -14,10 +14,10 @@ "ASTR", "LPRN", "RPRN", - "BSPC", - "DEL" + "BSPC" ], [ + "DEL", "F1", "F2", "F3", @@ -28,10 +28,10 @@ "PLUS", "LCBR", "RCBR", - "PIPE", - "" + "PIPE" ], [ + "", "F7", "F8", "F9", @@ -42,7 +42,6 @@ "S(KC_NUBS)", "HOME", "END", - "", "" ], [ @@ -53,10 +52,10 @@ "", "", "", + "", "MNXT", "VOLD", "VOLU", - "MPLY", - "" + "MPLY" ] ] diff --git a/test/expect/planck_grid_4.json b/test/expect/planck_grid_4.json index a625716..aa6814f 100644 --- a/test/expect/planck_grid_4.json +++ b/test/expect/planck_grid_4.json @@ -14,10 +14,10 @@ "8", "9", "0", - "BSPC", - "DEL" + "BSPC" ], [ + "DEL", "F1", "F2", "F3", @@ -28,10 +28,10 @@ "EQL", "LBRC", "RBRC", - "BSLS", - "" + "BSLS" ], [ + "", "F7", "F8", "F9", @@ -42,7 +42,6 @@ "NUBS", "PGUP", "PGDN", - "", "" ], [ @@ -53,10 +52,10 @@ "", "", "", + "", "MNXT", "VOLD", "VOLU", - "MPLY", - "" + "MPLY" ] ] diff --git a/test/expect/planck_grid_5.json b/test/expect/planck_grid_5.json index 732b066..feac907 100644 --- a/test/expect/planck_grid_5.json +++ b/test/expect/planck_grid_5.json @@ -14,10 +14,10 @@ "1", "1", "1", - "1", - "" + "1" ], [ + "", "Q", "W", "E", @@ -28,10 +28,10 @@ "I", "O", "P", - "LBRC", - "" + "LBRC" ], [ + "", "A", "S", "D", @@ -42,10 +42,10 @@ "K", "L", "SCLN", - "QUOT", - "EXT_PLV" + "QUOT" ], [ + "EXT_PLV", "", "", "C", @@ -56,7 +56,6 @@ "M", "", "", - "", "" ] ] diff --git a/test/expect/planck_grid_6.json b/test/expect/planck_grid_6.json index b7cbc82..e0c5943 100644 --- a/test/expect/planck_grid_6.json +++ b/test/expect/planck_grid_6.json @@ -14,10 +14,10 @@ "RGB_SAD", "RGB_VAI", "RGB_VAD", - "DEL", - "" + "DEL" ], [ + "", "", "MU_MOD", "AU_ON", @@ -28,10 +28,10 @@ "COLEMAK", "DVORAK", "PLOVER", - "", "" ], [ + "", "MUV_DE", "MUV_IN", "MU_ON", @@ -42,7 +42,6 @@ "TERM_OFF", "", "", - "", "" ], [ diff --git a/test/expect/planck_mit_0.json b/test/expect/planck_mit_0.json index 5c65d24..2248ea6 100644 --- a/test/expect/planck_mit_0.json +++ b/test/expect/planck_mit_0.json @@ -14,10 +14,10 @@ "I", "O", "P", - "BSPC", - "LT(_TABULA,KC_TAB)" + "BSPC" ], [ + "LT(_TABULA,KC_TAB)", "A", "S", "D", @@ -28,10 +28,10 @@ "K", "L", "SCLN", - "QUOT", - "TD(TD_LSHFT_CAPS)" + "QUOT" ], [ + "TD(TD_LSHFT_CAPS)", "Z", "X", "C", @@ -42,23 +42,22 @@ "COMM", "DOT", "SLSH", - "SFTENT", - "TD(TD_LCTL_STICKY)" + "SFTENT" ], [ + "TD(TD_LCTL_STICKY)", "LEAD", "LGUI", "TD(TD_LALT_STICKY)", "MO(_SYMBLS)", - "SPC", { "w": 2 }, + "SPC", "MO(_NUMBRS)", "LEFT", "DOWN", "UP", - "RGHT", - "" + "RGHT" ] ] diff --git a/test/expect/planck_mit_1.json b/test/expect/planck_mit_1.json index f10dcc7..2facdc0 100644 --- a/test/expect/planck_mit_1.json +++ b/test/expect/planck_mit_1.json @@ -14,10 +14,10 @@ "U", "Y", "SCLN", - "BSPC", - "LT(_TABULA,KC_TAB)" + "BSPC" ], [ + "LT(_TABULA,KC_TAB)", "A", "R", "S", @@ -28,10 +28,10 @@ "E", "I", "O", - "QUOT", - "TD(TD_LSHFT_CAPS)" + "QUOT" ], [ + "TD(TD_LSHFT_CAPS)", "Z", "X", "C", @@ -42,23 +42,22 @@ "COMM", "DOT", "SLSH", - "SFTENT", - "TD(TD_LCTL_STICKY)" + "SFTENT" ], [ + "TD(TD_LCTL_STICKY)", "LEAD", "LGUI", "TD(TD_LALT_STICKY)", "MO(_SYMBLS)", - "SPC", { "w": 2 }, + "SPC", "MO(_NUMBRS)", "LEFT", "DOWN", "UP", - "RGHT", - "" + "RGHT" ] ] diff --git a/test/expect/planck_mit_2.json b/test/expect/planck_mit_2.json index df24c7c..499a9d7 100644 --- a/test/expect/planck_mit_2.json +++ b/test/expect/planck_mit_2.json @@ -14,10 +14,10 @@ "C", "R", "L", - "BSPC", - "LT(_TABULA,KC_TAB)" + "BSPC" ], [ + "LT(_TABULA,KC_TAB)", "A", "O", "E", @@ -28,10 +28,10 @@ "T", "", "S", - "SLSH", - "TD(TD_LSHFT_CAPS)" + "SLSH" ], [ + "TD(TD_LSHFT_CAPS)", "SCLN", "Q", "J", @@ -42,23 +42,22 @@ "W", "V", "Z", - "SFTENT", - "TD(TD_LCTL_STICKY)" + "SFTENT" ], [ + "TD(TD_LCTL_STICKY)", "LEAD", "LGUI", "TD(TD_LALT_STICKY)", "MO(_SYMBLS)", - "SPC", { "w": 2 }, + "SPC", "MO(_NUMBRS)", "LEFT", "DOWN", "UP", - "RGHT", - "" + "RGHT" ] ] diff --git a/test/expect/planck_mit_3.json b/test/expect/planck_mit_3.json index 63ec30b..fe62604 100644 --- a/test/expect/planck_mit_3.json +++ b/test/expect/planck_mit_3.json @@ -14,10 +14,10 @@ "ASTR", "LPRN", "RPRN", - "BSPC", - "DEL" + "BSPC" ], [ + "DEL", "F1", "F2", "F3", @@ -28,10 +28,10 @@ "PLUS", "LCBR", "RCBR", - "PIPE", - "" + "PIPE" ], [ + "", "F7", "F8", "F9", @@ -42,23 +42,22 @@ "LSFT(KC_LCTL)", "HOME", "END", - "", - "TG(_NUMPD)" + "" ], [ + "TG(_NUMPD)", "", "", "", "TO(_BASE)", - "", { "w": 2 }, "", + "", "MNXT", "VOLD", "VOLU", - "MPLY", - "" + "MPLY" ] ] diff --git a/test/expect/planck_mit_4.json b/test/expect/planck_mit_4.json index 0a0a4fd..d7b6cd8 100644 --- a/test/expect/planck_mit_4.json +++ b/test/expect/planck_mit_4.json @@ -14,10 +14,10 @@ "8", "9", "0", - "BSPC", - "DEL" + "BSPC" ], [ + "DEL", "F1", "F2", "F3", @@ -28,10 +28,10 @@ "EQL", "LBRC", "RBRC", - "BSLS", - "" + "BSLS" ], [ + "", "F7", "F8", "F9", @@ -42,11 +42,10 @@ "NUBS", "PGUP", "PGDN", - "", - "TG(_NUMPD)" + "" ], [ - "", + "TG(_NUMPD)", "", "", "", @@ -54,11 +53,11 @@ { "w": 2 }, + "", "TO(_BASE)", "MNXT", "VOLD", "VOLU", - "MPLY", - "" + "MPLY" ] ] diff --git a/test/expect/planck_mit_5.json b/test/expect/planck_mit_5.json index 997b191..8171a19 100644 --- a/test/expect/planck_mit_5.json +++ b/test/expect/planck_mit_5.json @@ -14,10 +14,10 @@ "1", "1", "1", - "1", - "" + "1" ], [ + "", "Q", "W", "E", @@ -28,10 +28,10 @@ "I", "O", "P", - "LBRC", - "" + "LBRC" ], [ + "", "A", "S", "D", @@ -42,23 +42,22 @@ "K", "L", "SCLN", - "QUOT", - "EXT_PLV" + "QUOT" ], [ + "EXT_PLV", "", "", "C", "V", - "", { "w": 2 }, + "", "N", "M", "", "", - "", "" ] ] diff --git a/test/expect/planck_mit_6.json b/test/expect/planck_mit_6.json index 00b5074..9b737cd 100644 --- a/test/expect/planck_mit_6.json +++ b/test/expect/planck_mit_6.json @@ -14,10 +14,10 @@ "RGB_SAD", "TD(TD_DEG_DEGF)", "TD(TD_SMILEY)", - "DEL", - "RGB_VAI" + "DEL" ], [ + "RGB_VAI", "RGB_VAD", "MU_MOD", "AU_ON", @@ -28,10 +28,10 @@ "DF(_COLEMAK)", "DF(_DVORAK)", "TO(_PLOVER)", - "MY_RGBCON", - "" + "MY_RGBCON" ], [ + "", "MUV_DE", "MUV_IN", "MU_ON", @@ -42,19 +42,18 @@ "TERM_OFF", "CK_ON", "CK_OFF", - "ENTER", - "" + "ENTER" ], [ "", "", "", "", - "TG(_MOUSY)", + "", { "w": 2 }, - "", + "TG(_MOUSY)", "", "", "", diff --git a/test/expect/planck_mit_7.json b/test/expect/planck_mit_7.json index febbed7..ba1a8a4 100644 --- a/test/expect/planck_mit_7.json +++ b/test/expect/planck_mit_7.json @@ -14,10 +14,10 @@ "P7", "P8", "P9", - "BSPC", - "TILD" + "BSPC" ], [ + "TILD", "LEFT", "DOWN", "RGHT", @@ -28,10 +28,10 @@ "P4", "P5", "P6", - "PMNS", - "LSFT" + "PMNS" ], [ + "LSFT", "SLSH", "CUT", "COPY", @@ -42,23 +42,22 @@ "P1", "P2", "P3", - "PPLS", - "TO(_BASE)" + "PPLS" ], [ + "TO(_BASE)", "LEAD", "LGUI", "LALT", "LCPO", - "SPC", { "w": 2 }, + "SPC", "RCPC", "HASH", "P0", "PDOT", - "PENT", - "" + "PENT" ] ] diff --git a/test/expect/planck_mit_8.json b/test/expect/planck_mit_8.json index eb11b52..e3e2a8f 100644 --- a/test/expect/planck_mit_8.json +++ b/test/expect/planck_mit_8.json @@ -14,10 +14,10 @@ "UC_M_WC", "CG_TOGG", "AG_TOGG", - "DLINE", - "NXTAB" + "DLINE" ], [ + "NXTAB", "SLCTALL", "SAVE", "", @@ -28,10 +28,10 @@ "LCUT", "LCOPY", "", - "KILL", - "LSFT" + "KILL" ], [ + "LSFT", "UNDO", "CUT", "COPY", @@ -42,23 +42,22 @@ "", "HOME", "END", - "SFTENT", - "TO(_BASE)" + "SFTENT" ], [ + "TO(_BASE)", "LCTL", "LGUI", "LALT", "LSPO", - "ALT_TAB", { "w": 2 }, + "ALT_TAB", "RSPC", "PRVWD", "BRID", "BRIU", - "NXTWD", - "" + "NXTWD" ] ] diff --git a/test/expect/planck_mit_9.json b/test/expect/planck_mit_9.json index 3495661..84b0113 100644 --- a/test/expect/planck_mit_9.json +++ b/test/expect/planck_mit_9.json @@ -14,10 +14,10 @@ "UC_M_WC", "CG_TOGG", "AG_TOGG", - "BSPC", - "TAB" + "BSPC" ], [ + "TAB", "MS_L", "MS_D", "MS_R", @@ -28,10 +28,10 @@ "VLK_TOG", "", "", - "", - "LSFT" + "" ], [ + "LSFT", "UNDO", "CUT", "COPY", @@ -42,23 +42,22 @@ "HOME", "BTN3", "END", - "SFTENT", - "TO(_BASE)" + "SFTENT" ], [ + "TO(_BASE)", "LCTL", "LGUI", "LALT", "BTN1", - "ALT_TAB", { "w": 2 }, + "ALT_TAB", "BTN2", "WH_L", "WH_D", "WH_U", - "WH_R", - "" + "WH_R" ] ] diff --git a/test/test.py b/test/test.py index ced5068..6ffaa48 100644 --- a/test/test.py +++ b/test/test.py @@ -240,7 +240,6 @@ def exe(cmd): exe('diff -u expect/planck_grid_4.json planck_default_4.json') exe('diff -u expect/planck_grid_5.json planck_default_5.json') - exe('keymapviz ./qmk_firmware/keyboards/planck/keymaps/default/keymap.c -o planck_grid.c -l grid') exe('keymapviz ./qmk_firmware/keyboards/planck/keymaps/default/keymap.c -o planck_grid_fancy.c -t fancy -l grid') exe('keymapviz ./qmk_firmware/keyboards/planck/keymaps/default/keymap.c -o planck_grid_{}.json -t json -l grid') @@ -269,5 +268,5 @@ def exe(cmd): exe('diff -u expect/planck_mit_5.json planck_mit_5.json') if status: - print('\nAll test were passed successfully!') + print('\nAll tests were passed successfully!') sys.exit(0 if status else 1) From d8a792a00f6873bec2703e71bc1e9b03aa396687 Mon Sep 17 00:00:00 2001 From: yskoht Date: Mon, 21 Mar 2022 20:02:40 +0900 Subject: [PATCH 18/34] Update version --- keymapviz/keymapviz.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keymapviz/keymapviz.py b/keymapviz/keymapviz.py index 8932dcd..481c9a4 100755 --- a/keymapviz/keymapviz.py +++ b/keymapviz/keymapviz.py @@ -9,7 +9,7 @@ from keymapviz.legends import * -VERSION = 'v1.11.0' +VERSION = 'v1.12.0' TYPES = { 'ascii': 'ascii_art', diff --git a/setup.py b/setup.py index d717d84..4006f65 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ def search_json_files(): setup( name='keymapviz', - version='1.11.0', + version='1.12.0', description='keymap.c visualizer', long_description=long_description, long_description_content_type='text/markdown', From 2165793ee7fc4e0bd19343065187680e1fc39a38 Mon Sep 17 00:00:00 2001 From: asyncee Date: Mon, 19 Sep 2022 22:46:42 +0300 Subject: [PATCH 19/34] Add support for id75 keyboard --- keymapviz/__init__.py | 2 + keymapviz/keyboards/id75/__init__.py | 30 ++++++ .../keyboards/id75/layout_editor/grid.json | 91 +++++++++++++++++++ .../keyboards/id75/layout_editor/mit.json | 63 +++++++++++++ 4 files changed, 186 insertions(+) create mode 100644 keymapviz/keyboards/id75/__init__.py create mode 100644 keymapviz/keyboards/id75/layout_editor/grid.json create mode 100644 keymapviz/keyboards/id75/layout_editor/mit.json diff --git a/keymapviz/__init__.py b/keymapviz/__init__.py index 753b619..5eddc7b 100644 --- a/keymapviz/__init__.py +++ b/keymapviz/__init__.py @@ -25,6 +25,7 @@ import keymapviz.keyboards.moonlander import keymapviz.keyboards.planck import keymapviz.keyboards.dactyl_manuform6x6 +import keymapviz.keyboards.id75 KEYBOARDS = { @@ -48,6 +49,7 @@ 'moonlander': keymapviz.keyboards.moonlander, 'planck': keymapviz.keyboards.planck, 'dactyl_manuform6x6': keymapviz.keyboards.dactyl_manuform6x6, + 'id75': keymapviz.keyboards.id75, } diff --git a/keymapviz/keyboards/id75/__init__.py b/keymapviz/keyboards/id75/__init__.py new file mode 100644 index 0000000..d0f8e89 --- /dev/null +++ b/keymapviz/keyboards/id75/__init__.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- + +keymap_keyword = "(?:LAYOUT_ortho_5x15)" + +grid_json = "keyboards/planck/layout_editor/grid.json" + +layout_editor_json = { + "default": grid_json, + "grid": grid_json, +} + +grid_ascii_art = """ +/* ,--------------------------------------------------------------------------------------------------------. + * |{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }| + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * |{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }| + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * |{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }| + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * |{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }| + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * |{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }| + * `--------------------------------------------------------------------------------------------------------' + * generated by [keymapviz] */ +""" + +ascii_art = { + "default": grid_ascii_art, + "grid": grid_ascii_art, +} diff --git a/keymapviz/keyboards/id75/layout_editor/grid.json b/keymapviz/keyboards/id75/layout_editor/grid.json new file mode 100644 index 0000000..05a782e --- /dev/null +++ b/keymapviz/keyboards/id75/layout_editor/grid.json @@ -0,0 +1,91 @@ +[ + [ + { + "a": 7 + }, + "{0}", + "{1}", + "{2}", + "{3}", + "{4}", + "{5}", + "{6}", + "{7}", + "{8}", + "{9}", + "{10}", + "{11}", + "{12}", + "{13}", + "{14}" + ], + [ + "{15}", + "{16}", + "{17}", + "{18}", + "{19}", + "{20}", + "{21}", + "{22}", + "{23}", + "{24}", + "{25}", + "{26}", + "{27}", + "{28}", + "{29}" + ], + [ + "{30}", + "{31}", + "{32}", + "{33}", + "{34}", + "{35}", + "{36}", + "{37}", + "{38}", + "{39}", + "{40}", + "{41}", + "{42}", + "{43}", + "{44}", + "{45}" + ], + [ + "{46}", + "{47}", + "{48}", + "{49}", + "{50}", + "{51}", + "{52}", + "{53}", + "{54}", + "{55}", + "{56}", + "{57}", + "{58}", + "{59}", + "{60}" + ], + [ + "{61}", + "{62}", + "{63}", + "{64}", + "{65}", + "{66}", + "{67}", + "{68}", + "{69}", + "{70}", + "{71}", + "{72}", + "{73}", + "{74}", + "{75}" + ], +] diff --git a/keymapviz/keyboards/id75/layout_editor/mit.json b/keymapviz/keyboards/id75/layout_editor/mit.json new file mode 100644 index 0000000..5ffb2f9 --- /dev/null +++ b/keymapviz/keyboards/id75/layout_editor/mit.json @@ -0,0 +1,63 @@ +[ + [ + { + "a": 7 + }, + "{0}", + "{1}", + "{2}", + "{3}", + "{4}", + "{5}", + "{6}", + "{7}", + "{8}", + "{9}", + "{10}", + "{11}" + ], + [ + "{12}", + "{13}", + "{14}", + "{15}", + "{16}", + "{17}", + "{18}", + "{19}", + "{20}", + "{21}", + "{22}", + "{23}" + ], + [ + "{24}", + "{25}", + "{26}", + "{27}", + "{28}", + "{29}", + "{30}", + "{31}", + "{32}", + "{33}", + "{34}", + "{35}" + ], + [ + "{36}", + "{37}", + "{38}", + "{39}", + "{40}", + { + "w": 2 + }, + "{41}", + "{42}", + "{43}", + "{44}", + "{45}", + "{46}" + ] +] From 4e72b0a2223c8c003c915db54c7177cc2eeb6d34 Mon Sep 17 00:00:00 2001 From: yskoht Date: Sun, 25 Sep 2022 18:56:53 +0900 Subject: [PATCH 20/34] Fix id75 --- keymapviz/keyboards/id75/__init__.py | 18 ++---- .../layout_editor/{grid.json => default.json} | 13 ++-- .../keyboards/id75/layout_editor/mit.json | 63 ------------------- 3 files changed, 12 insertions(+), 82 deletions(-) rename keymapviz/keyboards/id75/layout_editor/{grid.json => default.json} (92%) delete mode 100644 keymapviz/keyboards/id75/layout_editor/mit.json diff --git a/keymapviz/keyboards/id75/__init__.py b/keymapviz/keyboards/id75/__init__.py index d0f8e89..4575997 100644 --- a/keymapviz/keyboards/id75/__init__.py +++ b/keymapviz/keyboards/id75/__init__.py @@ -1,15 +1,13 @@ # -*- coding: utf-8 -*- -keymap_keyword = "(?:LAYOUT_ortho_5x15)" - -grid_json = "keyboards/planck/layout_editor/grid.json" +keymap_keyword = '(?:LAYOUT_ortho_5x15)' layout_editor_json = { - "default": grid_json, - "grid": grid_json, + 'default': 'keyboards/id75/layout_editor/default.json' } -grid_ascii_art = """ +ascii_art = { + "default": ''' /* ,--------------------------------------------------------------------------------------------------------. * |{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }| * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| @@ -21,10 +19,6 @@ * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| * |{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }|{ }| * `--------------------------------------------------------------------------------------------------------' - * generated by [keymapviz] */ -""" - -ascii_art = { - "default": grid_ascii_art, - "grid": grid_ascii_art, + * generated by [keymapviz] */ +''', } diff --git a/keymapviz/keyboards/id75/layout_editor/grid.json b/keymapviz/keyboards/id75/layout_editor/default.json similarity index 92% rename from keymapviz/keyboards/id75/layout_editor/grid.json rename to keymapviz/keyboards/id75/layout_editor/default.json index 05a782e..8c0ec07 100644 --- a/keymapviz/keyboards/id75/layout_editor/grid.json +++ b/keymapviz/keyboards/id75/layout_editor/default.json @@ -51,10 +51,10 @@ "{41}", "{42}", "{43}", - "{44}", - "{45}" + "{44}" ], [ + "{45}", "{46}", "{47}", "{48}", @@ -68,10 +68,10 @@ "{56}", "{57}", "{58}", - "{59}", - "{60}" + "{59}" ], [ + "{60}", "{61}", "{62}", "{63}", @@ -85,7 +85,6 @@ "{71}", "{72}", "{73}", - "{74}", - "{75}" - ], + "{74}" + ] ] diff --git a/keymapviz/keyboards/id75/layout_editor/mit.json b/keymapviz/keyboards/id75/layout_editor/mit.json deleted file mode 100644 index 5ffb2f9..0000000 --- a/keymapviz/keyboards/id75/layout_editor/mit.json +++ /dev/null @@ -1,63 +0,0 @@ -[ - [ - { - "a": 7 - }, - "{0}", - "{1}", - "{2}", - "{3}", - "{4}", - "{5}", - "{6}", - "{7}", - "{8}", - "{9}", - "{10}", - "{11}" - ], - [ - "{12}", - "{13}", - "{14}", - "{15}", - "{16}", - "{17}", - "{18}", - "{19}", - "{20}", - "{21}", - "{22}", - "{23}" - ], - [ - "{24}", - "{25}", - "{26}", - "{27}", - "{28}", - "{29}", - "{30}", - "{31}", - "{32}", - "{33}", - "{34}", - "{35}" - ], - [ - "{36}", - "{37}", - "{38}", - "{39}", - "{40}", - { - "w": 2 - }, - "{41}", - "{42}", - "{43}", - "{44}", - "{45}", - "{46}" - ] -] From 55fe8a2e8ec12bbdff72655a209fcae2b1c46d17 Mon Sep 17 00:00:00 2001 From: yskoht Date: Sun, 25 Sep 2022 18:59:58 +0900 Subject: [PATCH 21/34] Fix README.md --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 37c3bc5..8290801 100644 --- a/README.md +++ b/README.md @@ -8,24 +8,25 @@ Keymapviz can convert keymap.c in [qmk_firmware](https://github.com/qmk/qmk_firm Following keyboards are supported. - [crkbd](https://github.com/qmk/qmk_firmware/tree/master/keyboards/crkbd) +- [dactyl_manuform5x6](https://github.com/qmk/qmk_firmware/tree/master/keyboards/handwired/dactyl_manuform/5x6) +- [dactyl_manuform6x6](https://github.com/qmk/qmk_firmware/tree/master/keyboards/handwired/dactyl_manuform/6x6) - [ergo42](https://github.com/qmk/qmk_firmware/tree/master/keyboards/ergo42) - [ergodash](https://github.com/qmk/qmk_firmware/tree/master/keyboards/ergodash) (layout: `default`, `2u_inner`) - [ergodone](https://github.com/qmk/qmk_firmware/tree/master/keyboards/ergodone)(ergodox) - [ergodox_ez](https://github.com/qmk/qmk_firmware/tree/master/keyboards/ergodox_ez)(ergodox) - [fortitude60](https://github.com/qmk/qmk_firmware/tree/master/keyboards/fortitude60) - [helix](https://github.com/qmk/qmk_firmware/tree/master/keyboards/helix) +- [id75](https://github.com/qmk/qmk_firmware/tree/master/keyboards/idobao/id75) - [kaishi65](https://github.com/qmk/qmk_firmware/tree/master/keyboards/kbdclack/kaishi65) - [kinesis](https://github.com/qmk/qmk_firmware/tree/master/keyboards/kinesis) - [kyria](https://github.com/qmk/qmk_firmware/tree/master/keyboards/splitkb/kyria) - [lets_split](https://github.com/qmk/qmk_firmware/tree/master/keyboards/lets_split) - [lily58](https://github.com/qmk/qmk_firmware/tree/master/keyboards/lily58) - [mint60](https://github.com/qmk/qmk_firmware/tree/master/keyboards/mint60) -- [sweet16](https://github.com/qmk/qmk_firmware/tree/master/keyboards/1upkeyboards/sweet16) -- [dactyl_manuform5x6](https://github.com/qmk/qmk_firmware/tree/master/keyboards/handwired/dactyl_manuform/5x6) -- [sofle](https://github.com/qmk/qmk_firmware/tree/master/keyboards/sofle) - [moonlander](https://github.com/qmk/qmk_firmware/tree/master/keyboards/moonlander) - [planck](https://github.com/qmk/qmk_firmware/tree/master/keyboards/planck) (layout: `default`(=`grid`), `mit`) -- [dactyl_manuform6x6](https://github.com/qmk/qmk_firmware/tree/master/keyboards/handwired/dactyl_manuform/6x6) +- [sofle](https://github.com/qmk/qmk_firmware/tree/master/keyboards/sofle) +- [sweet16](https://github.com/qmk/qmk_firmware/tree/master/keyboards/1upkeyboards/sweet16) ## Install From 5fc1a05b837135891831062fa640f83201b80630 Mon Sep 17 00:00:00 2001 From: yskoht Date: Sun, 25 Sep 2022 19:30:18 +0900 Subject: [PATCH 22/34] Fix crkbd test --- test/expect/crkbd.c | 2 +- test/expect/crkbd_3.json | 2 +- test/expect/crkbd_fancy.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/expect/crkbd.c b/test/expect/crkbd.c index 985c0cb..b4a8b1f 100644 --- a/test/expect/crkbd.c +++ b/test/expect/crkbd.c @@ -29,7 +29,7 @@ * `--------------------' `--------------------' * generated by [keymapviz] */ /* ,-----------------------------------------. ,-----------------------------------------. - * |RESET | | | | | | | | | | | | | + * |QK_BOO| | | | | | | | | | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| * |RGB_TO|RGB_HU|RGB_SA|RGB_VA| | | | | | | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| diff --git a/test/expect/crkbd_3.json b/test/expect/crkbd_3.json index 154b66d..141a677 100644 --- a/test/expect/crkbd_3.json +++ b/test/expect/crkbd_3.json @@ -33,7 +33,7 @@ { "y": -0.75 }, - "RESET", + "QK_BOOT", "", { "x": 3 diff --git a/test/expect/crkbd_fancy.c b/test/expect/crkbd_fancy.c index 9308d0d..1ab398b 100644 --- a/test/expect/crkbd_fancy.c +++ b/test/expect/crkbd_fancy.c @@ -29,7 +29,7 @@ * └──────┴──────┴──────┘ └──────┴──────┴──────┘ * generated by [keymapviz] */ /* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ - * │RESET │ │ │ │ │ │ │ │ │ │ │ │ │ + * │QK_BOO│ │ │ │ │ │ │ │ │ │ │ │ │ * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ * │RGB_TO│RGB_HU│RGB_SA│RGB_VA│ │ │ │ │ │ │ │ │ │ * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ From dae84600f54622aa56adf3dbd94ac72161684db8 Mon Sep 17 00:00:00 2001 From: yskoht Date: Sun, 25 Sep 2022 19:31:05 +0900 Subject: [PATCH 23/34] Fix ergo42 test --- test/expect/ergo42.c | 2 +- test/expect/ergo42_1.json | 2 +- test/expect/ergo42_fancy.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/expect/ergo42.c b/test/expect/ergo42.c index 2109979..dd3fb5d 100644 --- a/test/expect/ergo42.c +++ b/test/expect/ergo42.c @@ -12,7 +12,7 @@ * generated by [keymapviz] */ /* * ,------------------------------------------------. ,------------------------------------------------. - * |RESET | 1 | 2 | 3 | 4 | 5 | LBRC | | RBRC | 6 | 7 | 8 | 9 | 0 | | + * |QK_BOO| 1 | 2 | 3 | 4 | 5 | LBRC | | RBRC | 6 | 7 | 8 | 9 | 0 | | * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| * | | F1 | | MHEN | HENK | | | | LEFT | DOWN | UP | RGHT | | | | * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| diff --git a/test/expect/ergo42_1.json b/test/expect/ergo42_1.json index 39ed98f..b2443a7 100644 --- a/test/expect/ergo42_1.json +++ b/test/expect/ergo42_1.json @@ -3,7 +3,7 @@ { "a": 7 }, - "RESET", + "QK_BOOT", "1", "2", "3", diff --git a/test/expect/ergo42_fancy.c b/test/expect/ergo42_fancy.c index e102b68..a54c72e 100644 --- a/test/expect/ergo42_fancy.c +++ b/test/expect/ergo42_fancy.c @@ -12,7 +12,7 @@ * generated by [keymapviz] */ /* * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┐ - * │RESET │ 1 │ 2 │ 3 │ 4 │ 5 │ LBRC │ │ RBRC │ 6 │ 7 │ 8 │ 9 │ 0 │ │ + * │QK_BOO│ 1 │ 2 │ 3 │ 4 │ 5 │ LBRC │ │ RBRC │ 6 │ 7 │ 8 │ 9 │ 0 │ │ * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ * │ │ F1 │ │ MHEN │ HENK │ │ │ │ LEFT │ DOWN │ UP │ RGHT │ │ │ │ * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ From dea6fad7b45bd17f9d8108a43bfe61e53ad64186 Mon Sep 17 00:00:00 2001 From: yskoht Date: Sun, 25 Sep 2022 19:31:45 +0900 Subject: [PATCH 24/34] Fix ergodash test --- test/expect/ergodash.c | 2 +- test/expect/ergodash_3.json | 2 +- test/expect/ergodash_L2u_inner.c | 2 +- test/expect/ergodash_L2u_inner_3.json | 2 +- test/expect/ergodash_L2u_inner_fancy.c | 2 +- test/expect/ergodash_fancy.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/expect/ergodash.c b/test/expect/ergodash.c index ef41c73..1ac5d6a 100644 --- a/test/expect/ergodash.c +++ b/test/expect/ergodash.c @@ -41,7 +41,7 @@ * ,----------------------------------------------------------------------------------------------------------------------. * | | | | | | | | | | | | | | | | * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| - * | |RESET |RGB_TO|RGB_MO|RGB_HU|RGB_HU| | | |RGB_SA|RGB_SA|RGB_VA|RGB_VA| | | + * | |QK_BOO|RGB_TO|RGB_MO|RGB_HU|RGB_HU| | | |RGB_SA|RGB_SA|RGB_VA|RGB_VA| | | * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| * | | |BL_TOG|BL_BRT|BL_INC|BL_DEC| | | | | | | | | | * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| diff --git a/test/expect/ergodash_3.json b/test/expect/ergodash_3.json index 243c824..d30d709 100644 --- a/test/expect/ergodash_3.json +++ b/test/expect/ergodash_3.json @@ -101,7 +101,7 @@ "y": -0.75, "x": 1 }, - "RESET", + "QK_BOOT", { "x": 3 }, diff --git a/test/expect/ergodash_L2u_inner.c b/test/expect/ergodash_L2u_inner.c index 4f050b0..9bce8cb 100644 --- a/test/expect/ergodash_L2u_inner.c +++ b/test/expect/ergodash_L2u_inner.c @@ -46,7 +46,7 @@ /* ,-----------------------------------------------. ,-----------------------------------------------. * | | | | | | |-------. ,-------| | | | | | | * |-------+-------+-------+-------+-------+-------| | | |-------+-------+-------+-------+-------+-------| - * | | RESET |RGB_TOG|RGB_MOD|RGB_HUD|RGB_HUI|-------| |-------|RGB_SAD|RGB_SAI|RGB_VAD|RGB_VAI| | | + * | |QK_BOOT|RGB_TOG|RGB_MOD|RGB_HUD|RGB_HUI|-------| |-------|RGB_SAD|RGB_SAI|RGB_VAD|RGB_VAI| | | * |-------+-------+-------+-------+-------+-------| | | |-------+-------+-------+-------+-------+-------| * | | |BL_TOGG|BL_BRTG|BL_INC |BL_DEC |-------| |-------| | | | | | | * |-------+-------+-------+-------+-------+-------| | | |-------+-------+-------+-------+-------+-------| diff --git a/test/expect/ergodash_L2u_inner_3.json b/test/expect/ergodash_L2u_inner_3.json index 0acee65..1202418 100644 --- a/test/expect/ergodash_L2u_inner_3.json +++ b/test/expect/ergodash_L2u_inner_3.json @@ -32,7 +32,7 @@ "y": -0.5 }, "", - "RESET", + "QK_BOOT", "RGB_TOG", "RGB_MOD", "RGB_HUD", diff --git a/test/expect/ergodash_L2u_inner_fancy.c b/test/expect/ergodash_L2u_inner_fancy.c index f288fe6..5fa61c0 100644 --- a/test/expect/ergodash_L2u_inner_fancy.c +++ b/test/expect/ergodash_L2u_inner_fancy.c @@ -46,7 +46,7 @@ /* ┌───────┬───────┬───────┬───────┬───────┬───────┐ ┌───────┬───────┬───────┬───────┬───────┬───────┐ * │ │ │ │ │ │ ├───────┐ ┌───────┤ │ │ │ │ │ │ * ├───────┼───────┼───────┼───────┼───────┼───────┤ │ │ ├───────┼───────┼───────┼───────┼───────┼───────┤ - * │ │ RESET │RGB_TOG│RGB_MOD│RGB_HUD│RGB_HUI├───────┤ ├───────┤RGB_SAD│RGB_SAI│RGB_VAD│RGB_VAI│ │ │ + * │ │QK_BOOT│RGB_TOG│RGB_MOD│RGB_HUD│RGB_HUI├───────┤ ├───────┤RGB_SAD│RGB_SAI│RGB_VAD│RGB_VAI│ │ │ * ├───────┼───────┼───────┼───────┼───────┼───────┤ │ │ ├───────┼───────┼───────┼───────┼───────┼───────┤ * │ │ │BL_TOGG│BL_BRTG│BL_INC │BL_DEC ├───────┤ ├───────┤ │ │ │ │ │ │ * ├───────┼───────┼───────┼───────┼───────┼───────┤ │ │ ├───────┼───────┼───────┼───────┼───────┼───────┤ diff --git a/test/expect/ergodash_fancy.c b/test/expect/ergodash_fancy.c index ee0c34c..3c48a6c 100644 --- a/test/expect/ergodash_fancy.c +++ b/test/expect/ergodash_fancy.c @@ -41,7 +41,7 @@ * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬────────────────────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ - * │ │RESET │RGB_TO│RGB_MO│RGB_HU│RGB_HU│ │ │ │RGB_SA│RGB_SA│RGB_VA│RGB_VA│ │ │ + * │ │QK_BOO│RGB_TO│RGB_MO│RGB_HU│RGB_HU│ │ │ │RGB_SA│RGB_SA│RGB_VA│RGB_VA│ │ │ * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ * │ │ │BL_TOG│BL_BRT│BL_INC│BL_DEC│ │ │ │ │ │ │ │ │ │ * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ From 6cc46f32402cda6420d8770665e0ad3f69d4a02c Mon Sep 17 00:00:00 2001 From: yskoht Date: Sun, 25 Sep 2022 19:32:35 +0900 Subject: [PATCH 25/34] Fix fortitude60 test --- test/expect/fortitude60.c | 2 +- test/expect/fortitude60_5.json | 2 +- test/expect/fortitude60_fancy.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/expect/fortitude60.c b/test/expect/fortitude60.c index 4ee1042..15cfab6 100644 --- a/test/expect/fortitude60.c +++ b/test/expect/fortitude60.c @@ -61,7 +61,7 @@ /* ,-----------------------------------------. ,-----------------------------------------. * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | |RESET |RGB_TO|RGB_MO|RGB_HU|RGB_HU| |RGB_SA|RGB_SA|RGB_VA|RGB_VA| | BSPC | + * | |QK_BOO|RGB_TO|RGB_MO|RGB_HU|RGB_HU| |RGB_SA|RGB_SA|RGB_VA|RGB_VA| | BSPC | * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | | |AU_ON |AU_OFF|AG_NOR| |AG_SWA| |BL_TOG|BL_STE| | | * |------+------+------+------+------+------+------. ,------+------+------+------+------+------+------| diff --git a/test/expect/fortitude60_5.json b/test/expect/fortitude60_5.json index 7d5743f..9416fcd 100644 --- a/test/expect/fortitude60_5.json +++ b/test/expect/fortitude60_5.json @@ -61,7 +61,7 @@ "y": -0.75, "x": 1 }, - "RESET", + "QK_BOOT", { "x": 2 }, diff --git a/test/expect/fortitude60_fancy.c b/test/expect/fortitude60_fancy.c index 75477cf..a3d2e4a 100644 --- a/test/expect/fortitude60_fancy.c +++ b/test/expect/fortitude60_fancy.c @@ -61,7 +61,7 @@ /* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ * │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ - * │ │RESET │RGB_TO│RGB_MO│RGB_HU│RGB_HU│ │RGB_SA│RGB_SA│RGB_VA│RGB_VA│ │ BSPC │ + * │ │QK_BOO│RGB_TO│RGB_MO│RGB_HU│RGB_HU│ │RGB_SA│RGB_SA│RGB_VA│RGB_VA│ │ BSPC │ * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ * │ │ │ │AU_ON │AU_OFF│AG_NOR│ │AG_SWA│ │BL_TOG│BL_STE│ │ │ * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┐ ┌──────┼──────┼──────┼──────┼──────┼──────┼──────┤ From 64f6894f4a2b23a72d6c7e675f7fd78170fdca81 Mon Sep 17 00:00:00 2001 From: yskoht Date: Sun, 25 Sep 2022 19:33:03 +0900 Subject: [PATCH 26/34] Fix helix test --- test/expect/helix.c | 4 ++-- test/expect/helix_11.json | 2 +- test/expect/helix_5.json | 2 +- test/expect/helix_fancy.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/expect/helix.c b/test/expect/helix.c index 3f58250..1ddfe24 100644 --- a/test/expect/helix.c +++ b/test/expect/helix.c @@ -61,7 +61,7 @@ /* ,-----------------------------------------. ,-----------------------------------------. * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | |RESET |RGBRST| | | | | | | | | | DEL | + * | |QK_BOO|RGBRST| | | | | | | | | | DEL | * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | | |AU_ON |AU_OFF|AG_NOR| |AG_SWA|QWERTY|COLEMA|DVORAK| | | * |------+------+------+------+------+------+------. ,------+------+------+------+------+------+------| @@ -131,7 +131,7 @@ * `------------------------------------------------' `------------------------------------------------' * generated by [keymapviz] */ /* ,-----------------------------------------. ,-----------------------------------------. - * | |RESET |RGBRST| | | | | | | | | | DEL | + * | |QK_BOO|RGBRST| | | | | | | | | | DEL | * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | | |AU_ON |AU_OFF|AG_NOR| |AG_SWA|QWERTY|COLEMA|DVORAK| | | * |------+------+------+------+------+------| |------+------+------+------+------+------| diff --git a/test/expect/helix_11.json b/test/expect/helix_11.json index 39e93aa..93da03c 100644 --- a/test/expect/helix_11.json +++ b/test/expect/helix_11.json @@ -4,7 +4,7 @@ "a": 7 }, "", - "RESET", + "QK_BOOT", "RGBRST", "", "", diff --git a/test/expect/helix_5.json b/test/expect/helix_5.json index f6b5d89..1deab6a 100644 --- a/test/expect/helix_5.json +++ b/test/expect/helix_5.json @@ -21,7 +21,7 @@ ], [ "", - "RESET", + "QK_BOOT", "RGBRST", "", "", diff --git a/test/expect/helix_fancy.c b/test/expect/helix_fancy.c index a00a8d7..9711d29 100644 --- a/test/expect/helix_fancy.c +++ b/test/expect/helix_fancy.c @@ -61,7 +61,7 @@ /* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ * │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ - * │ │RESET │RGBRST│ │ │ │ │ │ │ │ │ │ DEL │ + * │ │QK_BOO│RGBRST│ │ │ │ │ │ │ │ │ │ DEL │ * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ * │ │ │ │AU_ON │AU_OFF│AG_NOR│ │AG_SWA│QWERTY│COLEMA│DVORAK│ │ │ * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┐ ┌──────┼──────┼──────┼──────┼──────┼──────┼──────┤ @@ -131,7 +131,7 @@ * └──────┴──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┴──────┘ * generated by [keymapviz] */ /* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ - * │ │RESET │RGBRST│ │ │ │ │ │ │ │ │ │ DEL │ + * │ │QK_BOO│RGBRST│ │ │ │ │ │ │ │ │ │ DEL │ * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ * │ │ │ │AU_ON │AU_OFF│AG_NOR│ │AG_SWA│QWERTY│COLEMA│DVORAK│ │ │ * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ From ac46cddd7798b4f322cecff046f3d0ece58973cc Mon Sep 17 00:00:00 2001 From: yskoht Date: Sun, 25 Sep 2022 19:33:43 +0900 Subject: [PATCH 27/34] Fix kinesis test --- test/expect/kinesis.c | 2 +- test/expect/kinesis_0.json | 2 +- test/expect/kinesis_fancy.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/expect/kinesis.c b/test/expect/kinesis.c index 969e9b6..0f1d114 100644 --- a/test/expect/kinesis.c +++ b/test/expect/kinesis.c @@ -1,5 +1,5 @@ /* ,---------------------------------------------------------------------------------------------------------------------------------. - * | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PSCR | SLCK | PAUS | |RESET | + * | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PSCR | SLCK | PAUS | |QK_BOO | * |--------+------+------+------+------+------+-----------------------------------------+------+------+------+------+------+--------| * | EQL | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | MINS | * |--------+------+------+------+------+------| +------+------+------+------+------+--------| diff --git a/test/expect/kinesis_0.json b/test/expect/kinesis_0.json index d505525..17a8430 100644 --- a/test/expect/kinesis_0.json +++ b/test/expect/kinesis_0.json @@ -108,7 +108,7 @@ "w": 0.675, "h": 0.85 }, - "RESET" + "QK_BOOT" ], [ { diff --git a/test/expect/kinesis_fancy.c b/test/expect/kinesis_fancy.c index 3628236..4f84fae 100644 --- a/test/expect/kinesis_fancy.c +++ b/test/expect/kinesis_fancy.c @@ -1,5 +1,5 @@ /* ┌────────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬────────┐ - * │ ESC │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ PSCR │ SLCK │ PAUS │ │RESET │ + * │ ESC │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ PSCR │ SLCK │ PAUS │ │QK_BOO │ * ├────────┼──────┼──────┼──────┼──────┼──────┼──────┴──────┴──────┴──────┴──────┴──────┼──────┼──────┼──────┼──────┼──────┼────────┤ * │ EQL │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ MINS │ * ├────────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼────────┤ From 881ec929265a8a3799c0e48ed24a87a0cbbfd16b Mon Sep 17 00:00:00 2001 From: yskoht Date: Sun, 25 Sep 2022 19:34:14 +0900 Subject: [PATCH 28/34] Fix lets_split test --- test/expect/lets_split.c | 2 +- test/expect/lets_split_5.json | 2 +- test/expect/lets_split_fancy.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/expect/lets_split.c b/test/expect/lets_split.c index b10c352..273c046 100644 --- a/test/expect/lets_split.c +++ b/test/expect/lets_split.c @@ -49,7 +49,7 @@ * `-----------------------------------------' `-----------------------------------------' * generated by [keymapviz] */ /* ,-----------------------------------------. ,-----------------------------------------. - * | |RESET | | | | | | | | | | | DEL | + * | |QK_BOO| | | | | | | | | | | DEL | * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | | |AU_ON |AU_OFF|AG_NOR| |AG_SWA|QWERTY|COLEMA|DVORAK| | | * |------+------+------+------+------+------| |------+------+------+------+------+------| diff --git a/test/expect/lets_split_5.json b/test/expect/lets_split_5.json index 1d94131..b909d07 100644 --- a/test/expect/lets_split_5.json +++ b/test/expect/lets_split_5.json @@ -4,7 +4,7 @@ "a": 7 }, "", - "RESET", + "QK_BOOT", "", "", "", diff --git a/test/expect/lets_split_fancy.c b/test/expect/lets_split_fancy.c index 442e7e1..cb325bb 100644 --- a/test/expect/lets_split_fancy.c +++ b/test/expect/lets_split_fancy.c @@ -49,7 +49,7 @@ * └──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┘ * generated by [keymapviz] */ /* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ - * │ │RESET │ │ │ │ │ │ │ │ │ │ │ DEL │ + * │ │QK_BOO│ │ │ │ │ │ │ │ │ │ │ DEL │ * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ * │ │ │ │AU_ON │AU_OFF│AG_NOR│ │AG_SWA│QWERTY│COLEMA│DVORAK│ │ │ * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ From 26bfe7fd260ab80e87a0c641e2b447e825a17231 Mon Sep 17 00:00:00 2001 From: yskoht Date: Sun, 25 Sep 2022 19:34:40 +0900 Subject: [PATCH 29/34] Fix moonlander test --- test/expect/moonlander.c | 2 +- test/expect/moonlander_2.json | 2 +- test/expect/moonlander_fancy.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/expect/moonlander.c b/test/expect/moonlander.c index 6d61aac..c1c7dd4 100644 --- a/test/expect/moonlander.c +++ b/test/expect/moonlander.c @@ -33,7 +33,7 @@ * '-----------------------' '-----------------------' * generated by [keymapviz] */ /* .---------------------------------------------. .---------------------------------------------. - * |LED_LEV| | | | | | | ! | | | | | | RESET | + * |LED_LEV| | | | | | | ! | | | | | |QK_BOOT| * !-------+-----+-----+-----+-----+-----+-------! !-------+-----+-----+-----+-----+-----+-------! * | | | |MS_U | | | | ! | | | | | | | * !-------+-----+-----+-----+-----+-----+-------! !-------+-----+-----+-----+-----+-----+-------! diff --git a/test/expect/moonlander_2.json b/test/expect/moonlander_2.json index cf490bf..f549729 100644 --- a/test/expect/moonlander_2.json +++ b/test/expect/moonlander_2.json @@ -64,7 +64,7 @@ { "x": 5 }, - "RESET" + "QK_BOOT" ], [ { diff --git a/test/expect/moonlander_fancy.c b/test/expect/moonlander_fancy.c index 0a22088..fd07c11 100644 --- a/test/expect/moonlander_fancy.c +++ b/test/expect/moonlander_fancy.c @@ -33,7 +33,7 @@ * └───────┴───────┴───────┘ └───────┴───────┴───────┘ * generated by [keymapviz] */ /* ┌───────┬─────┬─────┬─────┬─────┬─────┬───────┐ ┌───────┬─────┬─────┬─────┬─────┬─────┬───────┐ - * │LED_LEV│ │ │ │ │ │ │ │ │ │ │ │ │ │ RESET │ + * │LED_LEV│ │ │ │ │ │ │ │ │ │ │ │ │ │QK_BOOT│ * ├───────┼─────┼─────┼─────┼─────┼─────┼───────┤ ├───────┼─────┼─────┼─────┼─────┼─────┼───────┤ * │ │ │ │MS_U │ │ │ │ │ │ │ │ │ │ │ │ * ├───────┼─────┼─────┼─────┼─────┼─────┼───────┤ ├───────┼─────┼─────┼─────┼─────┼─────┼───────┤ From eddb032e2be0107662ef9032769cd3b006134c8b Mon Sep 17 00:00:00 2001 From: yskoht Date: Sun, 25 Sep 2022 19:35:13 +0900 Subject: [PATCH 30/34] Fix sofle test --- test/expect/sofle.c | 2 +- test/expect/sofle_4.json | 2 +- test/expect/sofle_fancy.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/expect/sofle.c b/test/expect/sofle.c index 337b9bd..26c04b9 100644 --- a/test/expect/sofle.c +++ b/test/expect/sofle.c @@ -53,7 +53,7 @@ /* ,-----------------------------------------. ,-----------------------------------------. * | | | | | | | | | | | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * |RESET | |QWERTY|COLEMA|CG_TOG| | | | | | | | | + * |QK_BOO| |QWERTY|COLEMA|CG_TOG| | | | | | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | |CG_TOG| | | |,------. ,------.| | VOLD | MUTE | VOLU | | | * |------+------+------+------+------+------|| | | ||------+------+------+------+------+------| diff --git a/test/expect/sofle_4.json b/test/expect/sofle_4.json index 4ee9b12..7d75cf6 100644 --- a/test/expect/sofle_4.json +++ b/test/expect/sofle_4.json @@ -92,7 +92,7 @@ { "y": -0.8500000000000001 }, - "RESET", + "QK_BOOT", "", { "x": 3 diff --git a/test/expect/sofle_fancy.c b/test/expect/sofle_fancy.c index 91d703c..28aa67b 100644 --- a/test/expect/sofle_fancy.c +++ b/test/expect/sofle_fancy.c @@ -53,7 +53,7 @@ /* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ - * │RESET │ │QWERTY│COLEMA│CG_TOG│ │ │ │ │ │ │ │ │ + * │QK_BOO│ │QWERTY│COLEMA│CG_TOG│ │ │ │ │ │ │ │ │ * ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ * │ │ │CG_TOG│ │ │ │┌──────┐ ┌──────┐│ │ VOLD │ MUTE │ VOLU │ │ │ * ├──────┼──────┼──────┼──────┼──────┼──────┤│ │ │ │├──────┼──────┼──────┼──────┼──────┼──────┤ From 4277f81199b67813d28017242d9e7ef52509e259 Mon Sep 17 00:00:00 2001 From: yskoht Date: Sun, 25 Sep 2022 19:38:19 +0900 Subject: [PATCH 31/34] Fix planck test --- test/expect/planck_grid.c | 4 ++-- test/expect/planck_grid_6.json | 6 +++--- test/expect/planck_grid_fancy.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/expect/planck_grid.c b/test/expect/planck_grid.c index a2ae7f2..2a4cd11 100644 --- a/test/expect/planck_grid.c +++ b/test/expect/planck_grid.c @@ -59,11 +59,11 @@ * `-----------------------------------------------------------------------------------' * generated by [keymapviz] */ /* ,-----------------------------------------------------------------------------------. - * | |RESET |DEBUG |RGB_TO|RGB_MO|RGB_HU|RGB_HU|RGB_SA|RGB_SA|RGB_VA|RGB_VA| DEL | + * | |QK_BOO|DEBUG |RGB_TO|RGB_MO|RGB_HU|RGB_HU|RGB_SA|RGB_SA|RGB_VA|RGB_VA| DEL | * |------+------+------+------+------+-------------+------+------+------+------+------| * | | |MU_MOD|AU_ON |AU_OFF|AG_NOR|AG_SWA|QWERTY|COLEMA|DVORAK|PLOVER| | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | |MUV_DE|MUV_IN|MU_ON |MU_OFF|MI_ON |MI_OFF|TERM_O|TERM_O| | | | + * | |MUV_DE|MUV_IN|MU_ON |MU_OFF|MI_ON |MI_OFF| | | | | | * |------+------+------+------+------+-------------+------+------+------+------+------| * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' diff --git a/test/expect/planck_grid_6.json b/test/expect/planck_grid_6.json index e0c5943..385eee7 100644 --- a/test/expect/planck_grid_6.json +++ b/test/expect/planck_grid_6.json @@ -4,7 +4,7 @@ "a": 7 }, "", - "RESET", + "QK_BOOT", "DEBUG", "RGB_TOG", "RGB_MOD", @@ -38,8 +38,8 @@ "MU_OFF", "MI_ON", "MI_OFF", - "TERM_ON", - "TERM_OFF", + "", + "", "", "", "" diff --git a/test/expect/planck_grid_fancy.c b/test/expect/planck_grid_fancy.c index 3ca56a4..4846598 100644 --- a/test/expect/planck_grid_fancy.c +++ b/test/expect/planck_grid_fancy.c @@ -59,11 +59,11 @@ * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ * generated by [keymapviz] */ /* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ - * │ │RESET │DEBUG │RGB_TO│RGB_MO│RGB_HU│RGB_HU│RGB_SA│RGB_SA│RGB_VA│RGB_VA│ DEL │ + * │ │QK_BOO│DEBUG │RGB_TO│RGB_MO│RGB_HU│RGB_HU│RGB_SA│RGB_SA│RGB_VA│RGB_VA│ DEL │ * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ * │ │ │MU_MOD│AU_ON │AU_OFF│AG_NOR│AG_SWA│QWERTY│COLEMA│DVORAK│PLOVER│ │ * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ - * │ │MUV_DE│MUV_IN│MU_ON │MU_OFF│MI_ON │MI_OFF│TERM_O│TERM_O│ │ │ │ + * │ │MUV_DE│MUV_IN│MU_ON │MU_OFF│MI_ON │MI_OFF│ │ │ │ │ │ * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ * │ │ │ │ │ │ │ │ │ │ │ │ │ * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ From 6a97c2b3a0d967a939e5afa4b0c7480673d7fc02 Mon Sep 17 00:00:00 2001 From: yskoht Date: Sun, 25 Sep 2022 19:42:35 +0900 Subject: [PATCH 32/34] Add test for id75 --- test/expect/id75.c | 24 +++++++++++ test/expect/id75_0.json | 90 ++++++++++++++++++++++++++++++++++++++++ test/expect/id75_1.json | 90 ++++++++++++++++++++++++++++++++++++++++ test/expect/id75_fancy.c | 24 +++++++++++ test/test.py | 10 +++++ 5 files changed, 238 insertions(+) create mode 100644 test/expect/id75.c create mode 100644 test/expect/id75_0.json create mode 100644 test/expect/id75_1.json create mode 100644 test/expect/id75_fancy.c diff --git a/test/expect/id75.c b/test/expect/id75.c new file mode 100644 index 0000000..de9ec29 --- /dev/null +++ b/test/expect/id75.c @@ -0,0 +1,24 @@ +/* ,--------------------------------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | MINS | EQL | BSLS | GRV | + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * | TAB | Q | W | E | R | T | Y | U | I | O | P | LBRC | RBRC | BSPC | DEL | + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * | CAPS | A | S | D | F | G | H | J | K | L | SCLN | QUOT | ENT | ENT | PGUP | + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * | LSFT | Z | X | C | V | B | N | M | COMM | DOT | SLSH | RSFT | RSFT | UP | PGDN | + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * | LCTL | LGUI | LALT | SPC | SPC | SPC | SPC | SPC | SPC | RALT | RCTL |MO(1) | LEFT | DOWN | RGHT | + * `--------------------------------------------------------------------------------------------------------' + * generated by [keymapviz] */ +/* ,--------------------------------------------------------------------------------------------------------. + * |QK_BOO| | | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * `--------------------------------------------------------------------------------------------------------' + * generated by [keymapviz] */ diff --git a/test/expect/id75_0.json b/test/expect/id75_0.json new file mode 100644 index 0000000..70fa10b --- /dev/null +++ b/test/expect/id75_0.json @@ -0,0 +1,90 @@ +[ + [ + { + "a": 7 + }, + "ESC", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "0", + "MINS", + "EQL", + "BSLS", + "GRV" + ], + [ + "TAB", + "Q", + "W", + "E", + "R", + "T", + "Y", + "U", + "I", + "O", + "P", + "LBRC", + "RBRC", + "BSPC", + "DEL" + ], + [ + "CAPS", + "A", + "S", + "D", + "F", + "G", + "H", + "J", + "K", + "L", + "SCLN", + "QUOT", + "ENT", + "ENT", + "PGUP" + ], + [ + "LSFT", + "Z", + "X", + "C", + "V", + "B", + "N", + "M", + "COMM", + "DOT", + "SLSH", + "RSFT", + "RSFT", + "UP", + "PGDN" + ], + [ + "LCTL", + "LGUI", + "LALT", + "SPC", + "SPC", + "SPC", + "SPC", + "SPC", + "SPC", + "RALT", + "RCTL", + "MO(1)", + "LEFT", + "DOWN", + "RGHT" + ] +] diff --git a/test/expect/id75_1.json b/test/expect/id75_1.json new file mode 100644 index 0000000..edf873f --- /dev/null +++ b/test/expect/id75_1.json @@ -0,0 +1,90 @@ +[ + [ + { + "a": 7 + }, + "QK_BOOT", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] +] diff --git a/test/expect/id75_fancy.c b/test/expect/id75_fancy.c new file mode 100644 index 0000000..80efe44 --- /dev/null +++ b/test/expect/id75_fancy.c @@ -0,0 +1,24 @@ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ MINS │ EQL │ BSLS │ GRV │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ LBRC │ RBRC │ BSPC │ DEL │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ CAPS │ A │ S │ D │ F │ G │ H │ J │ K │ L │ SCLN │ QUOT │ ENT │ ENT │ PGUP │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LSFT │ Z │ X │ C │ V │ B │ N │ M │ COMM │ DOT │ SLSH │ RSFT │ RSFT │ UP │ PGDN │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ LCTL │ LGUI │ LALT │ SPC │ SPC │ SPC │ SPC │ SPC │ SPC │ RALT │ RCTL │MO(1) │ LEFT │ DOWN │ RGHT │ + * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ +/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │QK_BOO│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + * generated by [keymapviz] */ diff --git a/test/test.py b/test/test.py index 6ffaa48..7fa457f 100644 --- a/test/test.py +++ b/test/test.py @@ -267,6 +267,16 @@ def exe(cmd): exe('diff -u expect/planck_mit_4.json planck_mit_4.json') exe('diff -u expect/planck_mit_5.json planck_mit_5.json') +# id75 +exe('keymapviz ./qmk_firmware/keyboards/idobao/id75/keymaps/default/keymap.c -o id75.c') +exe('keymapviz ./qmk_firmware/keyboards/idobao/id75/keymaps/default/keymap.c -o id75_fancy.c -t fancy') +exe('keymapviz ./qmk_firmware/keyboards/idobao/id75/keymaps/default/keymap.c -o id75_{}.json -t json') + +exe('diff -u expect/id75.c id75.c') +exe('diff -u expect/id75_fancy.c id75_fancy.c') +exe('diff -u expect/id75_0.json id75_0.json') +exe('diff -u expect/id75_1.json id75_1.json') + if status: print('\nAll tests were passed successfully!') sys.exit(0 if status else 1) From 720625dc6a9ae1e6adc9077e63c264597793e358 Mon Sep 17 00:00:00 2001 From: yskoht Date: Sun, 25 Sep 2022 19:47:45 +0900 Subject: [PATCH 33/34] Update version --- keymapviz/keymapviz.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keymapviz/keymapviz.py b/keymapviz/keymapviz.py index 481c9a4..a60b71d 100755 --- a/keymapviz/keymapviz.py +++ b/keymapviz/keymapviz.py @@ -9,7 +9,7 @@ from keymapviz.legends import * -VERSION = 'v1.12.0' +VERSION = 'v1.13.0' TYPES = { 'ascii': 'ascii_art', diff --git a/setup.py b/setup.py index 4006f65..7c42914 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ def search_json_files(): setup( name='keymapviz', - version='1.12.0', + version='1.13.0', description='keymap.c visualizer', long_description=long_description, long_description_content_type='text/markdown', From 83ba9719c810f4d457ea996c425a3b0ed6e638fe Mon Sep 17 00:00:00 2001 From: Giuseppe Rota <403432+grota@users.noreply.github.com> Date: Sat, 1 Oct 2022 11:40:49 +0200 Subject: [PATCH 34/34] my dacman 5x7 conf --- README.md | 1 + keymapviz/__init__.py | 2 + .../keyboards/dactyl_manuform5x7/__init__.py | 53 +++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 keymapviz/keyboards/dactyl_manuform5x7/__init__.py diff --git a/README.md b/README.md index 8290801..3c271e7 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ Following keyboards are supported. - [planck](https://github.com/qmk/qmk_firmware/tree/master/keyboards/planck) (layout: `default`(=`grid`), `mit`) - [sofle](https://github.com/qmk/qmk_firmware/tree/master/keyboards/sofle) - [sweet16](https://github.com/qmk/qmk_firmware/tree/master/keyboards/1upkeyboards/sweet16) +- [dactyl_manuform5x7](https://github.com/qmk/qmk_firmware/tree/master/keyboards/handwired/dactyl_manuform/5x7) ## Install diff --git a/keymapviz/__init__.py b/keymapviz/__init__.py index 5eddc7b..9c5e3fe 100644 --- a/keymapviz/__init__.py +++ b/keymapviz/__init__.py @@ -21,6 +21,7 @@ import keymapviz.keyboards.lily58 import keymapviz.keyboards.sweet16 import keymapviz.keyboards.dactyl_manuform5x6 +import keymapviz.keyboards.dactyl_manuform5x7 import keymapviz.keyboards.sofle import keymapviz.keyboards.moonlander import keymapviz.keyboards.planck @@ -45,6 +46,7 @@ 'kyria': keymapviz.keyboards.kyria, 'sweet16': keymapviz.keyboards.sweet16, 'dactyl_manuform5x6': keymapviz.keyboards.dactyl_manuform5x6, + 'dactyl_manuform5x7': keymapviz.keyboards.dactyl_manuform5x7, 'sofle': keymapviz.keyboards.sofle, 'moonlander': keymapviz.keyboards.moonlander, 'planck': keymapviz.keyboards.planck, diff --git a/keymapviz/keyboards/dactyl_manuform5x7/__init__.py b/keymapviz/keyboards/dactyl_manuform5x7/__init__.py new file mode 100644 index 0000000..d46763f --- /dev/null +++ b/keymapviz/keyboards/dactyl_manuform5x7/__init__.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- + +keymap_keyword = '(?:KEYMAP|LAYOUT_5x7_sym)' +layout_editor_json = { + 'default': 'keyboards/dactyl_manuform5x6/layout_editor/default.json', +} + +ascii_art = { + 'default': ''' +/* +/* ,-------------------------------------------------------. ,-------------------------------------------------------. + * |{ 0 }|{ 1 }|{ 2 }|{ 3 }|{ 4 }|{ 5 }|{ 6 }| |{ 7 }|{ 8 }|{ 9 }|{ 10 }|{ 11 }|{ 12 }|{ 13 }| + * |-------+-------|-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + * |{ 14 }|{ 15 }|{ 16 }|{ 17 }|{ 18 }|{ 19 }|{ 20 }| |{ 21 }|{ 22 }|{ 23 }|{ 24 }|{ 25 }|{ 26 }|{ 27 }| + * |-------+-------|-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + * |{ 28 }|{ 29 }|{ 30 }|{ 31 }|{ 32 }|{ 33 }|{ 34 }| |{ 35 }|{ 36 }|{ 37 }|{ 38 }|{ 39 }|{ 40 }|{ 41 }| + * |-------+-------|-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + * |{ 42 }|{ 43 }|{ 44 }|{ 45 }|{ 46 }|{ 47 }|{ 48 }| |{ 49 }|{ 50 }|{ 51 }|{ 52 }|{ 53 }|{ 54 }|{ 55 }| + * |-------+-------|-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + * |{ 56 }|{ 57 }|{ 58 }|{ 59 }| |{ 60 }|{ 61 }|{ 62 }|{ 63 }| + * `-------+-------|-------+-------+ +-------+-------+-------+-------' + * ,---------------. ,---------------. + * |{ 64 }|{ 65 }| |{ 66 }|{ 67 }| + * `-------+-------+-------| ,-------+-------+-------' + * |{ 68 }|{ 69 }| |{ 70 }|{ 71 }| + * |-------+-------| |-------+-------| + * |{ 72 }|{ 73 }| |{ 74 }|{ 75 }| + * `---------------' `---------------' generated by [keymapviz] */ +''', +} + +fancy_ascii_art = { + 'default': ''' +/* ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┐ ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┐ + * │{ 0 }│{ 1 }│{ 2 }│{ 3 }│{ 4 }│{ 5 }│{ 6 }│ │{ 7 }│{ 8 }│{ 9 }│{ 10 }│{ 11 }│{ 12 }│{ 13 }│ + * ├───────┼───────┼───────┼───────┼───────┼───────┼───────│ ├───────┼───────┼───────┼───────┼───────┼───────┼───────┤ + * │{ 14 }│{ 15 }│{ 16 }│{ 17 }│{ 18 }│{ 19 }│{ 20 }│ │{ 21 }│{ 22 }│{ 23 }│{ 24 }│{ 25 }│{ 26 }│{ 27 }│ + * ├───────┼───────┼───────┼───────┼───────┼───────┼───────│ ├───────┼───────┼───────┼───────┼───────┼───────┼───────┤ + * │{ 28 }│{ 29 }│{ 30 }│{ 31 }│{ 32 }│{ 33 }│{ 34 }│ │{ 35 }│{ 36 }│{ 37 }│{ 38 }│{ 39 }│{ 40 }│{ 41 }│ + * ├───────┼───────┼───────┼───────┼───────┼───────┼───────│ ├───────┼───────┼───────┼───────┼───────┼───────┼───────┤ + * │{ 42 }│{ 43 }│{ 44 }│{ 45 }│{ 46 }│{ 47 }│{ 48 }│ │{ 49 }│{ 50 }│{ 51 }│{ 52 }│{ 53 }│{ 54 }│{ 55 }│ + * ├───────┼───────┼───────┼───────┼───────┴───────┴───────┘ └───────┴───────┴───────┼───────┼───────┼───────┼───────┤ + * │{ 56 }│{ 57 }│{ 58 }│{ 59 }│ │{ 60 }│{ 61 }│{ 62 }│{ 63 }│ + * └───────┴───────┴───────┴───────┘ └───────┴───────┴───────┴───────┘ + * ┌───────┬───────┐ ┌───────┬───────┐ + * │{ 64 }│{ 65 }│ │{ 66 }│{ 67 }│ + * └───────┼───────┼───────┐ ┌───────┼───────┼───────┘ + * │{ 68 }│{ 69 }│ │{ 70 }│{ 71 }│ + * ├───────┼───────│ ├───────┼───────┤ + * │{ 72 }│{ 73 }│ │{ 74 }│{ 75 }│ + * └───────┴───────┘ └───────┴───────┘ generated by [keymapviz] */ +''', +}