summaryrefslogtreecommitdiff
path: root/keyboards/kbdfans/niu_mini
diff options
context:
space:
mode:
authorzvecr <git@zvecr.com>2022-02-25 23:45:40 +0000
committerzvecr <git@zvecr.com>2022-02-25 23:45:40 +0000
commite7931289918221081cbe2a7ea5df27a5d86324db (patch)
tree0b06145520f8aaf5ff5cb928aa5176fc2dd23619 /keyboards/kbdfans/niu_mini
parentc0ee3d2c79388187883b1b1b1d1a0b6842acf741 (diff)
parentcf31355f08dca311a013168eb3eb995e2fc6a3d1 (diff)
Merge remote-tracking branch 'origin/develop'
Diffstat (limited to 'keyboards/kbdfans/niu_mini')
-rw-r--r--keyboards/kbdfans/niu_mini/config.h85
-rw-r--r--keyboards/kbdfans/niu_mini/info.json111
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/abhixec/keymap.c183
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/abhixec/readme.md5
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/abhixec/rules.mk1
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/codecoffeecode/keymap.c103
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/codecoffeecode/readme.md5
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/default/keymap.c58
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/default/readme.md2
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/dyesub/keymap.c74
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/dyesub/readme.md7
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/dyesub/rules.mk2
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/edvard/keymap.c194
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/edvard/readme.md5
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/framtava/config.h29
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/framtava/keymap.c279
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/framtava/readme.md2
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/framtava/rules.mk3
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/mason/keymap.c114
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/nosarthur/README.md35
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/nosarthur/keymap.c8
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/nosarthur/keymap_colemak_dh.json1
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/nosarthur/keymap_qwerty.json1
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/nosarthur/rules.mk4
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/planck/config.h29
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/planck/keymap.c261
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/planck/readme.md2
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/planck/rules.mk1
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/tobias/config.h37
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/tobias/keymap.c413
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/tobias/readme.md2
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/tobias/rules.mk2
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/tucznak/config.h16
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/tucznak/keymap.c133
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/tucznak/readme.md5
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/tucznak/rules.mk22
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/via/keymap.c79
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/via/rules.mk2
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/xtonhasvim/config.h40
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/xtonhasvim/keymap.c264
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/xtonhasvim/readme.md9
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/xtonhasvim/rules.mk5
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/yttyx/README.md32
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/yttyx/config.h4
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/yttyx/keymap.c95
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/yttyx/rules.mk10
-rw-r--r--keyboards/kbdfans/niu_mini/niu_mini.c19
-rw-r--r--keyboards/kbdfans/niu_mini/niu_mini.h31
-rw-r--r--keyboards/kbdfans/niu_mini/readme.md19
-rw-r--r--keyboards/kbdfans/niu_mini/rules.mk25
50 files changed, 2868 insertions, 0 deletions
diff --git a/keyboards/kbdfans/niu_mini/config.h b/keyboards/kbdfans/niu_mini/config.h
new file mode 100644
index 0000000000..96210cf3d0
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/config.h
@@ -0,0 +1,85 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x6E6D
+#define PRODUCT_ID 0x0001
+#define DEVICE_VER 0x0001
+#define MANUFACTURER KBDFans
+#define PRODUCT NIU Mini
+
+/* key matrix size */
+#define MATRIX_ROWS 4
+#define MATRIX_COLS 12
+
+/* NIU Mini PCB default pin-out */
+#define MATRIX_ROW_PINS { D0, D1, D2, D3 }
+#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, B3, B1, B0, D5, B7, C7 }
+#define UNUSED_PINS
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/* define if matrix has ghost */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+#define BACKLIGHT_PIN B6
+#ifdef BACKLIGHT_PIN
+ #define BACKLIGHT_LEVELS 4
+#endif
+
+/* 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
+
+#define RGB_DI_PIN E2
+#ifdef RGB_DI_PIN
+ #define RGBLIGHT_ANIMATIONS
+ #define RGBLED_NUM 14
+ #define RGBLIGHT_HUE_STEP 8
+ #define RGBLIGHT_SAT_STEP 8
+ #define RGBLIGHT_VAL_STEP 8
+#endif
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
diff --git a/keyboards/kbdfans/niu_mini/info.json b/keyboards/kbdfans/niu_mini/info.json
new file mode 100644
index 0000000000..1c4310576e
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/info.json
@@ -0,0 +1,111 @@
+{
+ "keyboard_name": "NIU Mini",
+ "url": "",
+ "maintainer": "qmk",
+ "layouts": {
+ "LAYOUT_ortho_4x12": {
+ "layout": [
+ {"x":0, "y":0},
+ {"x":1, "y":0},
+ {"x":2, "y":0},
+ {"x":3, "y":0},
+ {"x":4, "y":0},
+ {"x":5, "y":0},
+ {"x":6, "y":0},
+ {"x":7, "y":0},
+ {"x":8, "y":0},
+ {"x":9, "y":0},
+ {"x":10, "y":0},
+ {"x":11, "y":0},
+ {"x":0, "y":1},
+ {"x":1, "y":1},
+ {"x":2, "y":1},
+ {"x":3, "y":1},
+ {"x":4, "y":1},
+ {"x":5, "y":1},
+ {"x":6, "y":1},
+ {"x":7, "y":1},
+ {"x":8, "y":1},
+ {"x":9, "y":1},
+ {"x":10, "y":1},
+ {"x":11, "y":1},
+ {"x":0, "y":2},
+ {"x":1, "y":2},
+ {"x":2, "y":2},
+ {"x":3, "y":2},
+ {"x":4, "y":2},
+ {"x":5, "y":2},
+ {"x":6, "y":2},
+ {"x":7, "y":2},
+ {"x":8, "y":2},
+ {"x":9, "y":2},
+ {"x":10, "y":2},
+ {"x":11, "y":2},
+ {"x":0, "y":3},
+ {"x":1, "y":3},
+ {"x":2, "y":3},
+ {"x":3, "y":3},
+ {"x":4, "y":3},
+ {"x":5, "y":3},
+ {"x":6, "y":3},
+ {"x":7, "y":3},
+ {"x":8, "y":3},
+ {"x":9, "y":3},
+ {"x":10, "y":3},
+ {"x":11, "y":3}
+ ]
+ },
+
+ "LAYOUT_planck_mit": {
+ "layout": [
+ {"x":0, "y":0},
+ {"x":1, "y":0},
+ {"x":2, "y":0},
+ {"x":3, "y":0},
+ {"x":4, "y":0},
+ {"x":5, "y":0},
+ {"x":6, "y":0},
+ {"x":7, "y":0},
+ {"x":8, "y":0},
+ {"x":9, "y":0},
+ {"x":10, "y":0},
+ {"x":11, "y":0},
+ {"x":0, "y":1},
+ {"x":1, "y":1},
+ {"x":2, "y":1},
+ {"x":3, "y":1},
+ {"x":4, "y":1},
+ {"x":5, "y":1},
+ {"x":6, "y":1},
+ {"x":7, "y":1},
+ {"x":8, "y":1},
+ {"x":9, "y":1},
+ {"x":10, "y":1},
+ {"x":11, "y":1},
+ {"x":0, "y":2},
+ {"x":1, "y":2},
+ {"x":2, "y":2},
+ {"x":3, "y":2},
+ {"x":4, "y":2},
+ {"x":5, "y":2},
+ {"x":6, "y":2},
+ {"x":7, "y":2},
+ {"x":8, "y":2},
+ {"x":9, "y":2},
+ {"x":10, "y":2},
+ {"x":11, "y":2},
+ {"x":0, "y":3},
+ {"x":1, "y":3},
+ {"x":2, "y":3},
+ {"x":3, "y":3},
+ {"x":4, "y":3},
+ {"x":5, "y":3, "w":2},
+ {"x":7, "y":3},
+ {"x":8, "y":3},
+ {"x":9, "y":3},
+ {"x":10, "y":3},
+ {"x":11, "y":3}
+ ]
+ }
+ }
+}
diff --git a/keyboards/kbdfans/niu_mini/keymaps/abhixec/keymap.c b/keyboards/kbdfans/niu_mini/keymaps/abhixec/keymap.c
new file mode 100644
index 0000000000..6d3ff8a376
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/abhixec/keymap.c
@@ -0,0 +1,183 @@
+/* Copyright 2015-2017 Jack Humbert
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include QMK_KEYBOARD_H
+
+extern keymap_config_t keymap_config;
+
+enum layers {
+ _QWERTY,
+ _COLEMAK,
+ _LOWER,
+ _RAISE,
+ _ADJUST
+};
+
+enum keycodes {
+ QWERTY = SAFE_RANGE,
+ COLEMAK,
+ LOWER,
+ RAISE,
+ BACKLIT,
+ EXT_PLV
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_QWERTY] = LAYOUT_planck_mit(
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
+ _______, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+
+/* Colemak
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | R | S | T | D | H | N | E | I | O | " |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_COLEMAK] = LAYOUT_planck_mit(
+ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
+ KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
+ _______, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+
+/* Lower
+ * ,-----------------------------------------------------------------------------------.
+ * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_LOWER] = LAYOUT_planck_mit(
+ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
+
+/* Raise
+ * ,-----------------------------------------------------------------------------------.
+ * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_RAISE] = LAYOUT_planck_mit(
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
+
+/* Adjust (Lower + Raise)
+ * ,-----------------------------------------------------------------------------------.
+ * | | Reset| | | | | | | | | | Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | | | |AG_NRM|AG_SWP|Qwerty|Colemk| | | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_ADJUST] = LAYOUT_planck_mit(
+ _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL ,
+ _______, _______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
+
+
+};
+
+
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case QWERTY:
+ if (record->event.pressed) {
+ print("mode just switched to qwerty and this is a huge string\n");
+ set_single_persistent_default_layer(_QWERTY);
+ }
+ return false;
+ break;
+ case COLEMAK:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_COLEMAK);
+ }
+ return false;
+ break;
+ case LOWER:
+ if (record->event.pressed) {
+ layer_on(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case RAISE:
+ if (record->event.pressed) {
+ layer_on(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case BACKLIT:
+ if (record->event.pressed) {
+ register_code(KC_RSFT);
+ #ifdef BACKLIGHT_ENABLE
+ backlight_step();
+ #endif
+ } else {
+ unregister_code(KC_RSFT);
+ }
+ return false;
+ break;
+ }
+ return true;
+}
diff --git a/keyboards/kbdfans/niu_mini/keymaps/abhixec/readme.md b/keyboards/kbdfans/niu_mini/keymaps/abhixec/readme.md
new file mode 100644
index 0000000000..1bc312a039
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/abhixec/readme.md
@@ -0,0 +1,5 @@
+# Abhixec's Layout
+
+This is inspired by planck but removed most of the unwanted and extra features of planck that is not there in this keyboard.
+
+
diff --git a/keyboards/kbdfans/niu_mini/keymaps/abhixec/rules.mk b/keyboards/kbdfans/niu_mini/keymaps/abhixec/rules.mk
new file mode 100644
index 0000000000..3bf3f27314
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/abhixec/rules.mk
@@ -0,0 +1 @@
+AUDIO_ENABLE = no
diff --git a/keyboards/kbdfans/niu_mini/keymaps/codecoffeecode/keymap.c b/keyboards/kbdfans/niu_mini/keymaps/codecoffeecode/keymap.c
new file mode 100644
index 0000000000..7c794b2037
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/codecoffeecode/keymap.c
@@ -0,0 +1,103 @@
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* Layer 0
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Ctrl | GUI | Caps | Alt |Layer1| Space |Layer2| Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+ [0] = LAYOUT_planck_mit(
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
+ KC_LCTL, KC_LGUI, KC_CAPS, KC_LALT, MO(1), KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+ ),
+
+ /* Layer 1
+ * ,-----------------------------------------------------------------------------------.
+ * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | Vol- | Vol+ | Mute | | | | F11 | F12 | | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Reset| | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+ [1] = LAYOUT_planck_mit(
+ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,
+ _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, KC_F11, KC_F12, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+
+ /* Layer 2 (r_ Indicates RGB Controls)
+ * ,-----------------------------------------------------------------------------------.
+ * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | |r_TOG |r_Mode|r_Hue+|r_Hue-| | | - | = | [ | ] | \ |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | |BL_TOG|BL_STEP| | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+ [2] = LAYOUT_planck_mit(
+ _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
+ _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ )
+};
+
+
+void matrix_init_user(void) {
+}
+
+void matrix_scan_user(void) {
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ return true;
+}
+
+void led_set_user(uint8_t usb_led) {
+
+ if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
+
+ } else {
+
+ }
+
+ if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
+
+ } else {
+
+ }
+
+ if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
+
+ } else {
+
+ }
+
+ if (IS_LED_ON(usb_led, USB_LED_COMPOSE)) {
+
+ } else {
+
+ }
+
+ if (IS_LED_ON(usb_led, USB_LED_KANA)) {
+
+ } else {
+
+ }
+
+}
diff --git a/keyboards/kbdfans/niu_mini/keymaps/codecoffeecode/readme.md b/keyboards/kbdfans/niu_mini/keymaps/codecoffeecode/readme.md
new file mode 100644
index 0000000000..661e24c9fa
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/codecoffeecode/readme.md
@@ -0,0 +1,5 @@
+## CodeCoffeeCode's 40% Keymap
+
+- Added Delete to Layer 1
+- Swapped Tab and Esc like on the Planck EZ
+- Put all the Arrows on the bottom row, moving the Forward Slash to beside Enter \ No newline at end of file
diff --git a/keyboards/kbdfans/niu_mini/keymaps/default/keymap.c b/keyboards/kbdfans/niu_mini/keymaps/default/keymap.c
new file mode 100644
index 0000000000..c0f5d06c7b
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/default/keymap.c
@@ -0,0 +1,58 @@
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* Layer 0
+ * ,-----------------------------------------------------------------------------------.
+ * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Tab | A | S | D | F | G | H | J | K | L | ; | " |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | N | M | , | . | Up |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Ctrl | GUI | Caps | Alt |Layer1| Space |Layer2| / | Left | Down |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+ [0] = LAYOUT_planck_mit(
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT,
+ KC_LCTL, KC_LGUI, KC_CAPS, KC_LALT, MO(1), KC_SPC, MO(2), KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT
+ ),
+
+ /* Layer 1
+ * ,-----------------------------------------------------------------------------------.
+ * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | Vol- | Vol+ | Mute | | | | F11 | F12 | | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Reset| | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+ [1] = LAYOUT_planck_mit(
+ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,
+ _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, KC_F11, KC_F12, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+
+ /* Layer 2 (r_ Indicates RGB Controls)
+ * ,-----------------------------------------------------------------------------------.
+ * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | |r_TOG |r_Mode|r_Hue+|r_Hue-| | | - | = | [ | ] | \ |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | |BL_TOG|BL_STEP| | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+ [2] = LAYOUT_planck_mit(
+ _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
+ _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ )
+};
diff --git a/keyboards/kbdfans/niu_mini/keymaps/default/readme.md b/keyboards/kbdfans/niu_mini/keymaps/default/readme.md
new file mode 100644
index 0000000000..a2f2aa2f46
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/default/readme.md
@@ -0,0 +1,2 @@
+# Default layout
+Default layout that shipped with the NIU mini
diff --git a/keyboards/kbdfans/niu_mini/keymaps/dyesub/keymap.c b/keyboards/kbdfans/niu_mini/keymaps/dyesub/keymap.c
new file mode 100644
index 0000000000..d859062d39
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/dyesub/keymap.c
@@ -0,0 +1,74 @@
+ /* Copyright 2020 Chus Jara Peinado
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* Layer 0
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | S | D | F | G | H | J | K | L | ; |Enter |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | N | M | , | . | Up | ? |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Ctrl | GUI | Alt | " |Layer1| Space |Layer2| - | Left | Down |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+ [0] = LAYOUT_planck_mit(
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_SLSH,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_QUOT, MO(1), KC_SPC, MO(2), KC_MINS, KC_LEFT, KC_DOWN, KC_RGHT
+ ),
+
+ /* Layer 1
+ * ,-----------------------------------------------------------------------------------.
+ * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | F11 | F12 | | | | | | | | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | |Reset |
+ * `-----------------------------------------------------------------------------------'
+ */
+ [1] = LAYOUT_planck_mit(
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,
+ _______, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET
+ ),
+
+ /* Layer 2 (r_ Indicates RGB Controls)
+ * ,-----------------------------------------------------------------------------------.
+ * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | | | | | | [ | ] | \ | " | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | | | | | | - | = | | | Vol+ |PrtScr|
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | Vol- | Mute |
+ * `-----------------------------------------------------------------------------------'
+ */
+ [2] = LAYOUT_planck_mit(
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
+ _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_BSLS, KC_QUOT, _______, _______,
+ _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, _______, _______, KC_VOLU, KC_PSCR,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_MUTE
+ )
+};
diff --git a/keyboards/kbdfans/niu_mini/keymaps/dyesub/readme.md b/keyboards/kbdfans/niu_mini/keymaps/dyesub/readme.md
new file mode 100644
index 0000000000..e276c4d060
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/dyesub/readme.md
@@ -0,0 +1,7 @@
+# Dye sub layout
+
+Simple layout based on the keycaps [DYE SUB](https://kbdfans.com/collections/oem-profile/products/40-layou-dye-sub-keycaps) from KDBFans.
+
+## Notes
+- There is a different ESC key position in this layout.
+- The mouse key, backlight and console for debug are disabled (Enable them by just modifying the `rules.mk` file).
diff --git a/keyboards/kbdfans/niu_mini/keymaps/dyesub/rules.mk b/keyboards/kbdfans/niu_mini/keymaps/dyesub/rules.mk
new file mode 100644
index 0000000000..c5f09480a3
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/dyesub/rules.mk
@@ -0,0 +1,2 @@
+MOUSEKEY_ENABLE = no
+BACKLIGHT_ENABLE = no
diff --git a/keyboards/kbdfans/niu_mini/keymaps/edvard/keymap.c b/keyboards/kbdfans/niu_mini/keymaps/edvard/keymap.c
new file mode 100644
index 0000000000..aca4a86b0e
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/edvard/keymap.c
@@ -0,0 +1,194 @@
+/* Copyright 2021 Edvard Sire
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include QMK_KEYBOARD_H
+
+enum layers {
+ _QWERTY,
+ _NUMPAD,
+ _ARROWS,
+ _SPECIAL,
+ _FPS,
+ _FIGHTING,
+ _MOBA,
+ _MOBA2,
+ _MOUSE
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* QWERTY
+ * ,--------------------------------------------------------------------------------------,
+ * |Esc/~ | Q | W | E | R | T | Y | U | I | O | P | Bksp |
+ * |------+------+------+------+-------+------+------+--------+------+--------------------|
+ * | Tab | A | S | D | F | G | H | J | K | L | ; | " |
+ * |------+------+------+------+-------+------+------+--------+------+--------------------|
+ * |Numpad| Z | X | C | V | B | N | M | , | . | / |Arrows|
+ * |------+------+------+------+-------+------+---------------+------+--------------------|
+ * | Ctrl | GUI | | Alt |Special| Space |RS/Enter|Mouse | | Fps | Del |
+ * `--------------------------------------------------------------------------------------`
+ */
+[_QWERTY] = LAYOUT_planck_mit(
+ KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ MO(1), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(2),
+ KC_LCTL, KC_LGUI, KC_TRNS, KC_LALT, MO(3), KC_SPC, KC_SFTENT, MO(8), KC_TRNS, TO(4), KC_DEL
+),
+
+/* NUMPAD
+ * ,-----------------------------------------------------------------------------------.
+ * | | |Power | |RGBmoG| | | 7 | 8 | 9 | | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | | Prev | Play | Next | | | 4 | 5 | 6 | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Trns | |RGBmo-|RBGmd+|RGBtog| | | 1 | 2 | 3 | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | Space | 0 | , | . | |Reset |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_NUMPAD] = LAYOUT_planck_mit(
+ KC_NO, KC_NO, KC_PWR, KC_NO, RGB_M_G, KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_NO, KC_BSPC,
+ KC_NO, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, KC_NO, KC_4, KC_5, KC_6, KC_NO, KC_NO,
+ KC_TRNS, KC_NO, RGB_RMOD, RGB_MOD, RGB_TOG, KC_NO, KC_NO, KC_1, KC_2, KC_3, KC_NO, KC_NO,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_SPC, KC_0, KC_COMM, KC_DOT, KC_NO, RESET
+),
+
+/* ARROWS
+ * ,-----------------------------------------------------------------------------------.
+ * | | F1 | F2 | F3 | F4 | | | | Up | | | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | F5 | F6 | F7 | F8 | | | Left | Down |Right | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F9 | F10 | F11 | F12 | | | | | | | Trns |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |LCtrl | F13 | F14 | F15 | F16 | Left Alt | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_ARROWS] = LAYOUT_planck_mit(
+ KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_NO, KC_NO, KC_NO, KC_UP, KC_NO, KC_NO, KC_BSPC,
+ KC_NO, KC_F5, KC_F6, KC_F7, KC_F8, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO,
+ KC_NO, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS,
+ KC_LCTL, KC_F13, KC_F14, KC_F15, KC_F16, KC_LALT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO
+),
+
+/* SPECIAL
+ * ,-----------------------------------------------------------------------------------.
+ * | ~ | ! | @ | # | $ | % | ^ | * | ( | ) | \ | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | [ | | | | & | | - | [ | ] | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | | | | | | | = | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | Trns | Space |LShift| | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_SPECIAL] = LAYOUT_planck_mit(
+ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSLS, KC_BSPC,
+ KC_NO, KC_LBRC, KC_NO, KC_NO, KC_NO, KC_AMPR, KC_NO, KC_MINS, KC_LBRC, KC_RBRC, KC_NO, KC_NO,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_EQL, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_SPC, KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO
+),
+
+/* FPS
+ * ,-----------------------------------------------------------------------------------.
+ * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 |QWERTY|
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * |RShift| Q | W | E | R | T | Y |QWERTY| | | | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Tab | A | S | D | G | B | ` | | | | MOBA | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |LCtrl | Z | X | LAlt |LShift| Space |Enter | | | Trns |FIGHTI|
+ * `-----------------------------------------------------------------------------------'
+ */
+[_FPS] = LAYOUT_planck_mit(
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, TO(0),
+ KC_RSFT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, TO(0), KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_TAB, KC_A, KC_S, KC_D, KC_G, KC_B, KC_GRV, KC_NO, KC_NO, KC_NO, TO(6), KC_NO,
+ KC_LCTL, KC_Z, KC_X, KC_LALT, KC_LSFT, KC_SPC, KC_ENT, KC_NO, KC_NO, KC_TRNS, TO(5)
+),
+
+/* FIGHTING
+ * ,-----------------------------------------------------------------------------------.
+ * | Esc | | W | | | | | | | | |QWERTY|
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Tab | A | S | D | | | | J | K | L | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |LCtrl | | | | H | Space | | | | | Trns |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_FIGHTING] = LAYOUT_planck_mit(
+ KC_ESC, KC_NO, KC_W, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TO(0),
+ KC_TAB, KC_A, KC_S, KC_D, KC_NO, KC_NO, KC_NO, KC_J, KC_K, KC_L, KC_NO, KC_NO,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_LCTL, KC_NO, KC_NO, KC_NO, KC_H, KC_SPC, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS
+),
+
+/* MOBA
+ * ,-----------------------------------------------------------------------------------.
+ * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | | | | |QWERTY|
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * |RShift| Q | W | E | R | T | Y |QWERTY| | | | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Tab | A | S | D | F | G | B | | | | Trns | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |LCtrl | Z | X | LAlt |MOBA2 | Space |Enter | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_MOBA] = LAYOUT_planck_mit(
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_NO, KC_NO, KC_NO, KC_NO, TO(0),
+ KC_RSFT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, TO(0), KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_B, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO,
+ KC_LCTL, KC_Z, KC_X, KC_LALT, MO(7), KC_SPC, KC_ENT, KC_NO, KC_NO, KC_NO, KC_NO
+ ),
+
+/* MOBA2
+ * ,-----------------------------------------------------------------------------------.
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | F1 | F2 | F3 | F4 | | | | | | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | Trns | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_MOBA2] = LAYOUT_planck_mit(
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO
+),
+
+/* MOBA2
+ * ,-----------------------------------------------------------------------------------.
+ * | | | | MUp | | | | MWUp |MWDown| | | |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | |MLeft |MDown |MRight| | |Mouse1|Mouse2| | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | Trns | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_MOUSE] = LAYOUT_planck_mit(
+ KC_NO, KC_NO, KC_NO, KC_MS_U, KC_NO, KC_NO, KC_NO, KC_WH_U, KC_WH_D, KC_NO, KC_NO, KC_NO,
+ KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_NO, KC_BTN1, KC_BTN2, KC_NO, KC_NO, KC_NO,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO
+ )
+};
diff --git a/keyboards/kbdfans/niu_mini/keymaps/edvard/readme.md b/keyboards/kbdfans/niu_mini/keymaps/edvard/readme.md
new file mode 100644
index 0000000000..32846b4a55
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/edvard/readme.md
@@ -0,0 +1,5 @@
+# Edvard's layout
+
+An efficient 40% keyboard layout
+
+[Writeup](https://github.com/EdvardSire/keyboard)
diff --git a/keyboards/kbdfans/niu_mini/keymaps/framtava/config.h b/keyboards/kbdfans/niu_mini/keymaps/framtava/config.h
new file mode 100644
index 0000000000..0c42bb5060
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/framtava/config.h
@@ -0,0 +1,29 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+#define MUSIC_MASK (keycode != KC_NO)
+
+/*
+ * MIDI options
+ */
+
+/* enable basic MIDI features:
+ - MIDI notes can be sent when in Music mode is on
+*/
+
+#define MIDI_BASIC
+
+/* enable advanced MIDI features:
+ - MIDI notes can be added to the keymap
+ - Octave shift and transpose
+ - Virtual sustain, portamento, and modulation wheel
+ - etc.
+*/
+//#define MIDI_ADVANCED
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 2
+
+#endif
diff --git a/keyboards/kbdfans/niu_mini/keymaps/framtava/keymap.c b/keyboards/kbdfans/niu_mini/keymaps/framtava/keymap.c
new file mode 100644
index 0000000000..5ffbd1b49a
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/framtava/keymap.c
@@ -0,0 +1,279 @@
+/* Copyright 2015-2017 Jack Humbert
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include QMK_KEYBOARD_H
+
+extern keymap_config_t keymap_config;
+
+enum layers {
+ _QWERTY,
+ _COLEMAK,
+ _DVORAK,
+ _LOWER,
+ _RAISE,
+ _PLOVER,
+ _ADJUST,
+ _BACKLIT
+};
+
+enum keycodes {
+ QWERTY = SAFE_RANGE,
+ COLEMAK,
+ DVORAK,
+ PLOVER,
+ LOWER,
+ RAISE,
+ BACKLIT,
+ EXT_PLV
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Ctrl | Alt | GUI |Brite |Lower | Space |Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_QWERTY] = LAYOUT_planck_mit(
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
+ KC_LCTL, KC_LGUI, KC_LALT, BACKLIT, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+
+/* Colemak
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | R | S | T | D | H | N | E | I | O | " |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Ctrl | Alt | GUI |Brite |Lower | Space |Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_COLEMAK] = LAYOUT_planck_mit(
+ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
+ KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
+ KC_LCTL, KC_LGUI, KC_LALT, BACKLIT, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+
+/* Dvorak
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | O | E | U | I | D | H | T | N | S | / |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Ctrl | Alt | GUI |Brite |Lower | Space |Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_DVORAK] = LAYOUT_planck_mit(
+ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC,
+ KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH,
+ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT ,
+ KC_LCTL, KC_LGUI, KC_LALT, BACKLIT, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+
+/* Lower
+ * ,-----------------------------------------------------------------------------------.
+ * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | End | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_LOWER] = LAYOUT_planck_mit(
+ _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_TILD,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, KC_PIPE, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
+),
+
+/* Raise
+ * ,-----------------------------------------------------------------------------------.
+ * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del | 4 | 5 | 6 | | | | - | = | [ | ] | \ |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | 7 | 8 | 9 | | | |ISO # |ISO / |Pg Up |Pg Dn | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | 0 | | | | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_RAISE] = LAYOUT_planck_mit(
+ KC_NLCK, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
+ KC_DEL, KC_4, KC_5, KC_6, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_GRV,
+ _______, KC_7, KC_8, KC_9, _______, _______, _______, _______, KC_PSCR, _______, KC_BSLS, _______,
+ _______, _______, _______, KC_0, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
+
+/* Plover layer (http://opensteno.org)
+ * ,-----------------------------------------------------------------------------------.
+ * | # | # | # | # | # | # | # | # | # | # | # | # |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | S | T | P | H | * | * | F | P | L | T | D |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | S | K | W | R | * | * | R | B | G | S | Z |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Exit | | | A | O | | E | U | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+
+[_PLOVER] = LAYOUT_planck_mit(
+ KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 ,
+ XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
+ XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX
+),
+
+/* Adjust (Lower + Raise)
+ * ,-----------------------------------------------------------------------------------.
+ * | | Reset| | | | | | | | | | Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_ADJUST] = LAYOUT_planck_mit(
+ _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL ,
+ _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______,
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
+
+/* Adjust (Lower + Raise)
+ * ,-----------------------------------------------------------------------------------.
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | TOG | | | | | | | | | | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | MOD | HUI | HUD |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_BACKLIT] = LAYOUT_planck_mit(
+ _______, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, _______, _______, _______,
+ RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_VAD,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, RGB_SAD,
+ _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_RMOD, RGB_HUI, RGB_HUD
+)
+
+
+};
+
+#ifdef AUDIO_ENABLE
+ float plover_song[][2] = SONG(PLOVER_SOUND);
+ float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND);
+#endif
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case QWERTY:
+ if (record->event.pressed) {
+ print("mode just switched to qwerty and this is a huge string\n");
+ set_single_persistent_default_layer(_QWERTY);
+ }
+ return false;
+ break;
+ case COLEMAK:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_COLEMAK);
+ }
+ return false;
+ break;
+ case DVORAK:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_DVORAK);
+ }
+ return false;
+ break;
+ case LOWER:
+ if (record->event.pressed) {
+ layer_on(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case RAISE:
+ if (record->event.pressed) {
+ layer_on(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case BACKLIT:
+ if (record->event.pressed) {
+ layer_on(_BACKLIT);
+ // update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_BACKLIT);
+ // update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case PLOVER:
+ if (record->event.pressed) {
+ #ifdef AUDIO_ENABLE
+ stop_all_notes();
+ PLAY_SONG(plover_song);
+ #endif
+ layer_off(_RAISE);
+ layer_off(_LOWER);
+ layer_off(_ADJUST);
+ layer_on(_PLOVER);
+ if (!eeconfig_is_enabled()) {
+ eeconfig_init();
+ }
+ keymap_config.raw = eeconfig_read_keymap();
+ keymap_config.nkro = 1;
+ eeconfig_update_keymap(keymap_config.raw);
+ }
+ return false;
+ break;
+ case EXT_PLV:
+ if (record->event.pressed) {
+ #ifdef AUDIO_ENABLE
+ PLAY_SONG(plover_gb_song);
+ #endif
+ layer_off(_PLOVER);
+ }
+ return false;
+ break;
+ }
+ return true;
+}
diff --git a/keyboards/kbdfans/niu_mini/keymaps/framtava/readme.md b/keyboards/kbdfans/niu_mini/keymaps/framtava/readme.md
new file mode 100644
index 0000000000..de9680b498
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/framtava/readme.md
@@ -0,0 +1,2 @@
+# The Default Planck Layout
+
diff --git a/keyboards/kbdfans/niu_mini/keymaps/framtava/rules.mk b/keyboards/kbdfans/niu_mini/keymaps/framtava/rules.mk
new file mode 100644
index 0000000000..8cf6f7d5cb
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/framtava/rules.mk
@@ -0,0 +1,3 @@
+CONSOLE_ENABLE = no # Console for debug(+400)
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode \ No newline at end of file
diff --git a/keyboards/kbdfans/niu_mini/keymaps/mason/keymap.c b/keyboards/kbdfans/niu_mini/keymaps/mason/keymap.c
new file mode 100644
index 0000000000..4f2e2b37b5
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/mason/keymap.c
@@ -0,0 +1,114 @@
+#include QMK_KEYBOARD_H
+
+enum layers {
+ _QWERTY,
+ _LOWER,
+ _RAISE,
+ _ADJUST
+};
+
+enum keycodes {
+ LOWER,
+ RAISE
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* Qwerty
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Ctrl | A | S | D | F | G | H | J | K | L | ;: | '" |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | N | M | ,< | .> | /? |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Caps | Esc | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+ [_QWERTY] = LAYOUT_planck_mit(
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
+ KC_CAPS, KC_ESC, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+ ),
+
+ /* Lower
+ * ,-----------------------------------------------------------------------------------.
+ * | | ! | @ | # | $ | % | ^ | & | * | ( | ) | |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 | ~ | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+ [_LOWER] = LAYOUT_planck_mit(
+ _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_GRV), S(KC_BSLS), _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+ ),
+
+ /* Raise
+ * ,-----------------------------------------------------------------------------------.
+ * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | Ins | Home | PgUp | Pscr | Slck | Paus | - | = | [ | ] | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | Del | End | PgDn | Nlck | | | ` | \ | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+ [_RAISE] = LAYOUT_planck_mit(
+ _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
+ _______, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______,
+ _______, KC_DEL, KC_END, KC_PGDN, KC_NLCK, _______, _______, KC_GRV, KC_BSLS, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+ ),
+
+ /* Adjust (Lower + Raise)
+ * ,-----------------------------------------------------------------------------------.
+ * | | Reset| | | | | | | | | | |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | |BLtogg|BLstep| | | | | | | | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | |RGBtog|RGBhui|RGBhud|RGBmod|RGBsai|RGBsad| | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+ [_ADJUST] = LAYOUT_planck_mit(
+ _______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_POWER,
+ _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, RGB_TOG, RGB_HUI, RGB_HUD, RGB_MOD, RGB_SAI, RGB_SAD, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ )
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case LOWER:
+ if (record->event.pressed) {
+ layer_on(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case RAISE:
+ if (record->event.pressed) {
+ layer_on(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ }
+ return true;
+}
diff --git a/keyboards/kbdfans/niu_mini/keymaps/nosarthur/README.md b/keyboards/kbdfans/niu_mini/keymaps/nosarthur/README.md
new file mode 100644
index 0000000000..9d57ceb5f7
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/nosarthur/README.md
@@ -0,0 +1,35 @@
+# Kbdfans Niu Mini
+
+Here `keymap.c` is generated by [qmk configurator](https://config.qmk.fm) and
+it corresponds to the colemak-dh layout.
+
+To customize, upload the json file to qmk configurator
+
+- `keymap_colemak_dh.json`: colemak-dh layout
+- `keymap_qwerty.json`: qwerty layout
+
+Make the modification via the web interface, "compile" and download "keymap only".
+Then place the generated `keymap.c` in this folder.
+
+To flush the firmware, connect your keyboard and run
+
+```
+make niu_mini:nosarthur:dtu
+```
+in the `qmk_firmware` source folder.
+There will be some prompts saying no device is found. Click the reset button in
+the back of your keyboard and it should work.
+
+# notes from qmk configurator
+
+This layout was generated by the QMK API. You can find the JSON data used to
+generate this keymap in the file layers.json.
+
+To make use of this file you will need follow the following steps:
+
+* Download or Clone QMK Firmware: <https://github.com/qmk/qmk_firmware/>
+* Extract QMK Firmware to a location on your hard drive
+* Copy this folder into %s
+* You are now ready to compile or use your keymap with the source
+
+More information can be found in the QMK docs: <https://docs.qmk.fm>
diff --git a/keyboards/kbdfans/niu_mini/keymaps/nosarthur/keymap.c b/keyboards/kbdfans/niu_mini/keymaps/nosarthur/keymap.c
new file mode 100644
index 0000000000..fe719fc821
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/nosarthur/keymap.c
@@ -0,0 +1,8 @@
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_planck_mit(KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS, KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_G, KC_K, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_M, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LGUI, TT(3), KC_LALT, KC_LCTL, LT(2,KC_BSPC), KC_SPC, LT(1,KC_ENT), KC_COLN, KC_2, KC_1, KC_0),
+ [1] = LAYOUT_planck_mit(KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_MINS, KC_COLN, KC_PIPE, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LCBR, KC_RCBR, KC_DOT, KC_SLSH, KC_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_CAPS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_PLUS),
+ [2] = LAYOUT_planck_mit(KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_VOLU, KC_MUTE, KC_NO, KC_LT, KC_GT, KC_LPRN, KC_RPRN, KC_NO, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_VOLD, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_LBRC, KC_RBRC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP),
+ [3] = LAYOUT_planck_mit(KC_F1, KC_F2, KC_MS_U, KC_F3, KC_F4, KC_7, KC_8, KC_9, KC_MINS, KC_F10, KC_F11, KC_F12, KC_BTN2, KC_MS_L, KC_MS_D, KC_MS_R, KC_F5, KC_4, KC_5, KC_6, KC_PLUS, RGB_HUI, RGB_HUD, RGB_TOG, KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_1, KC_2, KC_3, KC_ENT, KC_ASTR, KC_SLSH, RGB_MOD, KC_TRNS, TO(0), KC_TRNS, KC_BTN1, KC_TRNS, KC_0, KC_DOT, KC_NO, KC_NO, KC_NO, KC_NO)
+};
diff --git a/keyboards/kbdfans/niu_mini/keymaps/nosarthur/keymap_colemak_dh.json b/keyboards/kbdfans/niu_mini/keymaps/nosarthur/keymap_colemak_dh.json
new file mode 100644
index 0000000000..8dc43350c8
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/nosarthur/keymap_colemak_dh.json
@@ -0,0 +1 @@
+{"keyboard":"niu_mini","keymap":"22","layout":"LAYOUT_planck_mit","layers":[["KC_TAB","KC_Q","KC_W","KC_F","KC_P","KC_B","KC_J","KC_L","KC_U","KC_Y","KC_SCLN","KC_MINS","KC_ESC","KC_A","KC_R","KC_S","KC_T","KC_G","KC_K","KC_N","KC_E","KC_I","KC_O","KC_QUOT","KC_LSFT","KC_Z","KC_X","KC_C","KC_D","KC_V","KC_M","KC_H","KC_COMM","KC_DOT","KC_SLSH","KC_RSFT","KC_LGUI","TT(3)","KC_LALT","KC_LCTL","LT(2,KC_BSPC)","KC_SPC","LT(1,KC_ENT)","KC_COLN","KC_2","KC_1","KC_0"],["KC_GRV","KC_1","KC_2","KC_3","KC_4","KC_5","KC_6","KC_7","KC_8","KC_9","KC_0","KC_EQL","KC_TILD","KC_EXLM","KC_AT","KC_HASH","KC_DLR","KC_PERC","KC_CIRC","KC_AMPR","KC_ASTR","KC_MINS","KC_COLN","KC_PIPE","KC_TRNS","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_LCBR","KC_RCBR","KC_DOT","KC_SLSH","KC_BSLS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_CAPS","KC_TRNS","KC_NO","KC_NO","KC_NO","KC_PLUS"],["KC_TILD","KC_EXLM","KC_AT","KC_HASH","KC_DLR","KC_PERC","KC_PGUP","KC_HOME","KC_UP","KC_END","KC_VOLU","KC_MUTE","KC_NO","KC_LT","KC_GT","KC_LPRN","KC_RPRN","KC_NO","KC_PGDN","KC_LEFT","KC_DOWN","KC_RGHT","KC_VOLD","KC_NO","KC_TRNS","KC_NO","KC_NO","KC_LBRC","KC_RBRC","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_DEL","KC_TRNS","KC_MPRV","KC_MNXT","KC_MPLY","KC_MSTP"],["KC_F1","KC_F2","KC_MS_U","KC_F3","KC_F4","KC_7","KC_8","KC_9","KC_MINS","KC_F10","KC_F11","KC_F12","KC_BTN2","KC_MS_L","KC_MS_D","KC_MS_R","KC_F5","KC_4","KC_5","KC_6","KC_PLUS","RGB_HUI","RGB_HUD","RGB_TOG","KC_TRNS","KC_F6","KC_F7","KC_F8","KC_F9","KC_1","KC_2","KC_3","KC_ENT","KC_ASTR","KC_SLSH","RGB_MOD","KC_TRNS","TO(0)","KC_TRNS","KC_BTN1","KC_TRNS","KC_0","KC_DOT","KC_NO","KC_NO","KC_NO","KC_NO"]],"author":"Dong Zhou","notes":"My awesome keymap"} \ No newline at end of file
diff --git a/keyboards/kbdfans/niu_mini/keymaps/nosarthur/keymap_qwerty.json b/keyboards/kbdfans/niu_mini/keymaps/nosarthur/keymap_qwerty.json
new file mode 100644
index 0000000000..ec9b945f4f
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/nosarthur/keymap_qwerty.json
@@ -0,0 +1 @@
+{"keyboard":"niu_mini","keymap":"14","layout":"LAYOUT_planck_mit","layers":[["KC_TAB","KC_Q","KC_W","KC_E","KC_R","KC_T","KC_Y","KC_U","KC_I","KC_O","KC_P","KC_MINS","KC_ESC","KC_A","KC_S","KC_D","KC_F","KC_G","KC_H","KC_J","KC_K","KC_L","KC_SCLN","KC_QUOT","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_LGUI","TT(3)","KC_LALT","KC_LCTL","LT(2,KC_BSPC)","KC_SPC","LT(1,KC_ENT)","KC_3","KC_2","KC_1","KC_0"],["KC_GRV","KC_1","KC_2","KC_3","KC_4","KC_5","KC_6","KC_7","KC_8","KC_9","KC_0","KC_EQL","KC_TILD","KC_EXLM","KC_AT","KC_HASH","KC_DLR","KC_PERC","KC_CIRC","KC_AMPR","KC_ASTR","KC_NO","KC_COLN","KC_PIPE","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_LCBR","KC_RCBR","KC_DOT","KC_SLSH","KC_BSLS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_CAPS","KC_TRNS","KC_NO","KC_NO","KC_NO","KC_PLUS"],["KC_TILD","KC_EXLM","KC_AT","KC_HASH","KC_DLR","KC_PERC","KC_NO","KC_NO","KC_UP","KC_VOLD","KC_VOLU","KC_MUTE","KC_NO","KC_LT","KC_GT","KC_LPRN","KC_RPRN","KC_NO","KC_NO","KC_LEFT","KC_DOWN","KC_RGHT","KC_PGDN","KC_PGUP","KC_NO","KC_NO","KC_NO","KC_LBRC","KC_RBRC","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_HOME","KC_TRNS","KC_MPRV","KC_MNXT","KC_MPLY","KC_MSTP"],["KC_F1","KC_F2","KC_MS_U","KC_F3","KC_F4","KC_7","KC_8","KC_9","KC_MINS","KC_F10","KC_F11","KC_F12","KC_BTN2","KC_MS_L","KC_MS_D","KC_MS_R","KC_NO","KC_4","KC_5","KC_6","KC_PLUS","RGB_HUI","RGB_HUD","RGB_TOG","KC_F5","KC_F6","KC_F7","KC_F8","KC_F9","KC_1","KC_2","KC_3","KC_ENT","KC_ASTR","KC_SLSH","RGB_MOD","KC_TRNS","TO(0)","KC_TRNS","KC_BTN1","KC_TRNS","KC_0","KC_DOT","KC_NO","KC_NO","KC_NO","KC_NO"]],"author":"Dong Zhou","notes":"My awesome keymap"} \ No newline at end of file
diff --git a/keyboards/kbdfans/niu_mini/keymaps/nosarthur/rules.mk b/keyboards/kbdfans/niu_mini/keymaps/nosarthur/rules.mk
new file mode 100644
index 0000000000..37ba40cdfe
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/nosarthur/rules.mk
@@ -0,0 +1,4 @@
+MOUSEKEY_ENABLE = yes
+BACKLIGHT_ENABLE = no
+AUDIO_ENABLE = no
+CONSOLE_ENABLE = no # Console for debug(+400)
diff --git a/keyboards/kbdfans/niu_mini/keymaps/planck/config.h b/keyboards/kbdfans/niu_mini/keymaps/planck/config.h
new file mode 100644
index 0000000000..0c42bb5060
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/planck/config.h
@@ -0,0 +1,29 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+#define MUSIC_MASK (keycode != KC_NO)
+
+/*
+ * MIDI options
+ */
+
+/* enable basic MIDI features:
+ - MIDI notes can be sent when in Music mode is on
+*/
+
+#define MIDI_BASIC
+
+/* enable advanced MIDI features:
+ - MIDI notes can be added to the keymap
+ - Octave shift and transpose
+ - Virtual sustain, portamento, and modulation wheel
+ - etc.
+*/
+//#define MIDI_ADVANCED
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 2
+
+#endif
diff --git a/keyboards/kbdfans/niu_mini/keymaps/planck/keymap.c b/keyboards/kbdfans/niu_mini/keymaps/planck/keymap.c
new file mode 100644
index 0000000000..f7f933c7b1
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/planck/keymap.c
@@ -0,0 +1,261 @@
+/* Copyright 2015-2017 Jack Humbert
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include QMK_KEYBOARD_H
+
+extern keymap_config_t keymap_config;
+
+enum layers {
+ _QWERTY,
+ _COLEMAK,
+ _DVORAK,
+ _LOWER,
+ _RAISE,
+ _PLOVER,
+ _ADJUST
+};
+
+enum keycodes {
+ QWERTY = SAFE_RANGE,
+ COLEMAK,
+ DVORAK,
+ PLOVER,
+ LOWER,
+ RAISE,
+ BACKLIT,
+ EXT_PLV
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_QWERTY] = LAYOUT_planck_mit(
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
+ BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+
+/* Colemak
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | R | S | T | D | H | N | E | I | O | " |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_COLEMAK] = LAYOUT_planck_mit(
+ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
+ KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
+ BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+
+/* Dvorak
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | O | E | U | I | D | H | T | N | S | / |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_DVORAK] = LAYOUT_planck_mit(
+ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC,
+ KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH,
+ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT ,
+ BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+
+/* Lower
+ * ,-----------------------------------------------------------------------------------.
+ * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_LOWER] = LAYOUT_planck_mit(
+ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
+
+/* Raise
+ * ,-----------------------------------------------------------------------------------.
+ * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_RAISE] = LAYOUT_planck_mit(
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
+
+/* Plover layer (http://opensteno.org)
+ * ,-----------------------------------------------------------------------------------.
+ * | # | # | # | # | # | # | # | # | # | # | # | # |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | S | T | P | H | * | * | F | P | L | T | D |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | S | K | W | R | * | * | R | B | G | S | Z |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Exit | | | A | O | | E | U | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+
+[_PLOVER] = LAYOUT_planck_mit(
+ KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1,
+ XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
+ XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX
+),
+
+/* Adjust (Lower + Raise)
+ * ,-----------------------------------------------------------------------------------.
+ * | | Reset| | | | | | | | | | Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_ADJUST] = LAYOUT_planck_mit(
+ _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL ,
+ _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______,
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
+
+
+};
+
+#ifdef AUDIO_ENABLE
+ float plover_song[][2] = SONG(PLOVER_SOUND);
+ float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND);
+#endif
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case QWERTY:
+ if (record->event.pressed) {
+ print("mode just switched to qwerty and this is a huge string\n");
+ set_single_persistent_default_layer(_QWERTY);
+ }
+ return false;
+ break;
+ case COLEMAK:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_COLEMAK);
+ }
+ return false;
+ break;
+ case DVORAK:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_DVORAK);
+ }
+ return false;
+ break;
+ case LOWER:
+ if (record->event.pressed) {
+ layer_on(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case RAISE:
+ if (record->event.pressed) {
+ layer_on(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case BACKLIT:
+ if (record->event.pressed) {
+ register_code(KC_RSFT);
+ #ifdef BACKLIGHT_ENABLE
+ backlight_step();
+ #endif
+ } else {
+ unregister_code(KC_RSFT);
+ }
+ return false;
+ break;
+ case PLOVER:
+ if (record->event.pressed) {
+ #ifdef AUDIO_ENABLE
+ stop_all_notes();
+ PLAY_SONG(plover_song);
+ #endif
+ layer_off(_RAISE);
+ layer_off(_LOWER);
+ layer_off(_ADJUST);
+ layer_on(_PLOVER);
+ if (!eeconfig_is_enabled()) {
+ eeconfig_init();
+ }
+ keymap_config.raw = eeconfig_read_keymap();
+ keymap_config.nkro = 1;
+ eeconfig_update_keymap(keymap_config.raw);
+ }
+ return false;
+ break;
+ case EXT_PLV:
+ if (record->event.pressed) {
+ #ifdef AUDIO_ENABLE
+ PLAY_SONG(plover_gb_song);
+ #endif
+ layer_off(_PLOVER);
+ }
+ return false;
+ break;
+ }
+ return true;
+}
diff --git a/keyboards/kbdfans/niu_mini/keymaps/planck/readme.md b/keyboards/kbdfans/niu_mini/keymaps/planck/readme.md
new file mode 100644
index 0000000000..de9680b498
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/planck/readme.md
@@ -0,0 +1,2 @@
+# The Default Planck Layout
+
diff --git a/keyboards/kbdfans/niu_mini/keymaps/planck/rules.mk b/keyboards/kbdfans/niu_mini/keymaps/planck/rules.mk
new file mode 100644
index 0000000000..8b13789179
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/planck/rules.mk
@@ -0,0 +1 @@
+
diff --git a/keyboards/kbdfans/niu_mini/keymaps/tobias/config.h b/keyboards/kbdfans/niu_mini/keymaps/tobias/config.h
new file mode 100644
index 0000000000..ad72b6b6c5
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/tobias/config.h
@@ -0,0 +1,37 @@
+#pragma once
+
+//#include "../../config.h"
+
+//#define MUSIC_MASK (keycode != KC_NO)
+
+/*
+ * MIDI options
+ */
+
+/* enable basic MIDI features:
+ - MIDI notes can be sent when in Music mode is on
+*/
+
+//#define MIDI_BASIC
+
+/* enable advanced MIDI features:
+ - MIDI notes can be added to the keymap
+ - Octave shift and transpose
+ - Virtual sustain, portamento, and modulation wheel
+ - etc.
+*/
+//#define MIDI_ADVANCED
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 2
+
+#define RGBLIGHT_SLEEP
+#define TAPPING_TOGGLE 2
+#define ALT_F4 LALT(KC_F4)
+#define CTALDEL LSFT(LCTL(KC_ESC))
+#define NO_DEBUG
+#define CTLZ LCTL(KC_Z)
+#define CTLX LCTL(KC_X)
+#define CTLC LCTL(KC_C)
+#define CTLV LCTL(KC_V)
+
diff --git a/keyboards/kbdfans/niu_mini/keymaps/tobias/keymap.c b/keyboards/kbdfans/niu_mini/keymaps/tobias/keymap.c
new file mode 100644
index 0000000000..935dd5c506
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/tobias/keymap.c
@@ -0,0 +1,413 @@
+ /* Copyright 2015-2017 Jack Humbert
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include QMK_KEYBOARD_H
+
+// extern keymap_config_t keymap_config;
+
+enum layers {
+ _QWERTY,
+ _FNL1,
+ _MOUSE,
+ _LOWER,
+ _RAISE,
+ _FNL2,
+ _ADJUST,
+ _GAMEMODE,
+ _FNL3, _LOWER2,
+ _RAISE2
+};
+
+enum custom_keycodes {
+ TBMACRO = SAFE_RANGE,
+ DGRMCRO,
+ WRKMOD
+};
+
+bool bnumlock = false;
+bool numlock_changed = false;
+bool workmode = true;
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | FNL1 | A | S | D | F | G | H | J | K | L | ; | " |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Ctrl | GUI | Alt | Bksp |Lower | Space |Raise | Bksp | AltGr| * | Esc |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_QWERTY] = LAYOUT_ortho_4x12(
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
+ TT(_FNL1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_DEL, TT(_LOWER), KC_SPC, KC_SPC, TT(_RAISE), KC_BSPC, KC_RALT, KC_NUHS, KC_ESC
+),
+
+
+/* FNL1
+ * ,-----------------------------------------------------------------------------------.
+ * |TbMacr| Prev | Play | Next | AltF4| CapsL| Esc | PgUp | Up | PgDn |PrScrn| Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | | Vol- | Vol+ | Mute | NumL | Home | Left | Down | Right| | Del |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | | | | | | End | | | | ? | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | ! | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_FNL1] = LAYOUT_ortho_4x12(
+ TBMACRO, KC_MPRV, KC_MPLY, KC_MNXT, ALT_F4, KC_CAPS, KC_ESC, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_BSPC,
+ TT(_FNL1), _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_NLCK, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_DEL,
+ KC_LSFT, CTLZ, CTLX, CTLC, CTLV, _______, KC_END, _______, _______, _______, LSFT(KC_MINS), _______,
+ _______, _______, CTALDEL, _______, _______, _______, _______, TO(_MOUSE), _______, _______, LSFT(KC_1), _______
+),
+
+[_MOUSE] = {
+ { KC_TAB, XXXXXXX, XXXXXXX, KC_MS_UP, XXXXXXX, KC_T, XXXXXXX, KC_MS_BTN3, KC_MS_WH_UP, KC_MS_BTN2, XXXXXXX, KC_MS_ACCEL0 },
+ {TO(_QWERTY), XXXXXXX, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, XXXXXXX, XXXXXXX, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_RIGHT, XXXXXXX, KC_MS_ACCEL1},
+ {_______, KC_Z, KC_X, KC_C, KC_V, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_ACCEL2},
+ {KC_LCTL, TO(_QWERTY), KC_LALT, _______, TO(_QWERTY), KC_MS_BTN1, XXXXXXX, TO(_QWERTY), _______, _______, TO(_QWERTY), TO(_QWERTY)}
+},
+
+/* Raise
+ * ,-----------------------------------------------------------------------------------.
+ * | § | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | + |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | ´ | ` | @ | £ | $ | € | ¨ | { | [ | ] | } | \ |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | < | | | > | ° | | | µ | ¨ | ^ | ~ | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | AltGr| | | | | | | | BAIL |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_RAISE] = LAYOUT_ortho_4x12(
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
+ KC_EQL, S(KC_EQL), RALT(KC_2), RALT(KC_3), RALT(KC_4), RALT(KC_E), KC_RBRC, RALT(KC_7), RALT(KC_8), RALT(KC_9), RALT(KC_0), RALT(KC_MINS),
+ KC_LSFT, KC_NUBS, RALT(KC_NUBS), S(KC_NUBS), DGRMCRO, XXXXXXX, XXXXXXX, RALT(KC_M), KC_RBRC, S(KC_RBRC), RALT(KC_RBRC), _______,
+ _______, _______, KC_RALT, _______,TO(_ADJUST), _______, _______, _______, _______, _______, _______, TO(_QWERTY)
+),
+
+
+/* Lower
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | F1 | F2 | F3 | F4 | Esc | Bksp | / | 7 | 8 | 9 | - |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | FNL2 | F5 | F6 | F7 | F8 |Insert| Home | PgUp | 4 | 5 | 6 | + |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F9 | F10 | F11 | F12 | Del | End | PgDn | 1 | 2 | 3 | Enter|
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | Alt | | | | * | 0 | , | . | BAIL |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_LOWER] = LAYOUT_ortho_4x12(
+ KC_TAB, KC_F1, KC_F2, KC_F3, KC_F4, KC_ESC, KC_BSPC, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_PMNS,
+ TT(_FNL2), KC_F5, KC_F6, KC_F7, KC_F8, KC_INS, KC_HOME, KC_PGUP, KC_P4, KC_P5, KC_P6, KC_PPLS,
+ KC_LSFT, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_END, KC_PGDN, KC_P1, KC_P2, KC_P3, KC_PENT,
+ _______, _______, KC_LALT, _______, TO(_QWERTY), _______, _______, KC_PAST, KC_P0, KC_PDOT, KC_DOT, TO(_QWERTY)
+),
+
+/* FNL2
+ * ,-----------------------------------------------------------------------------------.
+ * |TbMacr| Prev | Play | Next | AltF4| CapsL| |PrScrn|Insert| Home | PgUp |ScrLck|
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | | Vol- | Vol+ | Mute | NumL | | | Del | End | PgDn | Pause|
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | | | | | | | | | Up | | Enter|
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | Left | Down | Right| BAIL |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_FNL2] = LAYOUT_ortho_4x12(
+ TBMACRO, KC_MPRV, KC_MPLY, KC_MNXT, ALT_F4, KC_CAPS, _______, KC_PSCR, KC_INS, KC_HOME, KC_PGUP, KC_SLCK,
+ _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_NLCK, _______, _______, KC_DEL, KC_END, KC_PGDN, KC_PAUS,
+ _______, CTLZ, CTLX, CTLC, CTLV, _______, _______, _______, _______, KC_UP, _______, KC_ENT,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, TO(_QWERTY)
+),
+
+/* Adjust (Lower + Raise)
+ * ,-----------------------------------------------------------------------------------.
+ * | GAME | Reset| | | | | | | | | |LIGHTS|
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | |BLtogg|BLstep| | | | | | | | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | |RGBtog|RGBhui|RGBhud|RGBmod|RGBsai|RGBsad| | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | RGB4 | | | | | | | | | NKO | BAIL |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_ADJUST] = LAYOUT_ortho_4x12(
+ TO(_GAMEMODE), RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, WRKMOD,
+ _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, RGB_TOG, RGB_HUI, RGB_HUD, RGB_MOD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, RGB_MODE_FORWARD,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_P, RGB_M_R, TO(_QWERTY)
+),
+
+/* Game mode
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | FNL1 | A | S | D | F | G | H | J | K | L | ; | " |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Ctrl | 1 | Lower| Bksp | Alt | Space | Raise| Bksp | BAIL | * | Esc |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_GAMEMODE] = LAYOUT_ortho_4x12(
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
+ TT(_FNL3), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
+ KC_LCTL, KC_1, MO(_LOWER2), KC_DEL, KC_LALT, KC_SPC, KC_SPC, MO(_RAISE2), KC_BSPC, TO(_QWERTY), KC_NUHS, KC_ESC
+),
+
+/* FNL3
+ * ,-----------------------------------------------------------------------------------.
+ * |TbMacr| Prev | Play | Next | AltF4| CapsL| Esc | PgUp | Up | PgDn |PrScrn| Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | | Vol- | Vol+ | Mute | NumL | Home | Left | Down | Right| | Del |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | | | | | | End | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | BAIL |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_FNL3] = LAYOUT_ortho_4x12(
+ TBMACRO, KC_MPRV, KC_MPLY, KC_MNXT, ALT_F4, KC_CAPS, KC_ESC, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_BSPC,
+ _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_NLCK, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_DEL,
+ KC_LSFT, _______, _______, _______, _______, _______, KC_END, _______, _______, _______, LSFT(KC_MINS), _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LSFT(KC_1), _______
+),
+
+/* Lower
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | F1 | F2 | F3 | F4 | Esc | Bksp | / | 7 | 8 | 9 | - |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | FNL2 | F5 | F6 | F7 | F8 |Insert| Home | PgUp | 4 | 5 | 6 | + |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F9 | F10 | F11 | F12 | Del | End | PgDn | 1 | 2 | 3 | Enter|
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | Alt | | | | * | 0 | , | . | BAIL |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_LOWER2] = LAYOUT_ortho_4x12(
+ KC_TAB, KC_F1, KC_F2, KC_F3, KC_F4, KC_ESC, KC_BSPC, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_PMNS,
+ TT(_FNL2), KC_F5, KC_F6, KC_F7, KC_F8, KC_INS, KC_HOME, KC_PGUP, KC_P4, KC_P5, KC_P6, KC_PPLS,
+ KC_LSFT, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_END, KC_PGDN, KC_P1, KC_P2, KC_P3, KC_PENT,
+ _______, _______, _______, _______, _______, _______, _______, KC_PAST, KC_P0, KC_PDOT, KC_DOT, TO(_GAMEMODE)
+),
+
+/* Raise
+ * ,-----------------------------------------------------------------------------------.
+ * | § | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | + |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | ´ | ` | @ | £ | $ | € | ¨ | { | [ | ] | } | \ |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | < | | | > | ° | | | µ | ¨ | ^ | ~ | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | AltGr| | | | | | | | BAIL |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_RAISE2] = LAYOUT_ortho_4x12(
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
+ KC_EQL, S(KC_EQL), RALT(KC_2), RALT(KC_3), RALT(KC_4), RALT(KC_E), KC_RBRC, RALT(KC_7), RALT(KC_8), RALT(KC_9), RALT(KC_0), RALT(KC_MINS),
+ KC_LSFT, KC_NUBS, RALT(KC_NUBS), S(KC_NUBS), DGRMCRO, XXXXXXX, XXXXXXX, RALT(KC_M), KC_RBRC, S(KC_RBRC), RALT(KC_RBRC), _______,
+ _______, _______, KC_RALT, _______, _______, _______, _______, _______, _______, _______, _______, TO(_GAMEMODE)
+)
+
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ if (record->event.pressed) {
+ switch(keycode) {
+ case TBMACRO:
+ SEND_STRING(SS_TAP(X_TAB) SS_DOWN(X_LSHIFT) SS_TAP(X_HOME) SS_UP(X_LSHIFT) SS_TAP(X_DELETE));
+ return false;
+ case DGRMCRO:
+ if(!bnumlock) {
+ //register_code(KC_NLCK);
+ //unregister_code(KC_NLCK);
+ tap_code(KC_NLCK);
+ bnumlock = true;
+ }
+ //SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_P0) SS_TAP(X_P1) SS_TAP(X_P7) SS_TAP(X_P6) SS_UP(X_LALT));
+ SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_KP_0) SS_TAP(X_KP_1) SS_TAP(X_KP_7) SS_TAP(X_KP_6) SS_UP(X_LALT) );
+ return false;
+ case WRKMOD:
+ if(!workmode) {
+ workmode = true;
+ return false;
+ }
+ else {
+ workmode = false;
+ return false;
+ }
+ }
+
+ }
+ return true;
+}
+
+void rgbflag(uint8_t r, uint8_t g, uint8_t b) {
+ for(int i = 0; i < RGBLED_NUM; i++){
+ switch(i) {
+ case 0 ... 13:
+ // rgblight_setrgb_at(r,g,b,i);
+ led[i].r = r;
+ led[i].g = g;
+ led[i].b = b;
+ break;
+ /* case 9 ... 11:
+ // rgblight_setrgb_at(r,g,b,i);
+ led[i].r = r;
+ led[i].g = g;
+ led[i].b = b;
+ break; */
+ default:
+ // rgblight_setrgb_at(0,0,0,i);
+ led[i].r = 0;
+ led[i].g = 0;
+ led[i].b = 0;
+ break;
+ }
+ }
+ rgblight_set();
+}
+
+layer_state_t layer_state_set_user(layer_state_t state) {
+// if(rgblight_get_mode() == 1) {
+ switch (biton32(state)) {
+ case _QWERTY:
+ if(!workmode){
+ rgblight_mode(9);
+ }
+ else if(workmode){
+ rgblight_mode(1);
+ rgbflag(0x00, 0x00, 0x00);
+ }
+ if(bnumlock) {
+ tap_code(KC_NLCK);
+ }
+ break;
+ case _LOWER:
+ rgblight_mode(1);
+ if(!bnumlock) {
+ tap_code(KC_NLCK);
+ }
+ rgbflag(0xFF, 0x00, 0x00);
+
+ break;
+ case _ADJUST:
+ rgblight_mode(1);
+ rgbflag(0xFF, 0xFF, 0xFF);
+ if(bnumlock) {
+ tap_code(KC_NLCK);
+ }
+ break;
+ case _RAISE:
+ rgblight_mode(1);
+ rgbflag(0x00, 0xFF, 0x00);
+ if(bnumlock) {
+ tap_code(KC_NLCK);
+ }
+ break;
+ case _FNL1:
+ rgblight_mode(1);
+ rgbflag(0x00, 0x00, 0xFF);
+ if(bnumlock) {
+ tap_code(KC_NLCK);
+ }
+ break;
+ case _GAMEMODE:
+ rgblight_mode(1);
+ rgbflag(0xFF, 0x00, 0xFF);
+ break;
+ case _MOUSE:
+ rgblight_mode(1);
+ rgbflag(0x00, 0xFF, 0xFF);
+ if(bnumlock) {
+ tap_code(KC_NLCK);
+ }
+ break;
+ default: // for any other layers, or the default layer
+ rgblight_mode(1);
+ if(bnumlock) {
+ tap_code(KC_NLCK);
+ }
+ rgbflag(0xFF, 0xFF, 0xFF);
+ break;
+ }
+ // }
+ return state;
+}
+
+/* void matrix_scan_user(void) {
+
+ //Layer LED indicators
+
+ uint32_t layer = layer_state;
+
+
+ if (layer & (1<<2)) {
+ if(!bnumlock) {
+ numlock_changed = true;
+ register_code(KC_NLCK);
+ unregister_code(KC_NLCK);
+ bnumlock = true;
+ }
+ }
+}
+ */
+
+
+void led_set_user(uint8_t usb_led) {
+
+ if (usb_led & (1 << USB_LED_NUM_LOCK)) {
+ bnumlock = true;
+
+ } else {
+ bnumlock = false;
+ }
+
+ if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
+
+ } else {
+
+ }
+
+ if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
+
+ } else {
+
+ }
+
+ if (usb_led & (1 << USB_LED_COMPOSE)) {
+
+ } else {
+
+ }
+
+ if (usb_led & (1 << USB_LED_KANA)) {
+
+ } else {
+
+ }
+
+} \ No newline at end of file
diff --git a/keyboards/kbdfans/niu_mini/keymaps/tobias/readme.md b/keyboards/kbdfans/niu_mini/keymaps/tobias/readme.md
new file mode 100644
index 0000000000..0a8077884d
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/tobias/readme.md
@@ -0,0 +1,2 @@
+# Swedish 40% Layout
+
diff --git a/keyboards/kbdfans/niu_mini/keymaps/tobias/rules.mk b/keyboards/kbdfans/niu_mini/keymaps/tobias/rules.mk
new file mode 100644
index 0000000000..d75595602f
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/tobias/rules.mk
@@ -0,0 +1,2 @@
+NKRO_ENABLE = YES
+MOUSEKEY_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/kbdfans/niu_mini/keymaps/tucznak/config.h b/keyboards/kbdfans/niu_mini/keymaps/tucznak/config.h
new file mode 100644
index 0000000000..429955b3a0
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/tucznak/config.h
@@ -0,0 +1,16 @@
+#pragma once
+
+#undef MANUFACTURER
+#undef PRODUCT
+
+#define MANUFACTURER Potato Inc.
+#define PRODUCT Qt3.14
+
+/* turn off RGB when computer sleeps */
+#ifdef RGB_DI_PIN
+#define RGBLIGHT_SLEEP
+#endif
+
+/* send tap key if no layer key was used even after tap delay */
+#define TAPPING_TERM 50
+#define RETRO_TAPPING \ No newline at end of file
diff --git a/keyboards/kbdfans/niu_mini/keymaps/tucznak/keymap.c b/keyboards/kbdfans/niu_mini/keymaps/tucznak/keymap.c
new file mode 100644
index 0000000000..94743fe2c8
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/tucznak/keymap.c
@@ -0,0 +1,133 @@
+#include QMK_KEYBOARD_H
+
+enum layers {
+ _BASE,
+ _LOWER,
+ _RAISE,
+ _NUM,
+ _FN
+};
+
+enum keycodes {
+ QWERTY = SAFE_RANGE,
+ DYNAMIC_MACRO_RANGE,
+};
+
+#include "dynamic_macro.h"
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* Base layer (0)
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * |Esc/Fn| A | S | D | F | G | H | J | K | L | ; | Del |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | N | M | , | . | Up |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Ctrl | GUI | Alt | \| |Lower |Sp/Num|Space |Raise |AltGr | Left | Down |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+ [_BASE] = LAYOUT_ortho_4x12(
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ LT(_FN, KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_DEL,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_NUBS, MO(_LOWER), LT(_NUM, KC_SPC), KC_SPC, MO(_RAISE), KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT
+ ),
+
+ /* Lower layer (1)
+ * Function keys, navigation
+ * ,-----------------------------------------------------------------------------------.
+ * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | | | | | | | | | | | Ins |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | |CapsLk| |PrtSc |ScrLk |Pause | | | | | PgUp | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | Menu | Home | PgDn | End |
+ * `-----------------------------------------------------------------------------------'
+ */
+ [_LOWER] = LAYOUT_ortho_4x12(
+ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS,
+ _______, KC_CAPS, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, KC_PGUP, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_APP, KC_HOME, KC_PGDN, KC_END
+ ),
+
+ /* Raise layer (2)
+ * National characters, special characters
+ * ,-----------------------------------------------------------------------------------.
+ * | +1 | ě2 | š3 | č4 | ř5 | ž6 | ý7 | á8 | í9 | é0 | ´ | ˇ |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | ;° | | | | | | ( | ) | § | ! | ú | / |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | | | | | | % | = | ¨ | ' | - | _ |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+ [_RAISE] = LAYOUT_ortho_4x12(
+ KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, LSFT(KC_EQL),
+ KC_GRV, _______, _______, _______, _______, _______, LSFT(KC_RBRC), KC_RBRC, KC_QUOT, LSFT(KC_QUOT), KC_LBRC, LSFT(KC_LBRC),
+ _______, _______, _______, _______, _______, _______, LSFT(KC_MINS), KC_MINS, KC_BSLS, LSFT(KC_BSLS), KC_SLSH, LSFT(KC_SLSH),
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+
+ /* Numbers layer - numpad (3)
+ * ,-----------------------------------------------------------------------------------.
+ * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | | | | | | | 4 | 5 | 6 | / | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | |NumLk | | | | | | 1 | 2 | 3 | * | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | . | 0 | + | - | |
+ * `-----------------------------------------------------------------------------------'
+ */
+ [_NUM] = LAYOUT_ortho_4x12(
+ _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_0, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_KP_4, KC_KP_5, KC_KP_6, KC_PSLS, _______,
+ _______, KC_NLCK, _______, _______, _______, _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_PAST, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_DOT, KC_KP_0, KC_PPLS, KC_PMNS, _______
+ ),
+
+ /* Function layer (4)
+ * Backlighting, keyboard controls, etc.
+ * m_ - music, r_ - RGB + backlight, f_ - macro
+ * ,-----------------------------------------------------------------------------------.
+ * | | r_BL | |Sleep | | | |f_Rec1|f_Pla1|f_Stop| |m_Vol+|
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | |r_VLK |r_Mod+|r_Hue+|r_Sat+|r_Bri+| |f_Rec2|f_Pla2| | |m_Vol-|
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | |r_TOG |r_Mod-|r_Hue-|r_Sat-|r_Bri-| | | | |m_Stop|m_Mute|
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Reset| | | | |C+A+D |C+A+I | | |m_Prev|m_Paus|m_Next|
+ * `-----------------------------------------------------------------------------------'
+ */
+ [_FN] = LAYOUT_ortho_4x12(
+ _______, BL_STEP, _______, KC_SLEP, _______, _______, _______, DYN_REC_START1, DYN_MACRO_PLAY1, DYN_REC_STOP, _______, KC_VOLU,
+ _______, VLK_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, DYN_REC_START2, DYN_MACRO_PLAY2, _______, _______, KC_VOLD,
+ _______, RGB_TOG, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, KC_MSTP, KC_MUTE,
+ RESET, _______, _______, _______, _______, LCA(KC_DEL), LCA(KC_INS), _______, _______, KC_MPRV, KC_MPLY, KC_MNXT
+ )
+};
+
+
+void matrix_init_user(void) {
+
+}
+
+void matrix_scan_user(void) {
+
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ if (!process_record_dynamic_macro(keycode, record)) {
+ return false;
+ }
+ return true;
+}
+
+void led_set_user(uint8_t usb_led) {
+
+}
diff --git a/keyboards/kbdfans/niu_mini/keymaps/tucznak/readme.md b/keyboards/kbdfans/niu_mini/keymaps/tucznak/readme.md
new file mode 100644
index 0000000000..95180bc392
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/tucznak/readme.md
@@ -0,0 +1,5 @@
+# TuCZnak's modified layout
+
+This layout is optimized for Czech national QWERTZ keymap.
+It includes separated layers for numbers, national characters,
+special characters and configuration.
diff --git a/keyboards/kbdfans/niu_mini/keymaps/tucznak/rules.mk b/keyboards/kbdfans/niu_mini/keymaps/tucznak/rules.mk
new file mode 100644
index 0000000000..422c96962d
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/tucznak/rules.mk
@@ -0,0 +1,22 @@
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
+
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+# Userspace defines
+VELOCIKEY_ENABLE = yes
+LAYOUTS_HAS_RGB = no \ No newline at end of file
diff --git a/keyboards/kbdfans/niu_mini/keymaps/via/keymap.c b/keyboards/kbdfans/niu_mini/keymaps/via/keymap.c
new file mode 100644
index 0000000000..702e419944
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/via/keymap.c
@@ -0,0 +1,79 @@
+#include QMK_KEYBOARD_H
+
+#define LOWER FN_MO13
+#define RAISE FN_MO23
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* Layer 0
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Ctrl | GUI | Caps | Alt |Layer1| Space| Space|Layer2| Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+ [0] = LAYOUT_ortho_4x12(
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
+ KC_LCTL, KC_LGUI, KC_CAPS, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+ ),
+
+ /* Layer 1
+ * ,-----------------------------------------------------------------------------------.
+ * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | Vol- | Vol+ | Mute | | | | F11 | F12 | | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Reset| | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+ [1] = LAYOUT_ortho_4x12(
+ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,
+ _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, KC_F11, KC_F12, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+
+ /* Layer 2 (r_ Indicates RGB Controls)
+ * ,-----------------------------------------------------------------------------------.
+ * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | |r_TOG |r_Mode|r_Hue+|r_Hue-| | | - | = | [ | ] | \ |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | |BL_TOG|BL_STEP| | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+ [2] = LAYOUT_ortho_4x12(
+ _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
+ _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+
+ /* Layer 3 (r_ Indicates RGB Controls)
+ * ,-----------------------------------------------------------------------------------.
+ * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | |r_TOG |r_Mode|r_Hue+|r_Hue-| | | - | = | [ | ] | \ |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | |BL_TOG|BL_STEP| | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | RESET| | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+ [3] = LAYOUT_ortho_4x12(
+ _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
+ _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+};
diff --git a/keyboards/kbdfans/niu_mini/keymaps/via/rules.mk b/keyboards/kbdfans/niu_mini/keymaps/via/rules.mk
new file mode 100644
index 0000000000..43061db1dd
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/via/rules.mk
@@ -0,0 +1,2 @@
+VIA_ENABLE = yes
+LTO_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/kbdfans/niu_mini/keymaps/xtonhasvim/config.h b/keyboards/kbdfans/niu_mini/keymaps/xtonhasvim/config.h
new file mode 100644
index 0000000000..c79bb54ad2
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/xtonhasvim/config.h
@@ -0,0 +1,40 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+// #define MUSIC_MASK (keycode != KC_NO)
+
+/*
+ * MIDI options
+ */
+
+/* enable basic MIDI features:
+ - MIDI notes can be sent when in Music mode is on
+*/
+
+// #define MIDI_BASIC
+
+/* enable advanced MIDI features:
+ - MIDI notes can be added to the keymap
+ - Octave shift and transpose
+ - Virtual sustain, portamento, and modulation wheel
+ - etc.
+*/
+//#define MIDI_ADVANCED
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 2
+
+// help for fast typist+dual function keys?
+#define PERMISSIVE_HOLD
+
+/* speed up mousekeys a bit */
+#define MOUSEKEY_DELAY 50
+#define MOUSEKEY_INTERVAL 20
+#define MOUSEKEY_MAX_SPEED 8
+#define MOUSEKEY_TIME_TO_MAX 30
+#define MOUSEKEY_WHEEL_MAX_SPEED 8
+#define MOUSEKEY_WHEEL_TIME_TO_MAX 40
+
+#endif
diff --git a/keyboards/kbdfans/niu_mini/keymaps/xtonhasvim/keymap.c b/keyboards/kbdfans/niu_mini/keymaps/xtonhasvim/keymap.c
new file mode 100644
index 0000000000..bfda812738
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/xtonhasvim/keymap.c
@@ -0,0 +1,264 @@
+ /* Copyright 2015-2017 Christon DeWan
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include QMK_KEYBOARD_H
+#include "xtonhasvim.h"
+#include "fancylighting.h"
+
+/************************************
+ * states
+ ************************************/
+
+enum layers {
+ _QWERTY,
+ _LOWER,
+ _RAISE,
+ _ADJUST,
+ _MOVE,
+ _MOUSE,
+ _CMD
+};
+
+extern uint8_t vim_cmd_layer(void) { return _CMD; }
+
+enum keymap_keycodes {
+ RAISE = VIM_SAFE_RANGE,
+ LOWER
+};
+
+/************************************
+ * keymaps!
+ ************************************/
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Ctrl*| A* | S | D | F | G | H | J | K | L | ;* | " |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Mouse| | Alt | GUI |Lower*| Space |Raise*| GUI | Alt | | Vim |
+ * `-----------------------------------------------------------------------------------'
+ *
+ * - Ctrl acts as Esc when tapped.
+ * - Holding ; switches to movement layer.
+ * - Raise and Lower are one-shot layers.
+ */
+[_QWERTY] = LAYOUT_planck_mit(
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ LCTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(_MOVE,KC_SCLN), KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT),
+ LSFT(KC_LALT), TG(_MOUSE), KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_LGUI, KC_LALT, X_____X, VIM_START
+),
+
+/* Lower
+ * ,-----------------------------------------------------------------------------------.
+ * | ~ | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 | | Next | Vol- | Vol+ | Play |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | Bail | | | | | | | | Bail | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_LOWER] = LAYOUT_planck_mit(
+ KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSPC,
+ KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, X_____X, X_____X, X_____X, X_____X, FIREY_RETURN,
+ _______, TO(_QWERTY), _______, _______, _______, KC_BSPC, _______, _______, _______, TO(_QWERTY), X_____X
+),
+
+/* Raise
+ * ,-----------------------------------------------------------------------------------.
+ * | ` | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 | | Next | Vol- | Vol+ | Play |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | Bail | | | | | | | | Bail | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_RAISE] = LAYOUT_planck_mit(
+ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSPC,
+ KC_DEL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, X_____X, X_____X, X_____X, X_____X, FIREY_RETURN,
+ _______, TO(_QWERTY), _______, _______, _______, KC_BSPC, _______, _______, _______, TO(_QWERTY), X_____X
+),
+
+
+/* Adjust (Lower + Raise)
+ * ,-------------------------------------------------------------------------------------.
+ * |RGBPlain| Reset| | | | | | | | | | Del |
+ * |--------+------+------+------+------+-------------+------+------+------+------+------|
+ * |RGBMode-| | | | | | | | | | |Lite+ |
+ * |--------+------+------+------+------+------|------+------+------+------+------+------|
+ * |RGBMode+| | | | | | | Next | Vol- | Vol+ | Play |Lite- |
+ * |--------+------+------+------+------+------+------+------+------+------+------+------|
+ * | RGB | Bail | | | | | | | | Bail | |
+ * `-------------------------------------------------------------------------------------'
+ */
+[_ADJUST] = LAYOUT_planck_mit(
+ RGB_MODE_PLAIN, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
+ RGB_MODE_REVERSE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI,
+ RGB_MODE_FORWARD, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, RGB_VAD,
+ RGB_TOG, TO(_QWERTY), _______, _______, _______, _______, _______, _______, _______, TO(_QWERTY), X_____X
+),
+
+
+/* movement layer (hold semicolon)
+ */
+[_MOVE] = LAYOUT_planck_mit(
+ TO(_QWERTY), X_____X, X_____X, X_____X, X_____X, X_____X, KC_HOME, KC_PGDN, KC_PGUP, KC_END, X_____X, X_____X,
+ _______, X_____X, LGUI(KC_LBRC), LGUI(LSFT(KC_LBRC)), LGUI(LSFT(KC_RBRC)), LGUI(KC_RBRC), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, X_____X, X_____X,
+ _______, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, _______,
+ _______, TO(_QWERTY), _______, _______, _______, X_____X, _______, _______, _______, TO(_QWERTY), X_____X
+),
+
+/* mouse layer
+ */
+[_MOUSE] = LAYOUT_planck_mit(
+ TO(_QWERTY), X_____X, X_____X, KC_MS_UP, X_____X, X_____X, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_UP, KC_MS_WH_RIGHT, X_____X, X_____X,
+ _______, X_____X, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, X_____X, X_____X, KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, X_____X, X_____X,
+ _______, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, _______,
+ _______, TO(_QWERTY), _______, _______, _______, X_____X, _______, _______, _______, TO(_QWERTY), X_____X
+),
+
+/* vim command layer.
+ */
+[_CMD] = LAYOUT_planck_mit(
+ X_____X, X_____X, VIM_W, VIM_E, X_____X, X_____X, VIM_Y, VIM_U, VIM_I, VIM_O, VIM_P, X_____X,
+ VIM_ESC, VIM_A, VIM_S, VIM_D, X_____X, VIM_G, VIM_H, VIM_J, VIM_K, VIM_L, X_____X, X_____X,
+ VIM_SHIFT, X_____X, VIM_X, VIM_C, VIM_V, VIM_B, X_____X, X_____X, VIM_COMMA, VIM_PERIOD, X_____X, VIM_SHIFT,
+ _______, TO(_QWERTY), _______, _______, X_____X, X_____X, X_____X, _______, _______, TO(_QWERTY), X_____X
+)
+
+};
+
+#define C_RED 0xFF, 0x00, 0x00
+#define C_GRN 0x00, 0xFF, 0x00
+#define C_BLU 0x00, 0x00, 0xFF
+
+#define C_YAN 0x00, 0xFF, 0xFF
+#define C_PRP 0x7A, 0x00, 0xFF
+#define C_ORG 0xFF, 0x93, 0x00
+
+/** Set just 4 LEDs closest to the user. Slightly less annoying to bystanders.*/
+void rgbflag(uint8_t r, uint8_t g, uint8_t b, uint8_t rr, uint8_t gg, uint8_t bb) {
+ LED_TYPE *target_led = user_rgb_mode ? shadowed_led : led;
+ for (int i = 0; i < RGBLED_NUM; i++) {
+ switch (i) {
+ case 12: case 13:
+ target_led[i].r = r;
+ target_led[i].g = g;
+ target_led[i].b = b;
+ break;
+ case 8: case 9:
+ target_led[i].r = rr;
+ target_led[i].g = gg;
+ target_led[i].b = bb;
+ break;
+ default:
+ target_led[i].r = 0;
+ target_led[i].g = 0;
+ target_led[i].b = 0;
+ break;
+ }
+ }
+ rgblight_set();
+}
+
+void set_state_leds(void) {
+ if (rgblight_get_mode() == 1) {
+ switch (biton32(layer_state)) {
+ case _RAISE:
+ rgbflag(C_BLU, C_GRN);
+ break;
+ case _LOWER:
+ rgbflag(C_BLU, C_RED);
+ break;
+ case _ADJUST:
+ rgbflag(C_BLU, C_PRP);
+ break;
+ case _MOVE:
+ rgbflag(C_RED, C_PRP);
+ break;
+ case _MOUSE:
+ rgbflag(C_RED, C_GRN);
+ break;
+ case _CMD:
+ switch(vstate) {
+ case VIM_V:
+ case VIM_VI:
+ case VIM_VS:
+ rgbflag(C_GRN, C_YAN);
+ break;
+ case VIM_C:
+ case VIM_CI:
+ rgbflag(C_GRN, C_ORG);
+ break;
+ case VIM_D:
+ case VIM_DI:
+ rgbflag(C_GRN, C_RED);
+ break;
+ case VIM_G:
+ rgbflag(C_GRN, C_BLU);
+ break;
+ case VIM_Y:
+ rgbflag(C_GRN, C_PRP);
+ break;
+ case VIM_START:
+ default:
+ rgbflag(C_GRN, C_GRN);
+ break;
+ }
+ break;
+ default: // for any other layers, or the default layer
+ rgbflag(C_YAN, C_YAN);
+ break;
+ }
+ }
+}
+
+bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
+ switch(keycode) {
+ case LOWER:
+ if (record->event.pressed) {
+ layer_on(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case RAISE:
+ if (record->event.pressed) {
+ layer_on(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ }
+ return true;
+}
diff --git a/keyboards/kbdfans/niu_mini/keymaps/xtonhasvim/readme.md b/keyboards/kbdfans/niu_mini/keymaps/xtonhasvim/readme.md
new file mode 100644
index 0000000000..9ff4ce1f19
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/xtonhasvim/readme.md
@@ -0,0 +1,9 @@
+# Xton has a tiny keyboard! With Vim!
+
+Based on the standard Planck layout with a few changes:
+
+* Escape moved to dual-function with control.
+* Dedicated movement and mouse layers.
+* Top and middle row swapped in `_RAISE` and `_LOWER` because I never use F-keys.
+* Vim layers! See `users/xtonhasvim`.
+
diff --git a/keyboards/kbdfans/niu_mini/keymaps/xtonhasvim/rules.mk b/keyboards/kbdfans/niu_mini/keymaps/xtonhasvim/rules.mk
new file mode 100644
index 0000000000..00946ff227
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/xtonhasvim/rules.mk
@@ -0,0 +1,5 @@
+MOUSEKEY_ENABLE = yes
+BACKLIGHT_ENABLE = no
+AUDIO_ENABLE = no
+CONSOLE_ENABLE = no # Console for debug(+400)
+
diff --git a/keyboards/kbdfans/niu_mini/keymaps/yttyx/README.md b/keyboards/kbdfans/niu_mini/keymaps/yttyx/README.md
new file mode 100644
index 0000000000..ff3937c232
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/yttyx/README.md
@@ -0,0 +1,32 @@
+# Overview
+
+This layout uses a mirror variant of Balance 12, created by Sasha Viminitz. See [this page](https://mathematicalmulticore.wordpress.com/the-keyboard-layout-project/)
+for more information.
+
+## To build
+
+```
+make niu_mini:yttyx
+```
+
+## To flash (example)
+
+```
+sudo dfu-programmer atmega32u4 erase
+sudo dfu-programmer atmega32u4 flash niu_mini_yttyx.hex --debug 6
+sudo dfu-programmer atmega32u4 launch
+```
+
+## Layers
+
+### Balance 12 base (BA) layer
+![Base layer](https://i.imgur.com/I0TkIHT.png)
+
+### Numeric/Punctuation (NP) layer
+![Numeric/Punctuation layer](https://i.imgur.com/GgZ0PCq.png)
+
+### Function/Cursor (FC) layer
+![Function/Cursor layer](https://i.imgur.com/zcVID2d.png)
+
+### Plover (PL) layer
+![Plover layer](https://i.imgur.com/RikOGXe.png)
diff --git a/keyboards/kbdfans/niu_mini/keymaps/yttyx/config.h b/keyboards/kbdfans/niu_mini/keymaps/yttyx/config.h
new file mode 100644
index 0000000000..b9e113ec0b
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/yttyx/config.h
@@ -0,0 +1,4 @@
+#pragma once
+#define NO_ACTION_ONESHOT
+#define NO_ACTION_MACRO
+#define NO_ACTION_FUNCTION
diff --git a/keyboards/kbdfans/niu_mini/keymaps/yttyx/keymap.c b/keyboards/kbdfans/niu_mini/keymaps/yttyx/keymap.c
new file mode 100644
index 0000000000..79fda2be00
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/yttyx/keymap.c
@@ -0,0 +1,95 @@
+
+#include QMK_KEYBOARD_H
+#include "keymap_steno.h"
+
+enum layers {
+ _BA, // Base (Balance Twelve mirror variant)
+ _NP, // Numeric/Punctuation
+ _FC, // Function
+ _PL // Plover
+};
+
+// Abbreviations
+#define KX_SFT_Z MT(MOD_LSFT, KC_Z)
+#define KX_SFT_X MT(MOD_LSFT, KC_X)
+#define LT_ESC_FC LT(_FC, KC_ESC)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* Base
+ .--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.
+ | P | L | C | D | W | | | U | O | Y | K | Q |
+ |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ | N | R | S | T | M | | BS | A | E | I | H | V |
+ |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ | Z Sft | J | F | G | B | | Ent | ' @ | , < | . > | X Sft | |
+ |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ | Ctl | Alt | Sup | NP | Spc | Esc FC | Sft | Sft | Sup | Alt | Ctl | |
+ '--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'
+ */
+ [_BA] = LAYOUT(
+ KC_P, KC_L, KC_C, KC_D, KC_W, XXXXXXX, XXXXXXX, KC_U, KC_O, KC_Y, KC_K, KC_Q,
+ KC_N, KC_R, KC_S, KC_T, KC_M, XXXXXXX, KC_BSPC, KC_A, KC_E, KC_I, KC_H, KC_V,
+ KX_SFT_Z, KC_J, KC_F, KC_G, KC_B, XXXXXXX, KC_ENT, KC_QUOT, KC_COMM, KC_DOT, KX_SFT_X, XXXXXXX,
+ KC_LCTL, KC_LALT, KC_LGUI, MO(_NP), KC_SPC, LT_ESC_FC, KC_LSFT, KC_LSFT, KC_LGUI, KC_LALT, KC_LCTL, XXXXXXX
+ ),
+
+ /* Numeric/Punctuation (NP)
+ .--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.
+ | 1 ! | 2 " | 3 | 4 $ | 5 % | PL | | 6 ^ | 7 & | 8 * | 9 ( | 0 ) |
+ |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ | Tab | Ctl-X | Ctl-C | Ctl-V | Ctl-Z | | | [ { | ] } | - _ | ; : | \ | |
+ |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ | Sft | | | Del | Ins | | | / ? | = + | # ~ | ` | |
+ |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ | Ctl | Alt | Sup | NP | Spc | | Sft | Sft | Sup | Alt | Ctl | |
+ '--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'
+ */
+ [_NP] = LAYOUT(
+ KC_1, KC_2, KC_3, KC_4, KC_5, TO(_PL), XXXXXXX, KC_6, KC_7, KC_8, KC_9, KC_0,
+ KC_TAB, C(KC_X), C(KC_C), C(KC_V), C(KC_Z), XXXXXXX, _______, KC_LBRC, KC_RBRC, KC_MINS, KC_SCLN, KC_NUBS,
+ KC_LSFT, XXXXXXX, XXXXXXX, KC_DEL, KC_INS, XXXXXXX, XXXXXXX, KC_SLSH, KC_EQL, KC_NUHS, KC_GRV, XXXXXXX,
+ _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, XXXXXXX
+ ),
+
+ /* Function/Cursor (FC)
+ .--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.
+ | F1 | F2 | F3 | F4 | F5 | | | Home | Up | End | PgUp | |
+ |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ | F6 | F7 | F8 | F9 | F10 | | | Left | Down | Right | PgDn | |
+ |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ | Sft | | | F11 | F12 | | | PScr | Break | ScLk | Caps | |
+ |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ | Ctl | Alt | Sup | | Spc | | Sft | Sft | Sup | Alt | Ctl | |
+ '--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'
+ */
+ [_FC] = LAYOUT(
+ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, KC_PGUP, XXXXXXX,
+ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX,
+ _______, XXXXXXX, XXXXXXX, KC_F11, KC_F12, XXXXXXX, XXXXXXX, KC_PSCR, KC_BRK, KC_SLCK, KC_CAPS, XXXXXXX,
+ _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, XXXXXXX
+ ),
+
+ /* Plover (PL)
+ .--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.
+ | # | # | # | # | # | BA | # | # | # | # | # | # |
+ |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ | S | T | P | H | * | | * | F | P | L | T | D |
+ |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ | S | K | W | R | * | | * | R | B | G | S | Z |
+ |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ | | | | A | O | | E | U | | | | |
+ '--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'
+ */
+ [_PL] = LAYOUT(
+ STN_NUM, STN_NUM, STN_NUM, STN_NUM, STN_NUM, TO(_BA), STN_NUM, STN_NUM, STN_NUM, STN_NUM, STN_NUM, STN_NUM,
+ STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, XXXXXXX, STN_ST1, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR,
+ STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, XXXXXXX, STN_ST2, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR,
+ XXXXXXX, XXXXXXX, XXXXXXX, STN_A, STN_O, XXXXXXX, STN_E, STN_U, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
+ )
+
+};
+
+void matrix_init_user() {
+ steno_set_mode(STENO_MODE_GEMINI);
+}
diff --git a/keyboards/kbdfans/niu_mini/keymaps/yttyx/rules.mk b/keyboards/kbdfans/niu_mini/keymaps/yttyx/rules.mk
new file mode 100644
index 0000000000..a2566a20b0
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/keymaps/yttyx/rules.mk
@@ -0,0 +1,10 @@
+# Build Options
+AUDIO_ENABLE = no
+CONSOLE_ENABLE = no
+EXTRAKEY_ENABLE = no
+MIDI_ENABLE = no
+MOUSEKEY_ENABLE = no
+NKRO_ENABLE = yes
+RGBLIGHT_ENABLE = no
+STENO_ENABLE = yes
+VIRTSER_ENABLE = yes
diff --git a/keyboards/kbdfans/niu_mini/niu_mini.c b/keyboards/kbdfans/niu_mini/niu_mini.c
new file mode 100644
index 0000000000..cd9c0cdfed
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/niu_mini.c
@@ -0,0 +1,19 @@
+#include "niu_mini.h"
+
+#ifdef SWAP_HANDS_ENABLE
+__attribute__ ((weak))
+const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
+ {{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}},
+ {{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}},
+ {{11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}},
+ {{11, 3}, {10, 3}, {9, 3}, {8, 3}, {7, 3}, {6, 3}, {5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}},
+};
+#endif
+
+void matrix_init_kb(void) {
+ // Turn status LED on
+ setPinOutput(E6);
+ writePinHigh(E6);
+
+ matrix_init_user();
+}
diff --git a/keyboards/kbdfans/niu_mini/niu_mini.h b/keyboards/kbdfans/niu_mini/niu_mini.h
new file mode 100644
index 0000000000..b815219123
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/niu_mini.h
@@ -0,0 +1,31 @@
+#pragma once
+
+#include "quantum.h"
+
+#define LAYOUT_planck_mit( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
+ k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
+ { k30, k31, k32, k33, k34, k35, KC_NO, k37, k38, k39, k3a, k3b } \
+}
+
+#define LAYOUT_ortho_4x12( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
+ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \
+}
+
+#define LAYOUT LAYOUT_ortho_4x12
diff --git a/keyboards/kbdfans/niu_mini/readme.md b/keyboards/kbdfans/niu_mini/readme.md
new file mode 100644
index 0000000000..1a91ece94b
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/readme.md
@@ -0,0 +1,19 @@
+# NIU Mini
+
+![NIU Mini](https://cdn.shopify.com/s/files/1/1473/3902/files/40__01.jpg)
+
+A compact 40% (12x4) ortholinear keyboard kit sold by KBDFans.
+
+Keyboard Maintainer: QMK Community
+Hardware Supported: NIU Mini PCB
+Hardware Availability: [KBDFans](https://kbdfans.myshopify.com/products/niu-mini-40-diy-kit)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make kbdfans/niu_mini:default
+
+Flashing example for this keyboard ([using the command line](https://docs.qmk.fm/#/newbs_flashing?id=flash-your-keyboard-from-the-command-line)):
+
+ make kbdfans/niu_mini:default:flash
+
+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/kbdfans/niu_mini/rules.mk b/keyboards/kbdfans/niu_mini/rules.mk
new file mode 100644
index 0000000000..ae86d2019e
--- /dev/null
+++ b/keyboards/kbdfans/niu_mini/rules.mk
@@ -0,0 +1,25 @@
+# MCU name
+MCU = atmega32u4
+
+# Bootloader selection
+BOOTLOADER = atmel-dfu
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = yes # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = yes # Enable N-Key Rollover
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
+AUDIO_ENABLE = no # Audio output
+RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
+
+LAYOUTS = ortho_4x12 planck_mit
+LAYOUTS_HAS_RGB = no
+
+# Disable unsupported hardware
+AUDIO_SUPPORTED = no
+BACKLIGHT_SUPPORTED = no