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
This commit is contained in:
Eriq M. Adams 2020-05-09 05:57:11 +07:00 committed by GitHub
parent fedd8e81d1
commit 6919772fb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 174 additions and 0 deletions

41
keyboards/tenki/config.h Normal file
View File

@ -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

12
keyboards/tenki/info.json Normal file
View File

@ -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}]
}
}
}

View File

@ -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
)
};

View File

@ -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
)
};

View File

@ -0,0 +1,2 @@
VIA_ENABLE = yes
LTO_ENABLE = yes

16
keyboards/tenki/readme.md Normal file
View File

@ -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).

27
keyboards/tenki/rules.mk Normal file
View File

@ -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

1
keyboards/tenki/tenki.c Normal file
View File

@ -0,0 +1 @@
#include "tenki.h"

18
keyboards/tenki/tenki.h Normal file
View File

@ -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} \
}