[Keyboard] Add Signum 3.0 for the elite-c (#5478)
* Add keyboard Signum 3.0 for the elite-c * Update readme.md * Remove unused macros * Use bootmagic lite instead of full * Add warning to keymap.c that it's auto-generate * Add description for customizing keyboard layouts * Make generate_km.py executable * Make right shift available in numpad layer * Update keyboards/signum/3_0/elitec/readme.md Co-Authored-By: jceb <jceb@e-jc.de> * Update keyboards/signum/3_0/elitec/readme.md Co-Authored-By: jceb <jceb@e-jc.de> * Fix typo in symbol name
This commit is contained in:
Jan Christoph Ebersbach
committed by
Drashna Jaelre
parent
908966bdf3
commit
eef00e4da1
26
keyboards/signum/3_0/elitec/config.h
Normal file
26
keyboards/signum/3_0/elitec/config.h
Normal file
@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xF1E7
|
||||
#define PRODUCT_ID 0x5163
|
||||
#define DEVICE_VER 0x0000
|
||||
#define MANUFACTURER troyfletcher
|
||||
#define PRODUCT Signum
|
||||
#define DESCRIPTION q.m.k. keyboard firmware for Signum 3.0
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 4
|
||||
#define MATRIX_COLS 12
|
||||
|
||||
/* key matrix pins */
|
||||
#define MATRIX_ROW_PINS { D2, D1, F5, B5 }
|
||||
#define MATRIX_COL_PINS { B4, D7, D0, E6, D4, F6, F4, F7, B1, B3, C6, B2 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
1
keyboards/signum/3_0/elitec/elitec.c
Normal file
1
keyboards/signum/3_0/elitec/elitec.c
Normal file
@ -0,0 +1 @@
|
||||
#include "elitec.h"
|
15
keyboards/signum/3_0/elitec/elitec.h
Normal file
15
keyboards/signum/3_0/elitec/elitec.h
Normal file
@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define LAYOUT( \
|
||||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \
|
||||
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \
|
||||
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \
|
||||
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 \
|
||||
) { \
|
||||
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \
|
||||
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \
|
||||
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \
|
||||
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 } \
|
||||
}
|
76
keyboards/signum/3_0/elitec/info.json
Normal file
76
keyboards/signum/3_0/elitec/info.json
Normal file
@ -0,0 +1,76 @@
|
||||
{
|
||||
"keyboard_name": "Signum 3.0",
|
||||
"url": "http://troyfletcher.net/",
|
||||
"maintainer": "jceb",
|
||||
"width": 17,
|
||||
"height": 8,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"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": 2.25, "y": 0.5, "r": 15 },
|
||||
{ "x": 2.25, "y": 1.5, "r": 15 },
|
||||
{ "x": 2.25, "y": 2.5, "r": 15 },
|
||||
{ "x": 2.25, "y": 3.5, "r": 15 },
|
||||
|
||||
{ "x": 3.25, "y": 0, "r": 15 },
|
||||
{ "x": 3.25, "y": 1, "r": 15 },
|
||||
{ "x": 3.25, "y": 2, "r": 15 },
|
||||
{ "x": 3.25, "y": 3, "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, "r": -15 },
|
||||
{ "x": 12.25, "y": 1, "r": -15 },
|
||||
{ "x": 12.25, "y": 2, "r": -15 },
|
||||
{ "x": 12.25, "y": 3, "r": -15 },
|
||||
|
||||
{ "x": 13.25, "y": 0.5, "r": -15 },
|
||||
{ "x": 13.25, "y": 1.5, "r": -15 },
|
||||
{ "x": 13.25, "y": 2.5, "r": -15 },
|
||||
{ "x": 13.25, "y": 3.5, "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 }
|
||||
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
130
keyboards/signum/3_0/elitec/keymaps/default/generate_km.py
Executable file
130
keyboards/signum/3_0/elitec/keymaps/default/generate_km.py
Executable file
@ -0,0 +1,130 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from sortedcontainers import SortedDict
|
||||
import layout
|
||||
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():
|
||||
length -= 1
|
||||
if length:
|
||||
yield (key, value, False)
|
||||
else:
|
||||
yield (key, value, True)
|
||||
|
||||
|
||||
def translate(s):
|
||||
if re.match("^[0-9]$", s):
|
||||
return ("KC_{0}".format(s), " {0} ".format(s))
|
||||
elif re.match("^[a-z]$", s):
|
||||
return ("KC_{0}".format(s.upper()), " {0} ".format(s))
|
||||
elif re.match("^[A-Z]$", s):
|
||||
return ("S(KC_{0})".format(s), " {0} ".format(s))
|
||||
elif re.match("^F[0-9]{1,2}$", s): # Fn, works from F0 to F99
|
||||
return ("KC_{0}".format(s), "{0:^7}".format(s))
|
||||
elif re.match("^DF[0-9]{1,2}$", s): # DFn, works from DF0 to DF99
|
||||
return ("DF({0})".format(s[2:]), "{0:^7}".format(s))
|
||||
elif re.match("^MO[0-9]{1,2}$", s): # MOn, works from MO0 to MO99
|
||||
return ("MO({0})".format(s[2:]), "{0:^7}".format(s))
|
||||
elif re.match("^OSL[0-9]{1,2}$", s): # OSLn, works from OSL0 to OSL99
|
||||
return ("OSL({0})".format(s[3:]), "{0:^7}".format(s))
|
||||
elif re.match("^TG[0-9]{1,2}$", s): # TGn, works from TG0 to TG99
|
||||
return ("TG({0})".format(s[2:]), "{0:^7}".format(s))
|
||||
elif re.match("^TO[0-9]{1,2}$", s): # Tn, works from TO0 to TO99
|
||||
return ("TO({0})".format(s[2:]), "{0:^7}".format(s))
|
||||
elif re.match("^TT[0-9]{1,2}$", s): # Tn, works from TT0 to TT99
|
||||
return ("TT({0})".format(s[2:]), "{0:^7}".format(s))
|
||||
elif s in layout.uc_dict:
|
||||
return ("X("+s+")", " {0} ".format(chr(int(layout.uc_dict[s], 0))))
|
||||
elif s in layout.qmk_dict:
|
||||
return (layout.qmk_dict[s], "{0:^7}".format(s))
|
||||
elif s == s.upper() and s.startswith("KC_"):
|
||||
return (s, "{0:^7}".format(s[2:]))
|
||||
else:
|
||||
return ("XXXXXXX", " {0} ".format(chr(128165)))
|
||||
|
||||
|
||||
def toKC(s):
|
||||
(kc, lgd) = translate(s)
|
||||
return kc
|
||||
|
||||
|
||||
def toLgd(s):
|
||||
(kc, lgd) = translate(s)
|
||||
return lgd
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
template = open("km_template.txt", mode="r")
|
||||
output = open("keymap.c", mode="w", encoding='utf-8')
|
||||
|
||||
doCopy = False
|
||||
|
||||
for line in template:
|
||||
doCopy = True
|
||||
if line.startswith("//<enum/>"):
|
||||
doCopy = False
|
||||
# output.write(str(layout.uc_dict))
|
||||
for k, v, isLast in gen_uc_iter():
|
||||
if isLast:
|
||||
output.write(k + "\n")
|
||||
else:
|
||||
output.write(k + ",\n")
|
||||
if 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))))
|
||||
else:
|
||||
output.write(u"\t[{0}] = {1}, // {2}\n".format(k, v, chr(int(v, 0))))
|
||||
if 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")
|
||||
|
||||
l_code = '\tLAYOUT(\n'
|
||||
for r in range(r_counter):
|
||||
r_counter -= 1
|
||||
c_counter = 12
|
||||
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])
|
||||
if r_counter or c_counter:
|
||||
l_code += ","
|
||||
l_code += '\n'
|
||||
if counter:
|
||||
l_code += "\t),\n\n"
|
||||
else:
|
||||
l_code += "\t)\n"
|
||||
output.write(l_code)
|
||||
layer += 1
|
||||
if doCopy:
|
||||
output.write(line)
|
||||
|
||||
template.close()
|
||||
output.close()
|
754
keyboards/signum/3_0/elitec/keymaps/default/keymap.c
Normal file
754
keyboards/signum/3_0/elitec/keymaps/default/keymap.c
Normal file
File diff suppressed because it is too large
Load Diff
20
keyboards/signum/3_0/elitec/keymaps/default/km_template.txt
Normal file
20
keyboards/signum/3_0/elitec/keymaps/default/km_template.txt
Normal file
@ -0,0 +1,20 @@
|
||||
/* keymap.c is auto-generated, don't edit it directly.
|
||||
* Further instructions are provided in readme.md */
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
enum unicode_name {
|
||||
//<enum/>
|
||||
};
|
||||
|
||||
const uint32_t PROGMEM unicode_map[] = {
|
||||
//<uc_map/>
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
//<keymaps/>
|
||||
};
|
||||
|
||||
/* vi: ft=c:tw=80:sw=2:ts=2:sts=2:et
|
||||
*/
|
493
keyboards/signum/3_0/elitec/keymaps/default/layout.py
Normal file
493
keyboards/signum/3_0/elitec/keymaps/default/layout.py
Normal file
File diff suppressed because it is too large
Load Diff
27
keyboards/signum/3_0/elitec/keymaps/default/readme.md
Normal file
27
keyboards/signum/3_0/elitec/keymaps/default/readme.md
Normal file
@ -0,0 +1,27 @@
|
||||
# Default layout
|
||||
|
||||
Layout created by: [Jan Christoph Ebersbach](https://github.com/jceb)
|
||||
|
||||
The `generate_km.py` file automatically generates `keymap.c` with
|
||||
additional comments that visually represent the layout.
|
||||
|
||||
This layout is maintained as I am using it. You can also use it as a
|
||||
starting point to create your own layouts for the Signum 3.0 with
|
||||
`km_template.txt` and `generate_km.py`.
|
||||
|
||||
# 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`
|
||||
or via user-defined mappings in the dictionary `qmk_dict` in
|
||||
`layout.py`. Especially the latter might require adjustment for
|
||||
uncommon qmk features
|
||||
- Attention 2: additional C functions need to be put into
|
||||
`km_template.txt`
|
||||
|
||||
Run `./generate_km.py` to regenerate `keymap.c`.
|
14
keyboards/signum/3_0/elitec/readme.md
Normal file
14
keyboards/signum/3_0/elitec/readme.md
Normal file
@ -0,0 +1,14 @@
|
||||
# Signum 3.0
|
||||
|
||||
![Signum 3.0 Top](https://i.redd.it/vl54yl36bpz11.jpg)
|
||||
|
||||
An ergonomic 40% PCB.
|
||||
|
||||
Keyboard Maintainer: [Troy Fletcher](http://troyfletcher.net/)
|
||||
Hardware available here: [Troy Fletcher](http://troyfletcher.net/keyboard_sales.html)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make signum/3_0/elitec:default
|
||||
|
||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
62
keyboards/signum/3_0/elitec/rules.mk
Normal file
62
keyboards/signum/3_0/elitec/rules.mk
Normal file
@ -0,0 +1,62 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
# Bootloader
|
||||
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
||||
# different sizes, comment this out, and the correct address will be loaded
|
||||
# automatically (+60). See bootloader.mk for all options.
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
AUDIO_ENABLE = no
|
||||
RGBLIGHT_ENABLE = no
|
||||
|
||||
UNICODEMAP_ENABLE = yes
|
Reference in New Issue
Block a user