From 4ce4ead3b767a6935c091adc93a288e0c64ddd94 Mon Sep 17 00:00:00 2001 From: Chus Date: Sat, 3 Oct 2020 22:52:35 +0200 Subject: [PATCH 1/7] Add niu mini dye sub keymap --- keyboards/niu_mini/keymaps/dyesub/keymap.c | 103 ++++++++++++++++++++ keyboards/niu_mini/keymaps/dyesub/readme.md | 7 ++ keyboards/niu_mini/keymaps/dyesub/rules.mk | 4 + 3 files changed, 114 insertions(+) create mode 100644 keyboards/niu_mini/keymaps/dyesub/keymap.c create mode 100644 keyboards/niu_mini/keymaps/dyesub/readme.md create mode 100644 keyboards/niu_mini/keymaps/dyesub/rules.mk diff --git a/keyboards/niu_mini/keymaps/dyesub/keymap.c b/keyboards/niu_mini/keymaps/dyesub/keymap.c new file mode 100644 index 000000000000..373e6a944aab --- /dev/null +++ b/keyboards/niu_mini/keymaps/dyesub/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 | ; |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 + ) +}; + + +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/dyesub/readme.md b/keyboards/niu_mini/keymaps/dyesub/readme.md new file mode 100644 index 000000000000..84e417a86d2a --- /dev/null +++ b/keyboards/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, audio and console for debug are disabled (Enable them by just modifying the `rules.mk` file). diff --git a/keyboards/niu_mini/keymaps/dyesub/rules.mk b/keyboards/niu_mini/keymaps/dyesub/rules.mk new file mode 100644 index 000000000000..b015955cad49 --- /dev/null +++ b/keyboards/niu_mini/keymaps/dyesub/rules.mk @@ -0,0 +1,4 @@ +MOUSEKEY_ENABLE = no +BACKLIGHT_ENABLE = no +AUDIO_ENABLE = no +CONSOLE_ENABLE = no # Console for debug(+400) From c03695ba8fbee661ef72acccf9c29d2da669b47f Mon Sep 17 00:00:00 2001 From: Chus Date: Sat, 3 Oct 2020 23:18:15 +0200 Subject: [PATCH 2/7] Fix spacing --- keyboards/niu_mini/keymaps/dyesub/keymap.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/keyboards/niu_mini/keymaps/dyesub/keymap.c b/keyboards/niu_mini/keymaps/dyesub/keymap.c index 373e6a944aab..c462f22cc985 100644 --- a/keyboards/niu_mini/keymaps/dyesub/keymap.c +++ b/keyboards/niu_mini/keymaps/dyesub/keymap.c @@ -32,10 +32,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [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 + _______, 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) @@ -50,9 +50,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [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_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 ) }; From 850772b6530ff391776fadfb4211a2c092242df3 Mon Sep 17 00:00:00 2001 From: Chus Date: Sat, 3 Oct 2020 23:25:00 +0200 Subject: [PATCH 3/7] Fix for blank spacing on layout --- keyboards/niu_mini/keymaps/dyesub/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/niu_mini/keymaps/dyesub/keymap.c b/keyboards/niu_mini/keymaps/dyesub/keymap.c index c462f22cc985..ede936757118 100644 --- a/keyboards/niu_mini/keymaps/dyesub/keymap.c +++ b/keyboards/niu_mini/keymaps/dyesub/keymap.c @@ -32,10 +32,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [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 + _______, 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) From c3c0680210937e1be87e75fe12890ca3c13f9ec2 Mon Sep 17 00:00:00 2001 From: Chus Date: Sun, 4 Oct 2020 13:10:54 +0200 Subject: [PATCH 4/7] Remove unused code Co-authored-by: Joel Challis --- keyboards/niu_mini/keymaps/dyesub/keymap.c | 45 ---------------------- 1 file changed, 45 deletions(-) diff --git a/keyboards/niu_mini/keymaps/dyesub/keymap.c b/keyboards/niu_mini/keymaps/dyesub/keymap.c index ede936757118..9663289dfe78 100644 --- a/keyboards/niu_mini/keymaps/dyesub/keymap.c +++ b/keyboards/niu_mini/keymaps/dyesub/keymap.c @@ -56,48 +56,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_MUTE ) }; - - -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 { - - } - -} From 2bdc8ba511d27a5d42dd1a7f18208df60f6e0227 Mon Sep 17 00:00:00 2001 From: Chus Date: Sun, 4 Oct 2020 13:11:16 +0200 Subject: [PATCH 5/7] Remove audio and console settings Co-authored-by: Joel Challis --- keyboards/niu_mini/keymaps/dyesub/rules.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/keyboards/niu_mini/keymaps/dyesub/rules.mk b/keyboards/niu_mini/keymaps/dyesub/rules.mk index b015955cad49..40caf9cbbf74 100644 --- a/keyboards/niu_mini/keymaps/dyesub/rules.mk +++ b/keyboards/niu_mini/keymaps/dyesub/rules.mk @@ -1,4 +1,3 @@ MOUSEKEY_ENABLE = no BACKLIGHT_ENABLE = no -AUDIO_ENABLE = no -CONSOLE_ENABLE = no # Console for debug(+400) +CONSOLE_ENABLE = no From 6965896fdbebad4480be2a74d446dd6a26651f67 Mon Sep 17 00:00:00 2001 From: Chus Date: Sun, 4 Oct 2020 13:12:42 +0200 Subject: [PATCH 6/7] Updates rules and readme --- keyboards/niu_mini/keymaps/dyesub/readme.md | 2 +- keyboards/niu_mini/keymaps/dyesub/rules.mk | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/keyboards/niu_mini/keymaps/dyesub/readme.md b/keyboards/niu_mini/keymaps/dyesub/readme.md index 84e417a86d2a..e276c4d06086 100644 --- a/keyboards/niu_mini/keymaps/dyesub/readme.md +++ b/keyboards/niu_mini/keymaps/dyesub/readme.md @@ -4,4 +4,4 @@ Simple layout based on the keycaps [DYE SUB](https://kbdfans.com/collections/oem ## Notes - There is a different ESC key position in this layout. -- The mouse key, backlight, audio and console for debug are disabled (Enable them by just modifying the `rules.mk` file). +- The mouse key, backlight and console for debug are disabled (Enable them by just modifying the `rules.mk` file). diff --git a/keyboards/niu_mini/keymaps/dyesub/rules.mk b/keyboards/niu_mini/keymaps/dyesub/rules.mk index 40caf9cbbf74..c5f09480a397 100644 --- a/keyboards/niu_mini/keymaps/dyesub/rules.mk +++ b/keyboards/niu_mini/keymaps/dyesub/rules.mk @@ -1,3 +1,2 @@ MOUSEKEY_ENABLE = no BACKLIGHT_ENABLE = no -CONSOLE_ENABLE = no From 16a9738a54697a278bc13c5fb21389e9a6807a89 Mon Sep 17 00:00:00 2001 From: Chus Date: Mon, 5 Oct 2020 09:08:44 +0200 Subject: [PATCH 7/7] Add license GPL2 to keymap --- keyboards/niu_mini/keymaps/dyesub/keymap.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/keyboards/niu_mini/keymaps/dyesub/keymap.c b/keyboards/niu_mini/keymaps/dyesub/keymap.c index 9663289dfe78..d859062d3917 100644 --- a/keyboards/niu_mini/keymaps/dyesub/keymap.c +++ b/keyboards/niu_mini/keymaps/dyesub/keymap.c @@ -1,3 +1,19 @@ + /* 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 . + */ + #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {