aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJP <wongjingping@gmail.com>2021-12-18 16:48:33 +0800
committerGitHub <noreply@github.com>2021-12-18 00:48:33 -0800
commitf79e1ab7481525cfa2b63e6bc062fb7d8250c8db (patch)
treeaa5cdbb9d5365461e6fddc883b80b7ec83532438
parentd8a98aeaf2fb92a5d92a97ed41af5c93cd8480b1 (diff)
downloadqmk_firmware-f79e1ab7481525cfa2b63e6bc062fb7d8250c8db.tar.gz
qmk_firmware-f79e1ab7481525cfa2b63e6bc062fb7d8250c8db.zip
[Keyboard] Add k34 keyboard (#15250)
Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: jingpingw <jingpingw@twitter.com>
-rw-r--r--keyboards/k34/config.h38
-rw-r--r--keyboards/k34/info.json52
-rw-r--r--keyboards/k34/k34.c4
-rw-r--r--keyboards/k34/k34.h26
-rw-r--r--keyboards/k34/keymaps/default/config.h24
-rw-r--r--keyboards/k34/keymaps/default/keymap.c61
-rw-r--r--keyboards/k34/keymaps/default/readme.md1
-rw-r--r--keyboards/k34/keymaps/default/rules.mk1
-rw-r--r--keyboards/k34/readme.md25
-rw-r--r--keyboards/k34/rules.mk18
10 files changed, 250 insertions, 0 deletions
diff --git a/keyboards/k34/config.h b/keyboards/k34/config.h
new file mode 100644
index 000000000..4d9910d50
--- /dev/null
+++ b/keyboards/k34/config.h
@@ -0,0 +1,38 @@
1// Copyright 2021 jp_smasher (@jp_smasher)
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#pragma once
5
6#include "config_common.h"
7
8/* USB Device descriptor parameter */
9#define VENDOR_ID 0xFEED
10#define PRODUCT_ID 0x0000
11#define DEVICE_VER 0x0001
12#define MANUFACTURER jp_smasher
13#define PRODUCT k34
14
15/* key matrix size */
16#define MATRIX_ROWS 4
17#define MATRIX_COLS 10
18
19/*
20 * Keyboard Matrix Assignments
21 *
22 * Change this to how you wired your keyboard
23 * COLS: AVR pins used for columns, left to right
24 * ROWS: AVR pins used for rows, top to bottom
25 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
26 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
27 *
28 */
29#define MATRIX_ROW_PINS { F4, B2, E6, B4 }
30#define MATRIX_COL_PINS { D1, D0, D4, C6, D7, F5, F6, F7, B1, B3 }
31#define UNUSED_PINS { B5, B6, D2, D3 }
32
33/* COL2ROW, ROW2COL */
34#define DIODE_DIRECTION COL2ROW
35
36/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
37#define DEBOUNCE 5
38
diff --git a/keyboards/k34/info.json b/keyboards/k34/info.json
new file mode 100644
index 000000000..0917e4496
--- /dev/null
+++ b/keyboards/k34/info.json
@@ -0,0 +1,52 @@
1{
2 "keyboard_name": "k34",
3 "url": "https://github.com/wongjingping/k34",
4 "maintainer": "qmk",
5 "layouts": {
6 "LAYOUT": {
7 "layout": [
8 { "label": "Q", "x": 0, "y": 0.3 },
9 { "label": "W", "x": 1, "y": 0.1 },
10 { "label": "E", "x": 2, "y": 0 },
11 { "label": "R", "x": 3, "y": 0.1 },
12 { "label": "T", "x": 4, "y": 0.2 },
13
14 { "label": "Y", "x": 8, "y": 0.2 },
15 { "label": "U", "x": 9, "y": 0.1 },
16 { "label": "I", "x": 10, "y": 0 },
17 { "label": "O", "x": 11, "y": 0.1 },
18 { "label": "P", "x": 12, "y": 0.3 },
19
20 { "label": "A", "x": 0, "y": 1.3 },
21 { "label": "S", "x": 1, "y": 1.1 },
22 { "label": "D", "x": 2, "y": 1 },
23 { "label": "F", "x": 3, "y": 1.1 },
24 { "label": "G", "x": 4, "y": 1.2 },
25
26 { "label": "H", "x": 8, "y": 1.2 },
27 { "label": "J", "x": 9, "y": 1.1 },
28 { "label": "K", "x": 10, "y": 1 },
29 { "label": "L", "x": 11, "y": 1.1 },
30 { "label": ";", "x": 12, "y": 1.3 },
31
32 { "label": "Z", "x": 0, "y": 2.3 },
33 { "label": "X", "x": 1, "y": 2.1 },
34 { "label": "C", "x": 2, "y": 2 },
35 { "label": "V", "x": 3, "y": 2.1 },
36 { "label": "B", "x": 4, "y": 2.2 },
37
38 { "label": "N", "x": 8, "y": 2.2 },
39 { "label": "M", "x": 9, "y": 2.1 },
40 { "label": ",", "x": 10, "y": 2 },
41 { "label": ".", "x": 11, "y": 2.1 },
42 { "label": "/", "x": 12, "y": 2.3 },
43
44 { "label": "GUI / KC_HANJ", "x": 3, "y": 3.7 },
45 { "label": "Lower", "x": 4, "y": 3.7 },
46
47 { "label": "Raise", "x": 8, "y": 3.7 },
48 { "label": "Alt / KC_HAEN", "x": 9, "y": 3.7 }
49 ]
50 }
51 }
52} \ No newline at end of file
diff --git a/keyboards/k34/k34.c b/keyboards/k34/k34.c
new file mode 100644
index 000000000..0dffa61ff
--- /dev/null
+++ b/keyboards/k34/k34.c
@@ -0,0 +1,4 @@
1// Copyright 2021 jp_smasher (@jp_smasher)
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#include "k34.h"
diff --git a/keyboards/k34/k34.h b/keyboards/k34/k34.h
new file mode 100644
index 000000000..e34f5408d
--- /dev/null
+++ b/keyboards/k34/k34.h
@@ -0,0 +1,26 @@
1// Copyright 2021 jp_smasher (@jp_smasher)
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#pragma once
5
6#include "quantum.h"
7
8/* This is a shortcut to help you visually see your layout.
9 *
10 * The first section contains all of the arguments representing the physical
11 * layout of the board and position of the keys.
12 *
13 * The second converts the arguments into a two-dimensional array which
14 * represents the switch matrix.
15 */
16#define LAYOUT( \
17 k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \
18 k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \
19 k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \
20 k33, k34, k35, k36 \
21) { \
22 { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \
23 { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \
24 { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \
25 { KC_NO, KC_NO, KC_NO, k33, k34, k35, k36, KC_NO, KC_NO, KC_NO }, \
26}
diff --git a/keyboards/k34/keymaps/default/config.h b/keyboards/k34/keymaps/default/config.h
new file mode 100644
index 000000000..803471e55
--- /dev/null
+++ b/keyboards/k34/keymaps/default/config.h
@@ -0,0 +1,24 @@
1 /* Copyright Wong Jing Ping <@wongjingping>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 */
14
15#pragma once
16
17// use 1 combo
18#define COMBO_COUNT 1
19#define COMBO_TERM 300
20
21// mod taps for home row mods
22#define TAPPING_TERM_PER_KEY
23#define IGNORE_MOD_TAP_INTERRUPT
24
diff --git a/keyboards/k34/keymaps/default/keymap.c b/keyboards/k34/keymaps/default/keymap.c
new file mode 100644
index 000000000..6bd8e402d
--- /dev/null
+++ b/keyboards/k34/keymaps/default/keymap.c
@@ -0,0 +1,61 @@
1// Copyright 2021 jp_smasher (@jp_smasher)
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#include QMK_KEYBOARD_H
5
6// Defines names for use in layer keycodes and the keymap
7enum layer_names {
8 _BASE,
9 _L1,
10 _L2
11};
12
13// define layers
14#define L1 MO(_L1)
15#define L2 LT(_L2, KC_ENT)
16
17// define home-row styled alpha-mods
18#define C_C LCTL_T(KC_C)
19#define C_COMM LCTL_T(KC_COMM)
20#define G_A CMD_T(KC_A)
21#define G_SC CMD_T(KC_SCLN)
22#define A_X LOPT_T(KC_X)
23#define A_DOT LOPT_T(KC_DOT)
24#define S_Z SFT_T(KC_Z)
25#define S_SLSH SFT_T(KC_SLSH)
26
27// combos for application shortcuts
28#define SG_LBRC SGUI(KC_LBRC)
29#define SG_RBRC SGUI(KC_RBRC)
30#define G_LBRC G(KC_LBRC)
31#define G_RBRC G(KC_RBRC)
32#define A_SLSH A(KC_SLSH)
33
34/* combos */
35const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END};
36combo_t key_combos[COMBO_COUNT] = {COMBO(jk_combo, KC_ESC)};
37
38const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
39 /* Base */
40 [_BASE] = LAYOUT(
41 KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
42 G_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, G_SC,
43 S_Z, A_X, C_C, KC_V, KC_B, KC_N, KC_M, C_COMM, A_DOT, S_SLSH,
44 L1, KC_SPC, KC_SPC, L2
45 ),
46
47
48 [_L1] = LAYOUT(
49 KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_MINS, KC_EQL,
50 KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, KC_GRV, KC_QUOT, KC_LBRC, KC_RBRC, KC_BSLS, KC_PIPE,
51 _______, _______, _______, KC_TAB, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MNXT,
52 _______, _______, _______, _______
53 ),
54
55 [_L2] = LAYOUT(
56 KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
57 _______, _______, _______, _______, KC_DOT, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_BSPC,
58 _______, _______, _______, _______, _______, A_SLSH, SG_LBRC, SG_RBRC, G_LBRC, G_RBRC,
59 KC_LALT, KC_LGUI, _______, _______
60 ),
61};
diff --git a/keyboards/k34/keymaps/default/readme.md b/keyboards/k34/keymaps/default/readme.md
new file mode 100644
index 000000000..bad277222
--- /dev/null
+++ b/keyboards/k34/keymaps/default/readme.md
@@ -0,0 +1 @@
# The default keymap for k34
diff --git a/keyboards/k34/keymaps/default/rules.mk b/keyboards/k34/keymaps/default/rules.mk
new file mode 100644
index 000000000..439d48d6e
--- /dev/null
+++ b/keyboards/k34/keymaps/default/rules.mk
@@ -0,0 +1 @@
COMBO_ENABLE = yes # enable combo
diff --git a/keyboards/k34/readme.md b/keyboards/k34/readme.md
new file mode 100644
index 000000000..8f17c7e5d
--- /dev/null
+++ b/keyboards/k34/readme.md
@@ -0,0 +1,25 @@
1# k34
2
3![k34](https://i.imgur.com/tarkFIph.jpeg)
4
5## Keyboard Info
6
7The K34 is a custom 34-key unibody keyboard.
8
9* Keyboard Maintainer: [wongjingping](https://github.com/wongjingping)
10All hardware supported can be found in the [k34 repository](https://github.com/wongjingping/k34)
11
12## Flashing Instructions
13
14To enter the bootloader, short the RST and GND pins, or press the key mapped to `RESET`.
15
16Make example for this keyboard (after setting up your build environment):
17
18 make k34:default
19
20Flashing example for this keyboard:
21
22 make k34:default:flash
23
24See 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).
25
diff --git a/keyboards/k34/rules.mk b/keyboards/k34/rules.mk
new file mode 100644
index 000000000..a61e60c8a
--- /dev/null
+++ b/keyboards/k34/rules.mk
@@ -0,0 +1,18 @@
1# MCU name
2MCU = atmega32u4
3
4# Bootloader selection
5BOOTLOADER = atmel-dfu
6
7# Build Options
8# change yes to no to disable
9#
10BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
11MOUSEKEY_ENABLE = no # Mouse keys
12EXTRAKEY_ENABLE = yes # Audio control and System control
13CONSOLE_ENABLE = no # Console for debug
14COMMAND_ENABLE = no # Commands for debug and configuration
15NKRO_ENABLE = no # Enable N-Key Rollover
16BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
17RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
18AUDIO_ENABLE = no # Audio output