summaryrefslogtreecommitdiff
path: root/keyboards/niu_mini
diff options
context:
space:
mode:
authorWilliam Chang <william@factual.com>2019-11-20 22:17:07 -0800
committerWilliam Chang <william@factual.com>2019-11-20 22:17:07 -0800
commite7f4d56592b3975c38af329e77b4efd9108495e8 (patch)
tree0a416bccbf70bfdbdb9ffcdb3bf136b47378c014 /keyboards/niu_mini
parent71493b2f9bbd5f3d18373c518fa14ccafcbf48fc (diff)
parent8416a94ad27b3ff058576f09f35f0704a8b39ff3 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'keyboards/niu_mini')
-rw-r--r--keyboards/niu_mini/config.h19
-rw-r--r--keyboards/niu_mini/info.json125
-rw-r--r--keyboards/niu_mini/keymaps/codecoffeecode/keymap.c103
-rw-r--r--keyboards/niu_mini/keymaps/codecoffeecode/readme.md5
-rw-r--r--keyboards/niu_mini/keymaps/default/keymap.c138
-rw-r--r--keyboards/niu_mini/keymaps/nosarthur/README.md35
-rw-r--r--keyboards/niu_mini/keymaps/nosarthur/keymap.c8
-rw-r--r--keyboards/niu_mini/keymaps/nosarthur/keymap_colemak_dh.json1
-rw-r--r--keyboards/niu_mini/keymaps/nosarthur/keymap_qwerty.json1
-rw-r--r--keyboards/niu_mini/keymaps/nosarthur/rules.mk4
-rw-r--r--keyboards/niu_mini/keymaps/readme.md1
-rw-r--r--keyboards/niu_mini/keymaps/tobias/config.h40
-rw-r--r--keyboards/niu_mini/keymaps/tobias/keymap.c413
-rw-r--r--keyboards/niu_mini/keymaps/tobias/readme.md2
-rw-r--r--keyboards/niu_mini/keymaps/tobias/rules.mk2
-rw-r--r--keyboards/niu_mini/niu_mini.c16
-rw-r--r--keyboards/niu_mini/niu_mini.h57
-rw-r--r--keyboards/niu_mini/readme.md11
-rw-r--r--keyboards/niu_mini/rules.mk68
19 files changed, 861 insertions, 188 deletions
diff --git a/keyboards/niu_mini/config.h b/keyboards/niu_mini/config.h
index 2c202a8e46..be94fd9e7b 100644
--- a/keyboards/niu_mini/config.h
+++ b/keyboards/niu_mini/config.h
@@ -15,16 +15,15 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_H
-#define CONFIG_H
+#pragma once
#include "config_common.h"
-#define DEVICE_VER 0x0001
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6060
+#define DEVICE_VER 0x0001
#define MANUFACTURER KBDFans
#define PRODUCT NIU Mini
#define DESCRIPTION A compact ortholinear keyboard
@@ -47,7 +46,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* number of backlight levels */
#define BACKLIGHT_PIN B6
#ifdef BACKLIGHT_PIN
-#define BACKLIGHT_LEVELS 4
+ #define BACKLIGHT_LEVELS 4
#endif
/* Set 0 if debouncing isn't needed */
@@ -61,11 +60,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#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
+ #define RGBLIGHT_ANIMATIONS
+ #define RGBLED_NUM 14
+ #define RGBLIGHT_HUE_STEP 8
+ #define RGBLIGHT_SAT_STEP 8
+ #define RGBLIGHT_VAL_STEP 8
#endif
/*
@@ -85,5 +84,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
-
-#endif
diff --git a/keyboards/niu_mini/info.json b/keyboards/niu_mini/info.json
index 8023742ed7..5677a01ad3 100644
--- a/keyboards/niu_mini/info.json
+++ b/keyboards/niu_mini/info.json
@@ -1,18 +1,115 @@
{
- "keyboard_name": "NIU Mini",
- "url": "",
- "maintainer": "qmk",
- "width": 12,
- "height": 4,
- "layouts": {
- "LAYOUT_ortho_4x12": {
- "key_count": 48,
- "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}]
- },
+ "keyboard_name": "NIU Mini",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 12,
+ "height": 4,
+ "layouts": {
+ "LAYOUT_ortho_4x12": {
+ "key_count": 48,
+ "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": {
- "key_count": 47,
- "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}]
+ "LAYOUT_planck_mit": {
+ "key_count": 47,
+ "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/niu_mini/keymaps/codecoffeecode/keymap.c b/keyboards/niu_mini/keymaps/codecoffeecode/keymap.c
new file mode 100644
index 0000000000..7c794b2037
--- /dev/null
+++ b/keyboards/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/niu_mini/keymaps/codecoffeecode/readme.md b/keyboards/niu_mini/keymaps/codecoffeecode/readme.md
new file mode 100644
index 0000000000..661e24c9fa
--- /dev/null
+++ b/keyboards/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/niu_mini/keymaps/default/keymap.c b/keyboards/niu_mini/keymaps/default/keymap.c
index 5c7dc7fc0d..1fdeb02fc7 100644
--- a/keyboards/niu_mini/keymaps/default/keymap.c
+++ b/keyboards/niu_mini/keymaps/default/keymap.c
@@ -2,59 +2,59 @@
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, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
- )
+ /* 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, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ )
};
@@ -65,39 +65,39 @@ void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- return true;
+ return true;
}
void led_set_user(uint8_t usb_led) {
- if (usb_led & (1 << USB_LED_NUM_LOCK)) {
+ if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
- } else {
+ } else {
- }
+ }
- if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
+ if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
- } else {
+ } else {
- }
+ }
- if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
+ if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
- } else {
+ } else {
- }
+ }
- if (usb_led & (1 << USB_LED_COMPOSE)) {
+ if (IS_LED_ON(usb_led, USB_LED_COMPOSE)) {
- } else {
+ } else {
- }
+ }
- if (usb_led & (1 << USB_LED_KANA)) {
+ if (IS_LED_ON(usb_led, USB_LED_KANA)) {
- } else {
+ } else {
- }
+ }
}
diff --git a/keyboards/niu_mini/keymaps/nosarthur/README.md b/keyboards/niu_mini/keymaps/nosarthur/README.md
new file mode 100644
index 0000000000..9d57ceb5f7
--- /dev/null
+++ b/keyboards/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/niu_mini/keymaps/nosarthur/keymap.c b/keyboards/niu_mini/keymaps/nosarthur/keymap.c
new file mode 100644
index 0000000000..fe719fc821
--- /dev/null
+++ b/keyboards/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/niu_mini/keymaps/nosarthur/keymap_colemak_dh.json b/keyboards/niu_mini/keymaps/nosarthur/keymap_colemak_dh.json
new file mode 100644
index 0000000000..8dc43350c8
--- /dev/null
+++ b/keyboards/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/niu_mini/keymaps/nosarthur/keymap_qwerty.json b/keyboards/niu_mini/keymaps/nosarthur/keymap_qwerty.json
new file mode 100644
index 0000000000..ec9b945f4f
--- /dev/null
+++ b/keyboards/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/niu_mini/keymaps/nosarthur/rules.mk b/keyboards/niu_mini/keymaps/nosarthur/rules.mk
new file mode 100644
index 0000000000..37ba40cdfe
--- /dev/null
+++ b/keyboards/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/niu_mini/keymaps/readme.md b/keyboards/niu_mini/keymaps/readme.md
index 8a263ed0b4..6cfda6fe04 100644
--- a/keyboards/niu_mini/keymaps/readme.md
+++ b/keyboards/niu_mini/keymaps/readme.md
@@ -22,3 +22,4 @@ When adding your keymap to this list, keep it organised alphabetically (select l
- **mason**
- **planck** Planck default layout
- **xtonhasvim** A Planck-like layout with a few tweaks and a vim emulation layer.
+- **nosarthur** Custom Colemak-dh layout and qwerty layout
diff --git a/keyboards/niu_mini/keymaps/tobias/config.h b/keyboards/niu_mini/keymaps/tobias/config.h
new file mode 100644
index 0000000000..f88b52d1fc
--- /dev/null
+++ b/keyboards/niu_mini/keymaps/tobias/config.h
@@ -0,0 +1,40 @@
+#pragma once
+
+//#include "../../config.h"
+
+//#define MUSIC_MASK (keycode != KC_NO)
+
+/*
+ * MIDI options
+ */
+
+/* Prevent use of disabled MIDI features in the keymap */
+//#define MIDI_ENABLE_STRICT 1
+
+/* 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/niu_mini/keymaps/tobias/keymap.c b/keyboards/niu_mini/keymaps/tobias/keymap.c
new file mode 100644
index 0000000000..935dd5c506
--- /dev/null
+++ b/keyboards/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/niu_mini/keymaps/tobias/readme.md b/keyboards/niu_mini/keymaps/tobias/readme.md
new file mode 100644
index 0000000000..0a8077884d
--- /dev/null
+++ b/keyboards/niu_mini/keymaps/tobias/readme.md
@@ -0,0 +1,2 @@
+# Swedish 40% Layout
+
diff --git a/keyboards/niu_mini/keymaps/tobias/rules.mk b/keyboards/niu_mini/keymaps/tobias/rules.mk
new file mode 100644
index 0000000000..d75595602f
--- /dev/null
+++ b/keyboards/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/niu_mini/niu_mini.c b/keyboards/niu_mini/niu_mini.c
index 60df62b9e3..835625ee4f 100644
--- a/keyboards/niu_mini/niu_mini.c
+++ b/keyboards/niu_mini/niu_mini.c
@@ -3,17 +3,17 @@
#ifdef SWAP_HANDS_ENABLE
__attribute__ ((weak))
const keypos_t 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}},
+ {{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
- DDRE |= (1<<6);
- PORTE |= (1<<6);
+ // Turn status LED on
+ setPinOutput(E6);
+ writePinHigh(E6);
- matrix_init_user();
+ matrix_init_user();
}
diff --git a/keyboards/niu_mini/niu_mini.h b/keyboards/niu_mini/niu_mini.h
index 00f025b803..5fef7b4326 100644
--- a/keyboards/niu_mini/niu_mini.h
+++ b/keyboards/niu_mini/niu_mini.h
@@ -1,49 +1,46 @@
-#ifndef NIU_MINI_H
-#define NIU_MINI_H
+#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, 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 } \
+ { 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 \
) \
{ \
- { 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 } \
}
// Used to create a keymap using only KC_ prefixed keys
#define LAYOUT_kc( \
- 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 \
- ) \
- LAYOUT_ortho_4x12( \
- KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \
- KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \
- KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \
- KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##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 \
+ ) \
+ LAYOUT_ortho_4x12( \
+ KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \
+ KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \
+ KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \
+ KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \
)
#define LAYOUT LAYOUT_ortho_4x12
#define LAYOUT_kc_ortho_4x12 LAYOUT_kc
-
-#endif
diff --git a/keyboards/niu_mini/readme.md b/keyboards/niu_mini/readme.md
index 36e8c8458b..f4863d8549 100644
--- a/keyboards/niu_mini/readme.md
+++ b/keyboards/niu_mini/readme.md
@@ -1,5 +1,4 @@
-NIU Mini
-===
+# NIU Mini
![NIU Mini](https://cdn.shopify.com/s/files/1/1473/3902/files/40__01.jpg)
@@ -11,6 +10,10 @@ Hardware Availability: [KBDFans](https://kbdfans.myshopify.com/products/niu-mini
Make example for this keyboard (after setting up your build environment):
- make niu_mini:default:dfu
+ make niu_mini:default
-See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
+Flashing example for this keyboard ([using the command line](https://docs.qmk.fm/#/newbs_flashing?id=flash-your-keyboard-from-the-command-line)):
+
+ make 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/niu_mini/rules.mk b/keyboards/niu_mini/rules.mk
index 01d96eccf2..67548a448c 100644
--- a/keyboards/niu_mini/rules.mk
+++ b/keyboards/niu_mini/rules.mk
@@ -1,72 +1,36 @@
# MCU name
-#MCU = at90usb1287
MCU = atmega32u4
-# Processor frequency.
-# This will define a symbol, F_CPU, in all source code files equal to the
-# processor frequency in Hz. You can then use this symbol in your source code to
-# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-# automatically to create a 32-bit value in your source code.
-#
-# This will be an integer division of F_USB below, as it is sourced by
-# F_USB after it has run through any CPU prescalers. Note that this value
-# does not *change* the processor frequency - it should merely be updated to
-# reflect the processor speed set externally so that the code can use accurate
-# software delays.
-F_CPU = 16000000
-
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-# This will define a symbol, F_USB, in all source code files equal to the
-# input clock frequency (before any prescaling is performed) in Hz. This value may
-# differ from F_CPU if prescaling is used on the latter, and is required as the
-# raw input clock is fed directly to the PLL sections of the AVR for high speed
-# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-# at the end, this will be done automatically to create a 32-bit value in your
-# source code.
-#
-# If no clock division is performed on the input clock inside the AVR (via the
-# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# Boot Section Size in *bytes*
-# Teensy halfKay 512
-# Teensy++ halfKay 1024
-# Atmel DFU loader 4096
-# LUFA bootloader 4096
-# USBaspLoader 2048
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# ATmega32A bootloadHID
+# ATmega328P USBasp
BOOTLOADER = atmel-dfu
# Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
#
-BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE = no # Mouse keys(+4700)
-EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
-CONSOLE_ENABLE = yes # Console for debug(+400)
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
+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 # 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.
+RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
LAYOUTS = ortho_4x12 planck_mit
LAYOUTS_HAS_RGB = no
-