aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/kiwikey/kawii9/config.h137
-rw-r--r--keyboards/kiwikey/kawii9/info.json23
-rw-r--r--keyboards/kiwikey/kawii9/kawii9.c17
-rw-r--r--keyboards/kiwikey/kawii9/kawii9.h38
-rw-r--r--keyboards/kiwikey/kawii9/keymaps/default/keymap.c35
-rw-r--r--keyboards/kiwikey/kawii9/keymaps/default/readme.md4
-rw-r--r--keyboards/kiwikey/kawii9/readme.md15
-rw-r--r--keyboards/kiwikey/kawii9/rules.mk22
8 files changed, 291 insertions, 0 deletions
diff --git a/keyboards/kiwikey/kawii9/config.h b/keyboards/kiwikey/kawii9/config.h
new file mode 100644
index 000000000..33ce43f30
--- /dev/null
+++ b/keyboards/kiwikey/kawii9/config.h
@@ -0,0 +1,137 @@
1/*
2Copyright 2020 KiwiKey
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#pragma once
19
20#include "config_common.h"
21
22/* USB Device descriptor parameter */
23#define VENDOR_ID 0x4B57 // KW - KiwiKey
24#define PRODUCT_ID 0x0303 // 3x3
25#define DEVICE_VER 0x0002
26#define MANUFACTURER KiwiKey
27#define PRODUCT Kawii9
28
29/* key matrix size */
30#define MATRIX_ROWS 3
31#define MATRIX_COLS 3
32
33/*
34 * Keyboard Matrix Assignments
35 *
36 * Change this to how you wired your keyboard
37 * COLS: AVR pins used for columns, left to right
38 * ROWS: AVR pins used for rows, top to bottom
39 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
40 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
41 *
42 */
43#define MATRIX_ROW_PINS { B6, B5, B4 }
44#define MATRIX_COL_PINS { F4, F5, F6 }
45#define UNUSED_PINS
46
47/* COL2ROW, ROW2COL */
48#define DIODE_DIRECTION COL2ROW
49
50#define RGB_DI_PIN D3 // Ver1: F0, Ver2: D3
51//#ifdef RGB_DI_PIN
52#define RGBLED_NUM 4
53#define RGBLIGHT_HUE_STEP 8
54#define RGBLIGHT_SAT_STEP 8
55#define RGBLIGHT_VAL_STEP 8
56#define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
57//# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
58/*== all animations enable ==*/
59#define RGBLIGHT_ANIMATIONS
60/*== or choose animations ==*/
61//# define RGBLIGHT_EFFECT_BREATHING
62//# define RGBLIGHT_EFFECT_RAINBOW_MOOD
63//# define RGBLIGHT_EFFECT_RAINBOW_SWIRL
64//# define RGBLIGHT_EFFECT_SNAKE
65//# define RGBLIGHT_EFFECT_KNIGHT
66//# define RGBLIGHT_EFFECT_CHRISTMAS
67//# define RGBLIGHT_EFFECT_STATIC_GRADIENT
68//# define RGBLIGHT_EFFECT_RGB_TEST
69//# define RGBLIGHT_EFFECT_ALTERNATING
70/*== customize breathing effect ==*/
71/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
72//# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
73/*==== use exp() and sin() ====*/
74//# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
75//# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
76//#endif
77
78/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
79#define DEBOUNCE 5
80
81/* define if matrix has ghost (lacks anti-ghosting diodes) */
82//#define MATRIX_HAS_GHOST
83
84/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
85#define LOCKING_SUPPORT_ENABLE
86/* Locking resynchronize hack */
87#define LOCKING_RESYNC_ENABLE
88
89/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
90 * This is useful for the Windows task manager shortcut (ctrl+shift+esc).
91 */
92//#define GRAVE_ESC_CTRL_OVERRIDE
93
94/*
95 * Force NKRO
96 *
97 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
98 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
99 * makefile for this to work.)
100 *
101 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
102 * until the next keyboard reset.
103 *
104 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
105 * fully operational during normal computer usage.
106 *
107 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
108 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
109 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
110 * power-up.
111 *
112 */
113//#define FORCE_NKRO
114
115/*
116 * Feature disable options
117 * These options are also useful to firmware size reduction.
118 */
119
120/* disable debug print */
121//#define NO_DEBUG
122
123/* disable print */
124//#define NO_PRINT
125
126/* disable action features */
127//#define NO_ACTION_LAYER
128//#define NO_ACTION_TAPPING
129//#define NO_ACTION_ONESHOT
130
131/* disable these deprecated features by default */
132#define NO_ACTION_MACRO
133#define NO_ACTION_FUNCTION
134
135/* Bootmagic Lite key configuration */
136//#define BOOTMAGIC_LITE_ROW 0
137//#define BOOTMAGIC_LITE_COLUMN 0
diff --git a/keyboards/kiwikey/kawii9/info.json b/keyboards/kiwikey/kawii9/info.json
new file mode 100644
index 000000000..126afaab7
--- /dev/null
+++ b/keyboards/kiwikey/kawii9/info.json
@@ -0,0 +1,23 @@
1{
2 "keyboard_name": "Kawii9",
3 "url": "http://kiwikey.vn/kawii9/",
4 "manufacturer": "KiwiKey",
5 "maintainer": "KiwiKey",
6 "width": 3,
7 "height": 3,
8 "layouts": {
9 "LAYOUT_ortho_3x3": {
10 "layout": [
11 {"label":"k00", "x":0, "y":0},
12 {"label":"k01", "x":1, "y":0},
13 {"label":"k02", "x":2, "y":0},
14 {"label":"k10", "x":0, "y":1},
15 {"label":"k11", "x":1, "y":1},
16 {"label":"k12", "x":2, "y":1},
17 {"label":"k20", "x":0, "y":2},
18 {"label":"k21", "x":1, "y":2},
19 {"label":"k22", "x":2, "y":2}
20 ]
21 }
22 }
23}
diff --git a/keyboards/kiwikey/kawii9/kawii9.c b/keyboards/kiwikey/kawii9/kawii9.c
new file mode 100644
index 000000000..0e317ca72
--- /dev/null
+++ b/keyboards/kiwikey/kawii9/kawii9.c
@@ -0,0 +1,17 @@
1/* Copyright 2020 KiwiKey
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 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include "kawii9.h"
diff --git a/keyboards/kiwikey/kawii9/kawii9.h b/keyboards/kiwikey/kawii9/kawii9.h
new file mode 100644
index 000000000..b6fc36a57
--- /dev/null
+++ b/keyboards/kiwikey/kawii9/kawii9.h
@@ -0,0 +1,38 @@
1/* Copyright 2020 KiwiKey
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 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19#include "quantum.h"
20
21/* This is a shortcut to help you visually see your layout.
22 *
23 * The first section contains all of the arguments representing the physical
24 * layout of the board and position of the keys.
25 *
26 * The second converts the arguments into a two-dimensional array which
27 * represents the switch matrix.
28 */
29#define LAYOUT_ortho_3x3( \
30 k00, k01, k02, \
31 k10, k11, k12, \
32 k20, k21, k22 \
33) \
34{ \
35 { k00, k01, k02 }, \
36 { k10, k11, k12 }, \
37 { k20, k21, k22 } \
38}
diff --git a/keyboards/kiwikey/kawii9/keymaps/default/keymap.c b/keyboards/kiwikey/kawii9/keymaps/default/keymap.c
new file mode 100644
index 000000000..a43e84d00
--- /dev/null
+++ b/keyboards/kiwikey/kawii9/keymaps/default/keymap.c
@@ -0,0 +1,35 @@
1/* Copyright 2020 KiwiKey
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 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#include QMK_KEYBOARD_H
17
18// Defines names for use in layer keycodes and the keymap
19enum layer_names {
20 _BASE,
21 _FN
22};
23
24const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
25 [_BASE] = LAYOUT_ortho_3x3(
26 KC_MUTE, KC_VOLD, KC_VOLU, // Media volume: Mute - Up - Down
27 KC_MPLY, KC_MPRV, KC_MNXT, // Media track control: Play/Pause - Previous Track - Next Track
28 MO(_FN), LCTL(KC_C), LCTL(KC_V) // FN - Copy - Paste
29 ),
30 [_FN] = LAYOUT_ortho_3x3(
31 RGB_TOG, RGB_MODE_REVERSE, RGB_MODE_FORWARD,
32 _______, RGB_MODE_BREATHE, RGB_MODE_RAINBOW,
33 _______, _______, RESET
34 )
35};
diff --git a/keyboards/kiwikey/kawii9/keymaps/default/readme.md b/keyboards/kiwikey/kawii9/keymaps/default/readme.md
new file mode 100644
index 000000000..874b526c2
--- /dev/null
+++ b/keyboards/kiwikey/kawii9/keymaps/default/readme.md
@@ -0,0 +1,4 @@
1# Default keymap for KiwiKey Kawii9
2
3This is the default keymap which is flashed on every Kawii9 board from the very first Group-buy.
4This keymap contains some basic media commands on BASE layer and RGB underglow control commands on FN layer (FN is the most bottom-left key, by default). \ No newline at end of file
diff --git a/keyboards/kiwikey/kawii9/readme.md b/keyboards/kiwikey/kawii9/readme.md
new file mode 100644
index 000000000..4b10e82fa
--- /dev/null
+++ b/keyboards/kiwikey/kawii9/readme.md
@@ -0,0 +1,15 @@
1# KiwiKey Kawii9
2
3![KiwiKey Kawii9](http://kiwikey.vn/media/Kawii9/Kawii9_render_800px.jpg)
4
5A 3x3 keypad, comes with 2 options: solderable and hotswap (using Kailh hotswap socket).
6
7* Keyboard Maintainer: [KiwiKey](https://github.com/kiwikey)
8* Hardware Supported: Kawii9 PCB
9* Hardware Availability: from Group-buy, will be available for direct purchasing via KiwiKey Website (http://kiwikey.vn/kawii9)
10
11Make example for this keyboard (after setting up your build environment):
12
13 make kiwikey/kawii9:default
14
15See 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). \ No newline at end of file
diff --git a/keyboards/kiwikey/kawii9/rules.mk b/keyboards/kiwikey/kawii9/rules.mk
new file mode 100644
index 000000000..b855c6f45
--- /dev/null
+++ b/keyboards/kiwikey/kawii9/rules.mk
@@ -0,0 +1,22 @@
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 = lite # Virtual DIP switch configuration
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
15# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
16SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
17# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
18NKRO_ENABLE = no # USB Nkey Rollover
19BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
20RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
21BLUETOOTH_ENABLE = yes # Enable Bluetooth
22AUDIO_ENABLE = no # Audio output