aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKiwiKey <75843996+kiwikey@users.noreply.github.com>2021-12-18 09:29:48 +0700
committerGitHub <noreply@github.com>2021-12-17 18:29:48 -0800
commit4b9ba0dcc5cb708c6197aca941da6248b896aa2b (patch)
tree65980baea3831d076190730a2898815a12c5a148
parent69527be90b3ea40368739517b6cb979364ce4d58 (diff)
downloadqmk_firmware-4b9ba0dcc5cb708c6197aca941da6248b896aa2b.tar.gz
qmk_firmware-4b9ba0dcc5cb708c6197aca941da6248b896aa2b.zip
[Keyboard] Add Borderland (#15501)
Co-authored-by: Drashna Jaelre <drashna@live.com>
-rw-r--r--keyboards/kiwikey/borderland/borderland.c18
-rw-r--r--keyboards/kiwikey/borderland/borderland.h29
-rw-r--r--keyboards/kiwikey/borderland/config.h126
-rw-r--r--keyboards/kiwikey/borderland/info.json82
-rw-r--r--keyboards/kiwikey/borderland/keymaps/default/keymap.c22
-rw-r--r--keyboards/kiwikey/borderland/keymaps/default/readme.md1
-rw-r--r--keyboards/kiwikey/borderland/keymaps/via/keymap.c37
-rw-r--r--keyboards/kiwikey/borderland/keymaps/via/readme.md1
-rw-r--r--keyboards/kiwikey/borderland/keymaps/via/rules.mk1
-rw-r--r--keyboards/kiwikey/borderland/readme.md27
-rw-r--r--keyboards/kiwikey/borderland/rules.mk20
11 files changed, 364 insertions, 0 deletions
diff --git a/keyboards/kiwikey/borderland/borderland.c b/keyboards/kiwikey/borderland/borderland.c
new file mode 100644
index 000000000..660e8026f
--- /dev/null
+++ b/keyboards/kiwikey/borderland/borderland.c
@@ -0,0 +1,18 @@
1// Copyright 2021 KiwiKey (@KiwiKey)
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#include "borderland.h"
5
6#ifdef ENCODER_ENABLE
7bool encoder_update_kb(uint8_t index, bool clockwise) {
8 if (!encoder_update_user(index, clockwise)) { return false; }
9 if (index == 0) {
10 if (clockwise) {
11 tap_code_delay(KC_VOLU, 10);
12 } else {
13 tap_code_delay(KC_VOLD, 10);
14 }
15 }
16 return true;
17}
18#endif
diff --git a/keyboards/kiwikey/borderland/borderland.h b/keyboards/kiwikey/borderland/borderland.h
new file mode 100644
index 000000000..85449a16b
--- /dev/null
+++ b/keyboards/kiwikey/borderland/borderland.h
@@ -0,0 +1,29 @@
1// Copyright 2021 KiwiKey (@KiwiKey)
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, k0A, k0B, k0C, k0D, k0E, k1E, \
18 k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k2E, \
19 k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k3E, \
20 k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, \
21 k40, k42, k44, k45, k47, k49, k4C, k4D, k4E \
22) \
23{ \
24 { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \
25 { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \
26 { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, KC_NO, k2E }, \
27 { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, KC_NO, k3D, k3E }, \
28 { k40, KC_NO, k42, KC_NO, k44, k45, KC_NO, k47, KC_NO, k49, KC_NO, KC_NO, k4C, k4D, k4E } \
29}
diff --git a/keyboards/kiwikey/borderland/config.h b/keyboards/kiwikey/borderland/config.h
new file mode 100644
index 000000000..02a33926a
--- /dev/null
+++ b/keyboards/kiwikey/borderland/config.h
@@ -0,0 +1,126 @@
1// Copyright 2021 KiwiKey (@KiwiKey)
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 0x4B57 // KW - KiwiKey
10#define PRODUCT_ID 0x424C // BL - Borderland
11#define DEVICE_VER 0x0001
12#define MANUFACTURER KiwiKey
13#define PRODUCT Borderland
14
15/* key matrix size */
16#define MATRIX_ROWS 5
17#define MATRIX_COLS 15
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 { D0, D1, D2, D3, D5 }
30#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B0, B7, B5, B4, D7, D6, B3 }
31#define UNUSED_PINS
32
33/* COL2ROW, ROW2COL */
34#define DIODE_DIRECTION COL2ROW
35
36#define ENCODERS_PAD_A { F5 }
37#define ENCODERS_PAD_B { F6 }
38#define ENCODER_RESOLUTION 4
39#define TAP_CODE_DELAY 10
40
41#define RGB_DI_PIN B2
42#ifdef RGB_DI_PIN
43#define RGBLED_NUM 18
44#define RGBLIGHT_HUE_STEP 8
45#define RGBLIGHT_SAT_STEP 8
46#define RGBLIGHT_VAL_STEP 8
47//# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
48//# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
49#define RGBLIGHT_EFFECT_BREATHING
50#define RGBLIGHT_EFFECT_RAINBOW_MOOD
51#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
52#define RGBLIGHT_EFFECT_SNAKE
53#define RGBLIGHT_EFFECT_KNIGHT
54#define RGBLIGHT_EFFECT_CHRISTMAS
55#define RGBLIGHT_EFFECT_STATIC_GRADIENT
56#define RGBLIGHT_EFFECT_RGB_TEST
57#define RGBLIGHT_EFFECT_ALTERNATING
58#define RGBLIGHT_EFFECT_TWINKLE
59/*== customize breathing effect ==*/
60/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
61//# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
62/*==== use exp() and sin() ====*/
63//# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
64//# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
65#endif
66
67/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
68#define DEBOUNCE 5
69
70/* define if matrix has ghost (lacks anti-ghosting diodes) */
71//#define MATRIX_HAS_GHOST
72
73/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
74#define LOCKING_SUPPORT_ENABLE
75/* Locking resynchronize hack */
76#define LOCKING_RESYNC_ENABLE
77
78/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
79 * This is useful for the Windows task manager shortcut (ctrl+shift+esc).
80 */
81//#define GRAVE_ESC_CTRL_OVERRIDE
82
83/*
84 * Force NKRO
85 *
86 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
87 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
88 * makefile for this to work.)
89 *
90 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
91 * until the next keyboard reset.
92 *
93 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
94 * fully operational during normal computer usage.
95 *
96 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
97 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
98 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
99 * power-up.
100 *
101 */
102//#define FORCE_NKRO
103
104/*
105 * Feature disable options
106 * These options are also useful to firmware size reduction.
107 */
108
109/* disable debug print */
110//#define NO_DEBUG
111
112/* disable print */
113//#define NO_PRINT
114
115/* disable action features */
116//#define NO_ACTION_LAYER
117//#define NO_ACTION_TAPPING
118//#define NO_ACTION_ONESHOT
119
120/* disable these deprecated features by default */
121#define NO_ACTION_MACRO
122#define NO_ACTION_FUNCTION
123
124/* Bootmagic Lite key configuration */
125//#define BOOTMAGIC_LITE_ROW 0
126//#define BOOTMAGIC_LITE_COLUMN 0
diff --git a/keyboards/kiwikey/borderland/info.json b/keyboards/kiwikey/borderland/info.json
new file mode 100644
index 000000000..c92df0521
--- /dev/null
+++ b/keyboards/kiwikey/borderland/info.json
@@ -0,0 +1,82 @@
1{
2 "keyboard_name": "Borderland",
3 "url": "https://kiwikey.vn/borderland/",
4 "maintainer": "KiwiKey",
5 "layouts": {
6 "LAYOUT": {
7 "layout": [
8 {"x":0, "y":0},
9 {"x":1, "y":0},
10 {"x":2, "y":0},
11 {"x":3, "y":0},
12 {"x":4, "y":0},
13 {"x":5, "y":0},
14 {"x":6, "y":0},
15 {"x":9, "y":0},
16 {"x":10, "y":0},
17 {"x":11, "y":0},
18 {"x":12, "y":0},
19 {"x":13, "y":0},
20 {"x":14, "y":0},
21 {"x":15, "y":0},
22 {"x":16, "y":0},
23 {"x":17.3, "y":0},
24
25 {"x":0, "y":1, "w":1.5},
26 {"x":1.5, "y":1},
27 {"x":2.5, "y":1},
28 {"x":3.5, "y":1},
29 {"x":4.5, "y":1},
30 {"x":5.5, "y":1},
31 {"x":8.5, "y":1},
32 {"x":9.5, "y":1},
33 {"x":10.5, "y":1},
34 {"x":11.5, "y":1},
35 {"x":12.5, "y":1},
36 {"x":13.5, "y":1},
37 {"x":14.5, "y":1},
38 {"x":15.5, "y":1, "w":1.5},
39 {"x":17.3, "y":1},
40
41 {"x":0, "y":2, "w":1.75},
42 {"x":1.75, "y":2},
43 {"x":2.75, "y":2},
44 {"x":3.75, "y":2},
45 {"x":4.75, "y":2},
46 {"x":5.75, "y":2},
47 {"x":8.75, "y":2},
48 {"x":9.75, "y":2},
49 {"x":10.75, "y":2},
50 {"x":11.75, "y":2},
51 {"x":12.75, "y":2},
52 {"x":13.75, "y":2},
53 {"x":14.75, "y":2, "w":2.25},
54 {"x":17.3, "y":2},
55
56 {"x":0, "y":3, "w":2.25},
57 {"x":2.25, "y":3},
58 {"x":3.25, "y":3},
59 {"x":4.25, "y":3},
60 {"x":5.25, "y":3},
61 {"x":6.25, "y":3},
62 {"x":9.25, "y":3},
63 {"x":10.25, "y":3},
64 {"x":11.25, "y":3},
65 {"x":12.25, "y":3},
66 {"x":13.25, "y":3},
67 {"x":14.25, "y":3, "w":1.75},
68 {"x":16.3, "y":3.25},
69
70 {"x":0, "y":4, "w":1.5},
71 {"x":3.25, "y":4, "w":1.5},
72 {"x":4.75, "y":4, "w":2},
73 {"x":6.75, "y":4, "w":1.25},
74 {"x":8.75, "y":4, "w":2.75},
75 {"x":11.5, "y":4, "w":1.5},
76 {"x":15.3, "y":4.25},
77 {"x":16.3, "y":4.25},
78 {"x":17.3, "y":4.25}
79 ]
80 }
81 }
82}
diff --git a/keyboards/kiwikey/borderland/keymaps/default/keymap.c b/keyboards/kiwikey/borderland/keymaps/default/keymap.c
new file mode 100644
index 000000000..9723158b4
--- /dev/null
+++ b/keyboards/kiwikey/borderland/keymaps/default/keymap.c
@@ -0,0 +1,22 @@
1// Copyright 2021 KiwiKey (@KiwiKey)
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#include QMK_KEYBOARD_H
5
6const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
7 [0] = LAYOUT(
8 KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_PGUP,
9 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_RBRC, KC_BSLS, KC_PGDN,
10 KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, MO(1),
11 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
12 KC_LCTL, KC_LALT, KC_SPC, KC_LGUI, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT
13 ),
14
15 [1] = LAYOUT(
16 _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______,
17 _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
18 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
19 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
20 _______, _______, _______, _______, _______, _______, _______, _______, _______
21 )
22};
diff --git a/keyboards/kiwikey/borderland/keymaps/default/readme.md b/keyboards/kiwikey/borderland/keymaps/default/readme.md
new file mode 100644
index 000000000..44d758912
--- /dev/null
+++ b/keyboards/kiwikey/borderland/keymaps/default/readme.md
@@ -0,0 +1 @@
# The default keymap for Borderland
diff --git a/keyboards/kiwikey/borderland/keymaps/via/keymap.c b/keyboards/kiwikey/borderland/keymaps/via/keymap.c
new file mode 100644
index 000000000..b78793345
--- /dev/null
+++ b/keyboards/kiwikey/borderland/keymaps/via/keymap.c
@@ -0,0 +1,37 @@
1// Copyright 2021 KiwiKey (@KiwiKey)
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#include QMK_KEYBOARD_H
5
6const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
7 [0] = LAYOUT(
8 KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_PGUP,
9 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_RBRC, KC_BSLS, KC_PGDN,
10 KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, MO(1),
11 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
12 KC_LCTL, KC_LALT, KC_SPC, KC_LGUI, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT
13 ),
14
15 [1] = LAYOUT(
16 _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______,
17 _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
18 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
19 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
20 _______, _______, _______, _______, _______, _______, _______, _______, _______
21 ),
22
23 [2] = LAYOUT(
24 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
25 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
26 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
27 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
28 _______, _______, _______, _______, _______, _______, _______, _______, _______
29 ),
30 [3] = LAYOUT(
31 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
32 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
33 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
34 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
35 _______, _______, _______, _______, _______, _______, _______, _______, _______
36 )
37};
diff --git a/keyboards/kiwikey/borderland/keymaps/via/readme.md b/keyboards/kiwikey/borderland/keymaps/via/readme.md
new file mode 100644
index 000000000..ff14495c6
--- /dev/null
+++ b/keyboards/kiwikey/borderland/keymaps/via/readme.md
@@ -0,0 +1 @@
# VIA keymap for Borderland
diff --git a/keyboards/kiwikey/borderland/keymaps/via/rules.mk b/keyboards/kiwikey/borderland/keymaps/via/rules.mk
new file mode 100644
index 000000000..1e5b99807
--- /dev/null
+++ b/keyboards/kiwikey/borderland/keymaps/via/rules.mk
@@ -0,0 +1 @@
VIA_ENABLE = yes
diff --git a/keyboards/kiwikey/borderland/readme.md b/keyboards/kiwikey/borderland/readme.md
new file mode 100644
index 000000000..98f76e0f1
--- /dev/null
+++ b/keyboards/kiwikey/borderland/readme.md
@@ -0,0 +1,27 @@
1# Borderland
2
3![Borderland](https://i.imgur.com/3aMyUJb.jpg)
4
5Another keyboard with well-known Arisu layout, comes with USB Type-C connection and Rotary Encoder. More information can be found at https://kiwikey.vn/borderland/
6
7* Keyboard Maintainer: [KiwiKey](https://github.com/kiwikey)
8* Hardware Supported: Borderland PCB rev1
9* Hardware Availability: [KiwiKey Website](https://kiwikey.vn/)
10
11Make example for this keyboard (after setting up your build environment):
12
13 make kiwikey/borderland:default
14
15Flashing example for this keyboard:
16
17 make kiwikey/borderland:default:flash
18
19See 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).
20
21## Bootloader
22
23Enter the bootloader in 3 ways:
24
25* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
26* **Physical reset button**: Briefly press the button on the back of the PCB
27* **Keycode in layout**: Press the key mapped to `RESET`, in default keymap it is `Fn+R`
diff --git a/keyboards/kiwikey/borderland/rules.mk b/keyboards/kiwikey/borderland/rules.mk
new file mode 100644
index 000000000..c362ae9a8
--- /dev/null
+++ b/keyboards/kiwikey/borderland/rules.mk
@@ -0,0 +1,20 @@
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 = yes # 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 = yes # Enable keyboard RGB underglow
18AUDIO_ENABLE = no # Audio output
19ENCODER_ENABLE = yes
20NO_USB_STARTUP_CHECK = yes