From 6919772fb99f34675ee26d202c26af443d6db287 Mon Sep 17 00:00:00 2001 From: "Eriq M. Adams" Date: Sat, 9 May 2020 05:57:11 +0700 Subject: [PATCH] Add TENKI keyboard (#9029) * Add TENKI keyboard Add TENKI keyboard, default keymap and via keymap * Minor Update Readme.md Change description of hardware supported * change layout name change layout name from ortho_20 to ortho_5x4 * Fix invalid format in info.json Fix invalid format in info.json * Fix invalid format * Fix formatting Fix formatting tenki.h * Fix formatting in keymap.c Fix formatting in keymap.c * Add new line at EOF info.json Add new line at EOF * Fix formatting * Fix formatting * Update rules.mk Fix Formatting --- keyboards/tenki/config.h | 41 ++++++++++++++++++++++++ keyboards/tenki/info.json | 12 +++++++ keyboards/tenki/keymaps/default/keymap.c | 19 +++++++++++ keyboards/tenki/keymaps/via/keymap.c | 38 ++++++++++++++++++++++ keyboards/tenki/keymaps/via/rules.mk | 2 ++ keyboards/tenki/readme.md | 16 +++++++++ keyboards/tenki/rules.mk | 27 ++++++++++++++++ keyboards/tenki/tenki.c | 1 + keyboards/tenki/tenki.h | 18 +++++++++++ 9 files changed, 174 insertions(+) create mode 100644 keyboards/tenki/config.h create mode 100644 keyboards/tenki/info.json create mode 100644 keyboards/tenki/keymaps/default/keymap.c create mode 100644 keyboards/tenki/keymaps/via/keymap.c create mode 100644 keyboards/tenki/keymaps/via/rules.mk create mode 100644 keyboards/tenki/readme.md create mode 100644 keyboards/tenki/rules.mk create mode 100644 keyboards/tenki/tenki.c create mode 100644 keyboards/tenki/tenki.h diff --git a/keyboards/tenki/config.h b/keyboards/tenki/config.h new file mode 100644 index 000000000..b3c7201d8 --- /dev/null +++ b/keyboards/tenki/config.h @@ -0,0 +1,41 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x5058 // "PX" +#define PRODUCT_ID 0x5445 // "TE" +#define DEVICE_VER 0x1001 +#define MANUFACTURER Pixlup +#define PRODUCT TENKI +#define DESCRIPTION Customizable Mechanical Numpad + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B1, B4, F6, B6, B2 } +#define MATRIX_COL_PINS { F4, F5, D4, D0 } +#define UNUSED_PINS + +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D1 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 3 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 10 +#define RGBLIGHT_VAL_STEP 10 +#define RGBLIGHT_SLEEP diff --git a/keyboards/tenki/info.json b/keyboards/tenki/info.json new file mode 100644 index 000000000..6c37a4560 --- /dev/null +++ b/keyboards/tenki/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "TENKI", + "url": "https://tokopedia.com/pixlup", + "maintainer": "eriqadams", + "width": 4, + "height": 5, + "layouts": { + "LAYOUT_ortho_5x4": { + "layout": [{"label":"Num Lock", "x":0, "y":0}, {"label":"/", "x":1, "y":0}, {"label":"*", "x":2, "y":0}, {"label":"-", "x":3, "y":0}, {"label":"7", "x":0, "y":1}, {"label":"8", "x":1, "y":1}, {"label":"9", "x":2, "y":1}, {"label":"+", "x":3, "y":1}, {"label":"4", "x":0, "y":2}, {"label":"5", "x":1, "y":2}, {"label":"6", "x":2, "y":2}, {"label":"Bspc", "x":3, "y":2}, {"label":"1", "x":0, "y":3}, {"label":"2", "x":1, "y":3}, {"label":"3", "x":2, "y":3}, {"label":"=", "x":3, "y":3}, {"label":"0", "x":0, "y":4}, {"label":"PrtScr", "x":1, "y":4}, {"label":".", "x":2, "y":4}, {"label":"Enter", "x":3, "y":4}] + } + } +} diff --git a/keyboards/tenki/keymaps/default/keymap.c b/keyboards/tenki/keymaps/default/keymap.c new file mode 100644 index 000000000..85a8f3230 --- /dev/null +++ b/keyboards/tenki/keymaps/default/keymap.c @@ -0,0 +1,19 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_5x4( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,\ + KC_P7, KC_P8, KC_P9, KC_PPLS,\ + KC_P4, KC_P5, KC_P6, KC_BSPC,\ + KC_P1, KC_P2, KC_P3, KC_PEQL,\ + KC_P0, KC_PSCR , LT(1,KC_PDOT), KC_PENT + ), + + [1] = LAYOUT_ortho_5x4( + KC_TRNS, RGB_HUI, RGB_HUD, RGB_VAD,\ + KC_TRNS, KC_VOLU, RGB_TOG, RGB_VAI,\ + KC_MPRV, KC_MUTE, KC_MNXT, KC_TRNS,\ + KC_TRNS, KC_VOLD, KC_TRNS, KC_TRNS,\ + RESET, KC_TRNS, KC_TRNS, RGB_MOD + ) +}; diff --git a/keyboards/tenki/keymaps/via/keymap.c b/keyboards/tenki/keymaps/via/keymap.c new file mode 100644 index 000000000..9180d8d97 --- /dev/null +++ b/keyboards/tenki/keymaps/via/keymap.c @@ -0,0 +1,38 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_5x4( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,\ + KC_P7, KC_P8, KC_P9, KC_PPLS,\ + KC_P4, KC_P5, KC_P6, KC_BSPC,\ + KC_P1, KC_P2, KC_P3, KC_PEQL,\ + KC_P0, KC_PSCR, LT(1,KC_PDOT), KC_PENT + ), + + [1] = LAYOUT_ortho_5x4( + KC_TRNS, RGB_HUI, RGB_HUD, RGB_VAD,\ + KC_TRNS, KC_VOLU, RGB_TOG, RGB_VAI,\ + KC_MPRV, KC_MUTE, KC_MNXT, KC_TRNS,\ + KC_TRNS, KC_VOLD, KC_TRNS, KC_TRNS,\ + RESET, KC_TRNS, KC_TRNS, RGB_MOD + ), + + [2] = LAYOUT_ortho_5x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [3] = LAYOUT_ortho_5x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, 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/tenki/keymaps/via/rules.mk b/keyboards/tenki/keymaps/via/rules.mk new file mode 100644 index 000000000..36b7ba9cb --- /dev/null +++ b/keyboards/tenki/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/tenki/readme.md b/keyboards/tenki/readme.md new file mode 100644 index 000000000..bb9d42406 --- /dev/null +++ b/keyboards/tenki/readme.md @@ -0,0 +1,16 @@ +# TENKI +![TENKI](https://i.imgur.com/nOaxFwR.png) + +TENKI is a customizable hotswap mechanical numpad. +Supported layout: +![TENKI LAYOUT](https://i.imgur.com/sD9kxID.png) + +Keyboard Maintainer: [eriqadams](https://github.com/eriqadams) +Hardware Supported: TENKI PCB, Pro Micro +Hardware Availability: [If you're in Indonesia you can purchase here](https://tokopedia.com/pixlup) + +Make example for this keyboard (after setting up your build environment): + + make tenki: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). diff --git a/keyboards/tenki/rules.mk b/keyboards/tenki/rules.mk new file mode 100644 index 000000000..4c47d369b --- /dev/null +++ b/keyboards/tenki/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +BOOTLOADER = caterina + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +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 = yes + +LAYOUTS = ortho_5x4 diff --git a/keyboards/tenki/tenki.c b/keyboards/tenki/tenki.c new file mode 100644 index 000000000..318f8d475 --- /dev/null +++ b/keyboards/tenki/tenki.c @@ -0,0 +1 @@ +#include "tenki.h" diff --git a/keyboards/tenki/tenki.h b/keyboards/tenki/tenki.h new file mode 100644 index 000000000..29ec6303a --- /dev/null +++ b/keyboards/tenki/tenki.h @@ -0,0 +1,18 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_5x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33, \ + K40, K41, K42, K43 \ +) { \ + { K00, K01, K02, K03}, \ + { K10, K11, K12, K13}, \ + { K20, K21, K22, K23}, \ + { K30, K31, K32, K33}, \ + { K40, K41, K42, K43} \ +} +