diff options
Diffstat (limited to 'keyboards/signum/3_0')
-rw-r--r-- | keyboards/signum/3_0/elitec/info.json | 110 | ||||
-rwxr-xr-x | keyboards/signum/3_0/elitec/keymaps/default/generate_km.py | 156 | ||||
-rw-r--r-- | keyboards/signum/3_0/elitec/keymaps/default/keymap.c | 83 | ||||
-rw-r--r-- | keyboards/signum/3_0/elitec/keymaps/default/layout.py | 77 | ||||
-rw-r--r-- | keyboards/signum/3_0/elitec/keymaps/default/readme.md | 7 |
5 files changed, 246 insertions, 187 deletions
diff --git a/keyboards/signum/3_0/elitec/info.json b/keyboards/signum/3_0/elitec/info.json index e414d1596..53b88d553 100644 --- a/keyboards/signum/3_0/elitec/info.json +++ b/keyboards/signum/3_0/elitec/info.json @@ -2,74 +2,64 @@ "keyboard_name": "Signum 3.0", "url": "http://troyfletcher.net/", "maintainer": "jceb", - "width": 17, - "height": 8, + "width": 15, + "height": 6, "layouts": { "LAYOUT_ortho_4x12": { "key_count": 48, "layout": [ - { "x": 1.25, "y": 0.75, "r": 15 }, - { "x": 1.25, "y": 1.75, "r": 15 }, - { "x": 1.25, "y": 2.75, "r": 15 }, - { "x": 1.25, "y": 4.25, "r": 15 }, + { "x": 0, "y": 0.5, "r": 15 }, + { "x": 1, "y": 0.5, "r": 15 }, + { "x": 2, "y": 0.25, "r": 15 }, + { "x": 3, "y": 0, "r": 15 }, + { "x": 4, "y": 0.25, "r": 15 }, + { "x": 5, "y": 0.5, "r": 15 }, + { "x": 9, "y": 0.5, "r": -15 }, + { "x": 10, "y": 0.25, "r": -15 }, + { "x": 11, "y": 0, "r": -15 }, + { "x": 12, "y": 0.25, "r": -15 }, + { "x": 13, "y": 0.5, "r": -15 }, + { "x": 14, "y": 0.5, "r": -15 }, - { "x": 2.25, "y": 0.75, "r": 15 }, - { "x": 2.25, "y": 1.75, "r": 15 }, - { "x": 2.25, "y": 2.75, "r": 15 }, - { "x": 2.25, "y": 3.75, "r": 15 }, + { "x": 0, "y": 1.5, "r": 15 }, + { "x": 1, "y": 1.5, "r": 15 }, + { "x": 2, "y": 1.25, "r": 15 }, + { "x": 3, "y": 1, "r": 15 }, + { "x": 4, "y": 1.25, "r": 15 }, + { "x": 5, "y": 1.5, "r": 15 }, + { "x": 9, "y": 1.5, "r": -15 }, + { "x": 10, "y": 1.25, "r": -15 }, + { "x": 11, "y": 1, "r": -15 }, + { "x": 12, "y": 1.25, "r": -15 }, + { "x": 13, "y": 1.5, "r": -15 }, + { "x": 14, "y": 1.5, "r": -15 }, - { "x": 3.25, "y": 0.5, "r": 15 }, - { "x": 3.25, "y": 1.5, "r": 15 }, - { "x": 3.25, "y": 2.5, "r": 15 }, - { "x": 3.25, "y": 3.5, "r": 15 }, + { "x": 0, "y": 2.5, "r": 15 }, + { "x": 1, "y": 2.5, "r": 15 }, + { "x": 2, "y": 2.25, "r": 15 }, + { "x": 3, "y": 2, "r": 15 }, + { "x": 4, "y": 2.25, "r": 15 }, + { "x": 5, "y": 2.5, "r": 15 }, + { "x": 9, "y": 2.5, "r": -15 }, + { "x": 10, "y": 2.25, "r": -15 }, + { "x": 11, "y": 2, "r": -15 }, + { "x": 12, "y": 2.25, "r": -15 }, + { "x": 13, "y": 2.5, "r": -15 }, + { "x": 14, "y": 2.5, "r": -15 }, - { "x": 4.25, "y": 0.25, "r": 15 }, - { "x": 4.25, "y": 1.25, "r": 15 }, - { "x": 4.25, "y": 2.25, "r": 15 }, - - { "x": 5.25, "y": 0.5, "r": 15 }, - { "x": 5.25, "y": 1.5, "r": 15 }, - { "x": 5.25, "y": 2.5, "r": 15 }, - { "x": 5.25, "y": 4.5, "r": 15, "h": 1.5 }, - - { "x": 6.25, "y": 0.75, "r": 15 }, - { "x": 6.25, "y": 1.75, "r": 15 }, - { "x": 6.25, "y": 2.75, "r": 15 }, - { "x": 6.25, "y": 4.25, "r": 15, "h": 2 }, - - { "x": 7.25, "y": 4.5, "r": 15, "h": 1.5 }, - - { "x": 8.25, "y": 4.5, "r": -15, "h": 1.5 }, - - { "x": 9.25, "y": 0.75, "r": -15 }, - { "x": 9.25, "y": 1.75, "r": -15 }, - { "x": 9.25, "y": 2.75, "r": -15 }, - { "x": 9.25, "y": 4.25, "r": -15, "h": 2 }, - - { "x": 10.25, "y": 0.5, "r": -15 }, - { "x": 10.25, "y": 1.5, "r": -15 }, - { "x": 10.25, "y": 2.5, "r": -15 }, - { "x": 10.25, "y": 4.5, "r": -15, "h": 1.5 }, - - { "x": 11.25, "y": 0.25, "r": -15 }, - { "x": 11.25, "y": 1.25, "r": -15 }, - { "x": 11.25, "y": 2.25, "r": -15 }, - - { "x": 12.25, "y": 0.5, "r": -15 }, - { "x": 12.25, "y": 1.5, "r": -15 }, - { "x": 12.25, "y": 2.5, "r": -15 }, - { "x": 12.25, "y": 3.5, "r": -15 }, - - { "x": 13.25, "y": 0.75, "r": -15 }, - { "x": 13.25, "y": 1.75, "r": -15 }, - { "x": 13.25, "y": 2.75, "r": -15 }, - { "x": 13.25, "y": 3.75, "r": -15 }, - - { "x": 14.25, "y": 0.75, "r": -15 }, - { "x": 14.25, "y": 1.75, "r": -15 }, - { "x": 14.25, "y": 2.75, "r": -15 }, - { "x": 14.25, "y": 4.25, "r": -15 } + { "x": 0, "y": 4, "r": 15 }, + { "x": 1, "y": 3.5, "r": 15 }, + { "x": 2, "y": 3.25, "r": 15 }, + { "x": 4, "y": 4.25, "r": 15, "h": 1.5 }, + { "x": 5, "y": 4, "r": 15, "h": 2 }, + { "x": 6, "y": 4.25, "r": 15, "h": 1.5 }, + { "x": 8, "y": 4.25, "r": -15, "h": 1.5 }, + { "x": 9, "y": 4, "r": -15, "h": 2 }, + { "x": 10, "y": 4.25, "r": -15, "h": 1.5 }, + { "x": 12, "y": 3.25, "r": -15 }, + { "x": 13, "y": 3.5, "r": -15 }, + { "x": 14, "y": 4, "r": -15 } ] } diff --git a/keyboards/signum/3_0/elitec/keymaps/default/generate_km.py b/keyboards/signum/3_0/elitec/keymaps/default/generate_km.py index 7778da8f5..cfa8edf57 100755 --- a/keyboards/signum/3_0/elitec/keymaps/default/generate_km.py +++ b/keyboards/signum/3_0/elitec/keymaps/default/generate_km.py @@ -1,17 +1,15 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -from sortedcontainers import SortedDict +import json import layout +import os import re -# TODO: auto-generate mutex layers -# TODO: auto-generate update_tri_layer (_state) - def gen_uc_iter(): length = len(layout.uc_dict) - for key, value in layout.uc_dict.items(): + for key, value in sorted(layout.uc_dict.items()): length -= 1 if length: yield (key, value, False) @@ -19,7 +17,7 @@ def gen_uc_iter(): yield (key, value, True) -def translate(s): +def _translate(s): if re.match("^[0-9]$", s): return ("KC_{0}".format(s), " {0} ".format(s)) elif re.match("^[a-z]$", s): @@ -51,80 +49,146 @@ def translate(s): def toKC(s): - (kc, lgd) = translate(s) - return kc + return _translate(s)[0] def toLgd(s): - (kc, lgd) = translate(s) - return lgd + return _translate(s)[1] -if __name__ == "__main__": +def quoteC(text): + yield "/*" + for line in text: + yield " * " + line + yield " */\n" + + +def getKeymapText(id, layer, columns, rows): + keymap = [] + keymap.append("Layer %d" % id) + keymap.append("------------------------------------------------- -------------------------------------------------") + keymap.append("|{0}|{1}|{2}|{3}|{4}|{5}| |{6}|{7}|{8}|{9}|{10}|{11}|".format(*map(toLgd, layer[:12]))) + keymap.append("------------------------------------------------- -------------------------------------------------") + keymap.append("|{0}|{1}|{2}|{3}|{4}|{5}| |{6}|{7}|{8}|{9}|{10}|{11}|".format(*map(toLgd, layer[12:24]))) + keymap.append("------------------------------------------------- -------------------------------------------------") + keymap.append("|{0}|{1}|{2}|{3}|{4}|{5}| |{6}|{7}|{8}|{9}|{10}|{11}|".format(*map(toLgd, layer[24:36]))) + keymap.append("-----------------------------------------------------------------------------------------------------------------") + keymap.append(" {0} {1} {2} |{3}|{4}|{5}|{6}|{7}|{8}| {9} {10} {11}".format(*map(toLgd, layer[36:48])).rstrip()) + keymap.append(" -------------------------------------------------") + return keymap - template = open("km_template.txt", mode="r") - output = open("keymap.c", mode="w", encoding='utf-8') +def writeKeymap(f_template, f_keymap, layers, columns, rows): doCopy = False - for line in template: + for line in f_template: doCopy = True if line.startswith("//<enum/>"): doCopy = False -# output.write(str(layout.uc_dict)) + # f_keymap.write(str(layout.uc_dict)) for k, v, isLast in gen_uc_iter(): if isLast: - output.write(k + "\n") + f_keymap.write(k + "\n") else: - output.write(k + ",\n") - if line.startswith("//<uc_map/>"): + f_keymap.write(k + ",\n") + elif line.startswith("//<uc_map/>"): doCopy = False for k, v, isLast in gen_uc_iter(): if isLast: - output.write(u"\t[{0}] = {1} // {2}\n".format(k, v, chr(int(v, 0)))) + f_keymap.write(u"\t[{0}] = {1} // {2}\n".format(k, v, chr(int(v, 0)))) else: - output.write(u"\t[{0}] = {1}, // {2}\n".format(k, v, chr(int(v, 0)))) - if line.startswith("//<keymaps/>"): + f_keymap.write(u"\t[{0}] = {1}, // {2}\n".format(k, v, chr(int(v, 0)))) + elif line.startswith("//<keymaps/>"): doCopy = False - counter = len(layout.layers) - layer = 0 - S = layout.static - for L in layout.layers: - counter -= 1 - r_counter = 4 - output.write("/* Layer %d\n" % layer) - output.write(" * ------------------------------------------------- -------------------------------------------------\n") - output.write(" * |{0}|{1}|{2}|{3}|{4}|{5}| |{6}|{7}|{8}|{9}|{10}|{11}|\n".format(toLgd(L[0][0]), toLgd(L[0][1]), toLgd(L[0][2]), toLgd(L[0][3]), toLgd(L[0][4]), toLgd(L[0][5]), toLgd(L[0][6]), toLgd(L[0][7]), toLgd(L[0][8]), toLgd(L[0][9]), toLgd(L[0][10]), toLgd(L[0][11]))) - output.write(" * ------------------------------------------------- -------------------------------------------------\n") - output.write(" * |{0}|{1}|{2}|{3}|{4}|{5}| |{6}|{7}|{8}|{9}|{10}|{11}|\n".format(toLgd(L[1][0]), toLgd(L[1][1]), toLgd(L[1][2]), toLgd(L[1][3]), toLgd(L[1][4]), toLgd(L[1][5]), toLgd(L[1][6]), toLgd(L[1][7]), toLgd(L[1][8]), toLgd(L[1][9]), toLgd(L[1][10]), toLgd(L[1][11]))) - output.write(" * ------------------------------------------------- -------------------------------------------------\n") - output.write(" * |{0}|{1}|{2}|{3}|{4}|{5}| |{6}|{7}|{8}|{9}|{10}|{11}|\n".format(toLgd(L[2][0]), toLgd(L[2][1]), toLgd(L[2][2]), toLgd(L[2][3]), toLgd(L[2][4]), toLgd(L[2][5]), toLgd(L[2][6]), toLgd(L[2][7]), toLgd(L[2][8]), toLgd(L[2][9]), toLgd(L[2][10]), toLgd(L[2][11]))) - output.write(" * -----------------------------------------------------------------------------------------------------------------\n") - output.write(" * {0} {1} {2} |{3}|{4}|{5}|{6}|{7}|{8}| {9} {10} {11}".format(toLgd(L[3][0]), toLgd(L[3][1]), toLgd(L[3][2]), toLgd(L[3][3]), toLgd(L[3][4]), toLgd(L[3][5]), toLgd(L[3][6]), toLgd(L[3][7]), toLgd(L[3][8]), toLgd(L[3][9]), toLgd(L[3][10]), toLgd(L[3][11])).rstrip()+"\n") - output.write(" * -------------------------------------------------\n") - output.write(" */\n") + for layer, L in enumerate(layers): + r_counter = rows + f_keymap.write('\n'.join(quoteC(getKeymapText(layer, L, columns, rows)))) l_code = '\tLAYOUT_ortho_4x12(\n' for r in range(r_counter): r_counter -= 1 - c_counter = 12 + c_counter = columns l_code += '\t\t' for c in range(c_counter): c_counter -= 1 if c != 0: l_code += " " - l_code += "%s" % toKC(L[r][c]) + l_code += "%s" % toKC(L[r*columns + columns-c_counter-1]) if r_counter or c_counter: l_code += "," l_code += '\n' - if counter: + if layer + 1 != len(layout.layers): l_code += "\t),\n\n" else: l_code += "\t)\n" - output.write(l_code) - layer += 1 + f_keymap.write(l_code) if doCopy: - output.write(line) + f_keymap.write(line) + + +def getKeymapJSON(keyboard, keymap, layout, layers): + return json.dumps({ + 'keyboard': keyboard, + 'keymap': keymap, + 'layout': layout, + 'layers': layers + }, sort_keys=True, indent=4) + + +def getKeymapAsciidoc(title, layers, columns, rows): + yield '= ' + title + yield '' + for id, layer in enumerate(layers): + keymap = getKeymapText(id, layer, columns, rows) + if len(keymap): + yield '.' + keymap[0] + yield '--------------------------' + for line in keymap[1:]: + yield ' ' + line + yield '--------------------------' + yield '' - template.close() - output.close() + +def layersToKC(layers): + return [list(map(toKC, layer)) for layer in layers] + + +def pathToKeymap(path): + head, keymap = os.path.split(path) + _, keymapsdir = os.path.split(head) + if keymapsdir == 'keymaps': + return keymap + + +def pathToKeyboard(path): + head, keymap = os.path.split(path) + head, keymapsdir = os.path.split(head) + if keymapsdir == 'keymaps': + head, dir = os.path.split(head) + while dir not in ('/', 'keyboards'): + yield dir + head, dir = os.path.split(head) + + +if __name__ == "__main__": + with open("km_template.txt", mode="r") as f_template: + with open("keymap.c", mode="w", encoding='utf-8') as f_keymap: + writeKeymap(f_template, f_keymap, layout.layers, columns=12, rows=4) + + abspath = os.path.dirname(os.path.abspath(__file__)) + keyboard = list(reversed(list(pathToKeyboard(abspath)))) + keymap = pathToKeymap(abspath) + keyboard_layout = 'LAYOUT_ortho_4x12' + with open("%s_%s.json" % ('_'.join(keyboard), keymap), mode="w") as f_keymapjson: + f_keymapjson.write( + getKeymapJSON( + '/'.join(keyboard), + keymap, + keyboard_layout, + layersToKC(layout.layers)) + ) + + with open("keymap.adoc", mode="w") as f_keymapasciidoc: + f_keymapasciidoc.write('\n'.join(getKeymapAsciidoc('Signum 3.0 %s_%s' % ('_'.join(keyboard), keymap), layout.layers, columns=12, rows=4))) + print("Run the following command to generate a PDF from the keymap") + print("a2x -f pdf --xsltproc-opts '--stringparam page.orientation landscape --stringparam body.font.master 12' --fop -v keymap.adoc") diff --git a/keyboards/signum/3_0/elitec/keymaps/default/keymap.c b/keyboards/signum/3_0/elitec/keymaps/default/keymap.c index 22d60085f..511be8c0d 100644 --- a/keyboards/signum/3_0/elitec/keymaps/default/keymap.c +++ b/keyboards/signum/3_0/elitec/keymaps/default/keymap.c @@ -623,119 +623,126 @@ const uint32_t PROGMEM unicode_map[] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Layer 0 +/* + * Layer 0 * ------------------------------------------------- ------------------------------------------------- * | Tab | q | w | e | r | t | | y | u | i | o | p | [ | * ------------------------------------------------- ------------------------------------------------- - * | LCtrl | a | s | d | f | g | | h | j | k | l | ; | ' | + * |LCtTEsc| a | s | d | f | g | | h | j | k | l | ; | ' | * ------------------------------------------------- ------------------------------------------------- * |LShift(| z | x | c | v | b | | n | m | , | . | / |RShift)| * ----------------------------------------------------------------------------------------------------------------- - * MO2 LGui LAlt | TT2 |LT6_SPC| TT4 | Enter | Space | TT2 | RAlt RGui RCtrl + * LCtrl LAlt LGui | TT2 |LT6_SPC|LT4_DEL|LT4_ENT| Space |LT2_BSP| RGui RAlt RCtrl * ------------------------------------------------- */ 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_LBRC, - KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + LCTL_T(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_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, - MO(2), KC_LGUI, KC_LALT, TT(2), LT(6, KC_SPC), TT(4), KC_ENT, KC_SPC, TT(2), KC_RALT, KC_RGUI, KC_RCTRL + KC_LCTL, KC_LALT, KC_LGUI, TT(2), LT(6,KC_SPC), LT(4,KC_DEL), LT(4,KC_ENT), KC_SPC, LT(2,KC_BSPC), KC_RGUI, KC_RALT, KC_RCTL ), -/* Layer 1 +/* + * Layer 1 * ------------------------------------------------- ------------------------------------------------- * | Tab | q | w | f | p | g | | j | l | u | y | ; | [ | * ------------------------------------------------- ------------------------------------------------- - * | LCtrl | a | r | s | t | d | | h | n | e | i | o | ' | + * |LCtTEsc| a | r | s | t | d | | h | n | e | i | o | ' | * ------------------------------------------------- ------------------------------------------------- * |LShift(| z | x | c | v | b | | k | m | , | . | / |RShift)| * ----------------------------------------------------------------------------------------------------------------- - * MO2 LGui LAlt | TT2 |LT6_SPC| TT4 | Enter | Space | TT2 | RAlt RGui RCtrl + * LCtrl LAlt LGui | TT2 |LT6_SPC|LT4_DEL|LT4_ENT| Space |LT2_BSP| RGui RAlt RCtrl * ------------------------------------------------- */ 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_LBRC, - KC_LCTRL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + LCTL_T(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_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, - MO(2), KC_LGUI, KC_LALT, TT(2), LT(6, KC_SPC), TT(4), KC_ENT, KC_SPC, TT(2), KC_RALT, KC_RGUI, KC_RCTRL + KC_LCTL, KC_LALT, KC_LGUI, TT(2), LT(6,KC_SPC), LT(4,KC_DEL), LT(4,KC_ENT), KC_SPC, LT(2,KC_BSPC), KC_RGUI, KC_RALT, KC_RCTL ), -/* Layer 2 +/* + * Layer 2 * ------------------------------------------------- ------------------------------------------------- * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ] | * ------------------------------------------------- ------------------------------------------------- - * | | DF0 | DF1 | XXX | XXX | MO3 | | 4 | 4 | 5 | 6 | - | = | + * | | DF0 | DF1 | XXX | MO3 | XXX | | 4 | 4 | 5 | 6 | - | = | * ------------------------------------------------- ------------------------------------------------- - * | | XXX | XXX | XXX | XXX | MO5 | | 1 | 1 | 2 | 3 | \ | | + * | | MO5 | XXX | XXX | XXX | XXX | | 1 | 1 | 2 | 3 | \ | | * ----------------------------------------------------------------------------------------------------------------- * TG2 | | Del | | |BSpace | 0 | * ------------------------------------------------- */ 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_RBRC, - KC_TRNS, DF(0), DF(1), XXXXXXX, XXXXXXX, MO(3), KC_4, KC_4, KC_5, KC_6, KC_MINS, KC_EQL, - KC_TRNS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MO(5), KC_1, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, + KC_TRNS, DF(0), DF(1), KC_NO, MO(3), KC_NO, KC_4, KC_4, KC_5, KC_6, KC_MINS, KC_EQL, + KC_TRNS, MO(5), KC_NO, KC_NO, KC_NO, KC_NO, KC_1, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, TG(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS, KC_BSPC, KC_0, KC_TRNS, KC_TRNS, KC_TRNS ), -/* Layer 3 +/* + * Layer 3 * ------------------------------------------------- ------------------------------------------------- * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | XXX | * ------------------------------------------------- ------------------------------------------------- - * | | XXX | XXX | XXX | XXX | MO3 | | F4 | F4 | F5 | F6 | XXX | XXX | + * | | XXX | XXX | XXX | MO3 | XXX | | F4 | F4 | F5 | F6 | F11 | XXX | * ------------------------------------------------- ------------------------------------------------- - * | | XXX | XXX | XXX | XXX | XXX | | F1 | F1 | F2 | F3 | XXX | | + * | | XXX | XXX | XXX | XXX | XXX | | F1 | F1 | F2 | F3 | F12 | | * ----------------------------------------------------------------------------------------------------------------- - * TG3 | | | | F10 | F11 | F12 | + * TG3 | | | | | | | * ------------------------------------------------- */ LAYOUT_ortho_4x12( - KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, - KC_TRNS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MO(3), KC_F4, KC_F4, KC_F5, KC_F6, XXXXXXX, XXXXXXX, - KC_TRNS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F1, KC_F2, KC_F3, XXXXXXX, KC_TRNS, - TG(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_NO, + KC_TRNS, KC_NO, KC_NO, KC_NO, MO(3), KC_NO, KC_F4, KC_F4, KC_F5, KC_F6, KC_F11, KC_NO, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F1, KC_F1, KC_F2, KC_F3, KC_F12, KC_TRNS, + TG(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), -/* Layer 4 +/* + * Layer 4 * ------------------------------------------------- ------------------------------------------------- * | Esc | Esc | Tab x | Tab n |CPg Dn |CPg Dn | |Pg Down| Home |^ Arrow|Insert |SInsert| Esc | * ------------------------------------------------- ------------------------------------------------- * | | Caps | < Gui |Gui Tab| > Gui | > Gui | |< Arrow|< Arrow|v Arrow|> Arrow| End |Pr Scr | * ------------------------------------------------- ------------------------------------------------- - * | | XXX | XXX | XXX |CPg Up |CPg Up | | Pg Up | XXX |v Arrow| XXX | App | | + * | | XXX | XXX | XXX |CPg Up |CPg Up | | Pg Up | |v Arrow| XXX | App | | * ----------------------------------------------------------------------------------------------------------------- * TG4 | | Del | | |BSpace | | * ------------------------------------------------- */ LAYOUT_ortho_4x12( - KC_ESC, KC_ESC, LCTL(KC_W), LCTL(KC_T), CTL_T(KC_PGDN), CTL_T(KC_PGDN), KC_PGDN, KC_HOME, KC_UP, KC_INS, SFT_T(KC_INS), KC_ESC, - KC_TRNS, KC_CAPS, LGUI_T(KC_LEFT), LGUI_T(KC_TAB), LGUI_T(KC_RIGHT), LGUI_T(KC_RIGHT), KC_LEFT, KC_LEFT, KC_DOWN, KC_RIGHT, KC_END, KC_PSCR, - KC_TRNS, XXXXXXX, XXXXXXX, XXXXXXX, CTL_T(KC_PGUP), CTL_T(KC_PGUP), KC_PGUP, XXXXXXX, KC_DOWN, XXXXXXX, KC_APP, KC_TRNS, + KC_ESC, KC_ESC, LCTL(KC_W), LCTL(KC_T), LCTL(KC_PGDN), LCTL(KC_PGDN), KC_PGDN, KC_HOME, KC_UP, KC_INS, LSFT(KC_INS), KC_ESC, + KC_TRNS, KC_CAPS, LGUI(KC_LEFT), LGUI(KC_TAB), LGUI(KC_RGHT), LGUI(KC_RGHT), KC_LEFT, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_PSCR, + KC_TRNS, KC_NO, KC_NO, KC_NO, LCTL(KC_PGUP), LCTL(KC_PGUP), KC_PGUP, KC_TRNS, KC_DOWN, KC_NO, KC_APP, KC_TRNS, TG(4), KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS, KC_BSPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), -/* Layer 5 +/* + * Layer 5 * ------------------------------------------------- ------------------------------------------------- * | | XXX |play/ps| Vol + | Vol + | XXX | | XXX | XXX | XXX | XXX |_reset | Power | * ------------------------------------------------- ------------------------------------------------- * | | XXX | |<< | Vol 0 | >>| | XXX | | XXX | XXX | XXX | XXX | XXX | Sleep | * ------------------------------------------------- ------------------------------------------------- - * | | XXX | XXX | Vol - | Vol - | MO5 | | XXX | XXX | XXX | XXX | XXX | XXX | + * | | MO5 | XXX | Vol - | Vol - | XXX | | XXX | XXX | XXX | XXX | XXX | XXX | * ----------------------------------------------------------------------------------------------------------------- * TG5 | | | | | | | * ------------------------------------------------- */ LAYOUT_ortho_4x12( - KC_TRNS, XXXXXXX, KC_MPLY, KC_VOLU, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, KC_PWR, - KC_TRNS, XXXXXXX, KC_MPRV, KC_MUTE, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLEP, - KC_TRNS, XXXXXXX, XXXXXXX, KC_VOLD, KC_VOLD, MO(5), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_TRNS, KC_NO, KC_MPLY, KC_VOLU, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RESET, KC_PWR, + KC_TRNS, KC_NO, KC_MPRV, KC_MUTE, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_SLEP, + KC_TRNS, MO(5), KC_NO, KC_VOLD, KC_VOLD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TG(5), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), -/* Layer 6 +/* + * Layer 6 * ------------------------------------------------- ------------------------------------------------- * | | acc1 | XXX | XXX | XXX | XXX | |^ Wheel|< Wheel|^ Mouse|> Wheel| XXX | XXX | * ------------------------------------------------- ------------------------------------------------- - * | | acc2 |Mouse 3|Mouse 2|Mouse 1|Mouse 1| |< Mouse|< Mouse|v Mouse|> Mouse| XXX | XXX | + * | | acc2 |Mouse 2|Mouse 3|Mouse 1|Mouse 1| |< Mouse|< Mouse|v Mouse|> Mouse| XXX | XXX | * ------------------------------------------------- ------------------------------------------------- * | | acc0 | XXX | XXX | XXX | XXX | |v Wheel| XXX |v Mouse| XXX | XXX | | * ----------------------------------------------------------------------------------------------------------------- @@ -743,9 +750,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ------------------------------------------------- */ LAYOUT_ortho_4x12( - KC_TRNS, KC_ACL1, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_U, KC_WH_L, KC_MS_U, KC_WH_R, XXXXXXX, XXXXXXX, - KC_TRNS, KC_ACL2, KC_BTN3, KC_BTN2, KC_BTN1, KC_BTN1, KC_MS_L, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, XXXXXXX, - KC_TRNS, KC_ACL0, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_D, XXXXXXX, KC_MS_D, XXXXXXX, XXXXXXX, KC_TRNS, + KC_TRNS, KC_ACL1, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_U, KC_WH_L, KC_MS_U, KC_WH_R, KC_NO, KC_NO, + KC_TRNS, KC_ACL2, KC_BTN2, KC_BTN3, KC_BTN1, KC_BTN1, KC_MS_L, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_NO, + KC_TRNS, KC_ACL0, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_D, KC_NO, KC_MS_D, KC_NO, KC_NO, KC_TRNS, TG(6), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) }; diff --git a/keyboards/signum/3_0/elitec/keymaps/default/layout.py b/keyboards/signum/3_0/elitec/keymaps/default/layout.py index 323a58321..dd5fd3334 100644 --- a/keyboards/signum/3_0/elitec/keymaps/default/layout.py +++ b/keyboards/signum/3_0/elitec/keymaps/default/layout.py @@ -1,11 +1,11 @@ -from sortedcontainers import SortedDict +# -*- coding: utf-8 -*- # Add all used Unicode symbols to this list. # The key (e.g. "SNEK") is used in keymap.c for "enum", "unicode_map" and "keymaps", so it needs to be a valid C variable name. # The key is also used in this file to define the layout, so use recognizeable names. # The value (e.g. "0x1f40d") is used in keymap.c for "unicode_map" and to automatically generate the "ASCII"-art comments. # When adding new Unicode names, use "0x1f40d" until you looked up the correct Unicode code point. -uc_dict = SortedDict({ +uc_dict = { "SNEK": "0x1f40d", ## Error ## qwertz "ACUTE": "0x00b4", @@ -329,7 +329,7 @@ uc_dict = SortedDict({ "NOT_PARA": "0x2226", "TIMES_OP": "0x2297", "NOT_DIV": "0x2224" -}) +} # Add all used Keycodes to this list. # The key (e.g. "a") is used in keymap.c to automatically generate the comments. The first 7 chars will show as a keycap legend. @@ -338,7 +338,7 @@ qmk_dict = { # If you find "BAD" in your keymaps, then something went wrong.) "a": "BAD", "A": "BAD", "0": "BAD", # Basic Keycodes - "XXX": "XXXXXXX", "": "KC_TRNS", + "XXX": "KC_NO", "": "KC_TRNS", "!": "S(KC_1)", "@": "S(KC_2)", "#": "S(KC_3)", "$": "S(KC_4)", "%": "S(KC_5)", "^": "S(KC_6)", "&": "S(KC_7)", "*": "S(KC_8)", "(": "S(KC_9)", ")": "S(KC_0)", "Enter": "KC_ENT", "Esc": "KC_ESC", "BSpace": "KC_BSPC", "Tab": "KC_TAB", @@ -348,19 +348,20 @@ qmk_dict = { ":": "S(KC_SCLN)", "'": "KC_QUOT", "\"": "S(KC_QUOT)", "`": "KC_GRV", "~": "S(KC_GRV)", ",": "KC_COMM", "<": "S(KC_COMM)", ".": "KC_DOT", ">": "S(KC_DOT)", "/": "KC_SLSH", "?": "S(KC_SLSH)", "Caps": "KC_CAPS", - "Pr Scr": "KC_PSCR", "Scr Lck": "KC_SLCK", "Pause": "KC_BRK", "Insert": "KC_INS", "SInsert": "SFT_T(KC_INS)", + "Pr Scr": "KC_PSCR", "Scr Lck": "KC_SLCK", "Pause": "KC_BRK", "Insert": "KC_INS", "SInsert": "LSFT(KC_INS)", "Home": "KC_HOME", "Pg Up": "KC_PGUP", "Del": "KC_DEL", "End": "KC_END", - "Pg Down": "KC_PGDN", "> Arrow": "KC_RIGHT", "< Arrow": "KC_LEFT", + "Pg Down": "KC_PGDN", "> Arrow": "KC_RGHT", "< Arrow": "KC_LEFT", "v Arrow": "KC_DOWN", "^ Arrow": "KC_UP", # Keypad keycodes missing "App": "KC_APP", "Menu": "KC_MENU", # Command keycodes missing (Execute, Help, ..., Find) # Basic Keycodes missing from Print Screen onwards, included as fallback # random Keycodes - "RGui": "KC_RGUI", "LGui": "KC_LGUI", "LAlt": "KC_LALT", "RAlt": "KC_RALT", "LShift": "KC_LSFT", "LCtrl": "KC_LCTRL", "RCtrl": "KC_RCTRL", + "RGui": "KC_RGUI", "LGui": "KC_LGUI", "LAlt": "KC_LALT", "RAlt": "KC_RALT", "LShift": "KC_LSFT", "LCtrl": "KC_LCTL", "LCtTEsc": "LCTL_T(KC_ESC)", "RCtrl": "KC_RCTL", "LShift(": "KC_LSPO", "RShift)": "KC_RSPC", - "L1_ENT": "LT(1, KC_ENT)", "LT6_SPC": "LT(6, KC_SPC)", - "CPg Dn": "CTL_T(KC_PGDN)", "CPg Up": "CTL_T(KC_PGUP)", + # "LShift(": "LSFT_T(KC_9)", "RShift)": "RSFT_T(RSFT(KC_0))", + "L1_ENT": "LT(1, KC_ENT)", "LT2_BSP": "LT(2,KC_BSPC)", "LT4_DEL": "LT(4,KC_DEL)", "LT4_ENT": "LT(4,KC_ENT)", "LT6_SPC": "LT(6,KC_SPC)", + "CPg Dn": "LCTL(KC_PGDN)", "CPg Up": "LCTL(KC_PGUP)", "S_Enter": "S(KC_ENT)", "S_Tab": "S(KC_TAB)", "Compose": "KC_ALGR", "RShift": "KC_RSFT", "Vol 0": "KC_MUTE", "Vol +": "KC_VOLU", "Vol -": "KC_VOLD", @@ -402,7 +403,7 @@ qmk_dict = { "Undo": "LCTL(KC_Z)", "Cut": "LCTL(KC_X)", "Copy": "LCTL(KC_C)", "Paste": "LCTL(KC_V)", "< Tab": "LCTL(S(KC_TAB))", "> Tab": "LCTL(KC_TAB)", "Tab x": "LCTL(KC_W)", "Tab n": "LCTL(KC_T)", - "Gui Tab": "LGUI_T(KC_TAB)", "< Gui": "LGUI_T(KC_LEFT)", "> Gui": "LGUI_T(KC_RIGHT)", + "Gui Tab": "LGUI(KC_TAB)", "< Gui": "LGUI(KC_LEFT)", "> Gui": "LGUI(KC_RGHT)", "C+A+Del": "LCTL(LALT(KC_DEL))", "Mic 0": "LCTL(KC_M)", "Power": "KC_PWR", "Sleep": "KC_SLEP", @@ -428,58 +429,58 @@ static = ["NEO", "GREEK", "GREEK", "GREEK", "GREEK", "MOUSE"] # 0 qwerty = [ - ["Tab", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "["], - ["LCtrl", "a", "s", "d", "f", "g", "h", "j", "k", "l", ";", "'"], - ["LShift(", "z", "x", "c", "v", "b", "n", "m", ",", ".", "/", "RShift)"], - ["MO2", "LGui", "LAlt", "TT2", "LT6_SPC", "TT4", "Enter", "Space", "TT2", "RAlt", "RGui", "RCtrl"], + "Tab", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "[", + "LCtTEsc", "a", "s", "d", "f", "g", "h", "j", "k", "l", ";", "'", + "LShift(", "z", "x", "c", "v", "b", "n", "m", ",", ".", "/", "RShift)", + "LCtrl", "LAlt", "LGui", "TT2", "LT6_SPC", "LT4_DEL", "LT4_ENT", "Space", "LT2_BSP", "RGui", "RAlt", "RCtrl", ] # 1 colemak = [ - ["Tab", "q", "w", "f", "p", "g", "j", "l", "u", "y", ";", "["], - ["LCtrl", "a", "r", "s", "t", "d", "h", "n", "e", "i", "o", "'"], - ["LShift(", "z", "x", "c", "v", "b", "k", "m", ",", ".", "/", "RShift)"], - ["MO2", "LGui", "LAlt", "TT2", "LT6_SPC", "TT4", "Enter", "Space", "TT2", "RAlt", "RGui", "RCtrl"], + "Tab", "q", "w", "f", "p", "g", "j", "l", "u", "y", ";", "[", + "LCtTEsc", "a", "r", "s", "t", "d", "h", "n", "e", "i", "o", "'", + "LShift(", "z", "x", "c", "v", "b", "k", "m", ",", ".", "/", "RShift)", + "LCtrl", "LAlt", "LGui", "TT2", "LT6_SPC", "LT4_DEL", "LT4_ENT", "Space", "LT2_BSP", "RGui", "RAlt", "RCtrl", ] # 2 numpad = [ - ["`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "]"], - ["", "DF0", "DF1", "XXX", "XXX", "MO3", "4", "4", "5", "6", "-", "="], - ["", "XXX", "XXX", "XXX", "XXX", "MO5", "1", "1", "2", "3", "\\", ""], - ["TG2", "", "", "", "Del", "", "", "BSpace", "0", "", "", ""], + "`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "]", + "", "DF0", "DF1", "XXX", "MO3", "XXX", "4", "4", "5", "6", "-", "=", + "", "MO5", "XXX", "XXX", "XXX", "XXX", "1", "1", "2", "3", "\\", "", + "TG2", "", "", "", "Del", "", "", "BSpace", "0", "", "", "", ] # 3 fpad = [ - ["", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "XXX"], - ["", "XXX", "XXX", "XXX", "XXX", "MO3", "F4", "F4", "F5", "F6", "XXX", "XXX"], - ["", "XXX", "XXX", "XXX", "XXX", "XXX", "F1", "F1", "F2", "F3", "XXX", ""], - ["TG3", "", "", "", "", "", "F10", "F11", "F12", "", "", ""], + "", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "XXX", + "", "XXX", "XXX", "XXX", "MO3", "XXX", "F4", "F4", "F5", "F6", "F11", "XXX", + "", "XXX", "XXX", "XXX", "XXX", "XXX", "F1", "F1", "F2", "F3", "F12", "", + "TG3", "", "", "", "", "", "", "", "", "", "", "", ] # 4 movement = [ - ["Esc", "Esc", "Tab x", "Tab n", "CPg Dn", "CPg Dn", "Pg Down", "Home", "^ Arrow", "Insert", "SInsert", "Esc"], - ["", "Caps", "< Gui", "Gui Tab", "> Gui", "> Gui", "< Arrow", "< Arrow", "v Arrow", "> Arrow", "End", "Pr Scr"], - ["", "XXX", "XXX", "XXX", "CPg Up", "CPg Up", "Pg Up", "XXX", "v Arrow", "XXX", "App", ""], - ["TG4", "", "", "", "Del", "", "", "BSpace", "", "", "", ""], + "Esc", "Esc", "Tab x", "Tab n", "CPg Dn", "CPg Dn", "Pg Down", "Home", "^ Arrow", "Insert", "SInsert", "Esc", + "", "Caps", "< Gui", "Gui Tab", "> Gui", "> Gui", "< Arrow", "< Arrow", "v Arrow", "> Arrow", "End", "Pr Scr", + "", "XXX", "XXX", "XXX", "CPg Up", "CPg Up", "Pg Up", "", "v Arrow", "XXX", "App", "", + "TG4", "", "", "", "Del", "", "", "BSpace", "", "", "", "", ] # 5 media = [ - ["", "XXX", "play/ps", "Vol +", "Vol +", "XXX", "XXX", "XXX", "XXX", "XXX", "_reset", "Power"], - ["", "XXX", "|<<", "Vol 0", ">>|", "XXX", "XXX", "XXX", "XXX", "XXX", "XXX", "Sleep"], - ["", "XXX", "XXX", "Vol -", "Vol -", "MO5", "XXX", "XXX", "XXX", "XXX", "XXX", "XXX"], - ["TG5", "", "", "", "", "", "", "", "", "", "", ""], + "", "XXX", "play/ps", "Vol +", "Vol +", "XXX", "XXX", "XXX", "XXX", "XXX", "_reset", "Power", + "", "XXX", "|<<", "Vol 0", ">>|", "XXX", "XXX", "XXX", "XXX", "XXX", "XXX", "Sleep", + "", "MO5", "XXX", "Vol -", "Vol -", "XXX", "XXX", "XXX", "XXX", "XXX", "XXX", "XXX", + "TG5", "", "", "", "", "", "", "", "", "", "", "", ] # 6 mouse = [ - ["", "acc1", "XXX", "XXX", "XXX", "XXX", "^ Wheel", "< Wheel", "^ Mouse", "> Wheel", "XXX", "XXX"], - ["", "acc2", "Mouse 3", "Mouse 2", "Mouse 1", "Mouse 1", "< Mouse", "< Mouse", "v Mouse", "> Mouse", "XXX", "XXX"], - ["", "acc0", "XXX", "XXX", "XXX", "XXX", "v Wheel", "XXX", "v Mouse", "XXX", "XXX", ""], - ["TG6", "", "", "", "", "", "", "", "", "", "", ""], + "", "acc1", "XXX", "XXX", "XXX", "XXX", "^ Wheel", "< Wheel", "^ Mouse", "> Wheel", "XXX", "XXX", + "", "acc2", "Mouse 2", "Mouse 3", "Mouse 1", "Mouse 1", "< Mouse", "< Mouse", "v Mouse", "> Mouse", "XXX", "XXX", + "", "acc0", "XXX", "XXX", "XXX", "XXX", "v Wheel", "XXX", "v Mouse", "XXX", "XXX", "", + "TG6", "", "", "", "", "", "", "", "", "", "", "", ] layers = [ diff --git a/keyboards/signum/3_0/elitec/keymaps/default/readme.md b/keyboards/signum/3_0/elitec/keymaps/default/readme.md index efd43a9bf..be8cc30e8 100644 --- a/keyboards/signum/3_0/elitec/keymaps/default/readme.md +++ b/keyboards/signum/3_0/elitec/keymaps/default/readme.md @@ -11,10 +11,6 @@ starting point to create your own layouts for the Signum 3.0 with # Customization -- Install `python3` and [Sorted Containers - Library](http://www.grantjenks.com/docs/sortedcontainers/), `pip - install sortedcontainers`. - - Customize `layout.py` to your liking. - Attention 1: keycodes are either translated into symbols and function calls via the `translate()` function in `generate_km.py` @@ -24,4 +20,5 @@ starting point to create your own layouts for the Signum 3.0 with - Attention 2: additional C functions need to be put into `km_template.txt` -Run `./generate_km.py` to regenerate `keymap.c`. +Run `./generate_km.py` to regenerate `keymap.c` and the JSON keymap +definition that should be copied to `qmk_configurator/public/keymaps`. |