diff options
| author | kwerdenker <sebastian.spindler@gmail.com> | 2019-02-13 01:48:05 +0100 |
|---|---|---|
| committer | Drashna Jaelre <drashna@live.com> | 2019-02-12 16:48:05 -0800 |
| commit | 994852712dbd183e2c764d624ae8ba7d3efb385a (patch) | |
| tree | a98934c0d621bbea6f2dd1754c5896844b00f8a1 | |
| parent | 15297bcfce016b8f03c2004b3db5a26e38cf994e (diff) | |
| download | qmk_firmware-994852712dbd183e2c764d624ae8ba7d3efb385a.tar.gz qmk_firmware-994852712dbd183e2c764d624ae8ba7d3efb385a.zip | |
[Keymap] Plain60 rgb (#5104)
* Fix compile error if not used with VIA
* Add keymap with support for RGB
* Integrate changes from PR code review
| -rw-r--r-- | keyboards/plain60/config.h | 2 | ||||
| -rw-r--r-- | keyboards/plain60/keymaps/RGB/config.h | 26 | ||||
| -rw-r--r-- | keyboards/plain60/keymaps/RGB/keymap.c | 57 | ||||
| -rw-r--r-- | keyboards/plain60/keymaps/RGB/rules.mk | 23 |
4 files changed, 107 insertions, 1 deletions
diff --git a/keyboards/plain60/config.h b/keyboards/plain60/config.h index 763aeff08..5dd784887 100644 --- a/keyboards/plain60/config.h +++ b/keyboards/plain60/config.h | |||
| @@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 17 | 17 | ||
| 18 | #pragma once | 18 | #pragma once |
| 19 | 19 | ||
| 20 | #include QMK_KEYBOARD_CONFIG_H | 20 | #include "config_common.h" |
| 21 | 21 | ||
| 22 | /* USB Device descriptor parameter */ | 22 | /* USB Device descriptor parameter */ |
| 23 | #define VENDOR_ID 0x4705 | 23 | #define VENDOR_ID 0x4705 |
diff --git a/keyboards/plain60/keymaps/RGB/config.h b/keyboards/plain60/keymaps/RGB/config.h new file mode 100644 index 000000000..5fadcf821 --- /dev/null +++ b/keyboards/plain60/keymaps/RGB/config.h | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2019 Sebastian Spindler <sebastian.spindler@gmail.com> | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #pragma once | ||
| 19 | |||
| 20 | /* RGB Underglow */ | ||
| 21 | #define RGB_DI_PIN B7 | ||
| 22 | #define RGBLIGHT_ANIMATIONS | ||
| 23 | #define RGBLED_NUM 30 // Number of LEDs | ||
| 24 | #define RGBLIGHT_HUE_STEP 8 | ||
| 25 | #define RGBLIGHT_SAT_STEP 8 | ||
| 26 | #define RGBLIGHT_VAL_STEP 8 | ||
diff --git a/keyboards/plain60/keymaps/RGB/keymap.c b/keyboards/plain60/keymaps/RGB/keymap.c new file mode 100644 index 000000000..25370823d --- /dev/null +++ b/keyboards/plain60/keymaps/RGB/keymap.c | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2019 Sebastian Spindler <sebastian.spindler@gmail.com> | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #include QMK_KEYBOARD_H | ||
| 19 | |||
| 20 | #include "keymap_extras/keymap_german.h" | ||
| 21 | |||
| 22 | //Layer renaming | ||
| 23 | #define _DL 0 //default | ||
| 24 | #define _FUN 1 //function layer | ||
| 25 | #define _LED 2 //LED configurations | ||
| 26 | |||
| 27 | //Keymapping renaming | ||
| 28 | #define ______ KC_TRNS //renaming KC_TRNS for readability in keymaps | ||
| 29 | #define RGB_MI RGB_MODE_FORWARD //increase RGB mode | ||
| 30 | #define RGB_MD RGB_MODE_REVERSE //decrease RGB mode | ||
| 31 | #define RGB_ST RGB_M_P //rgb static | ||
| 32 | #define MONKEY LCTL(LALT(KC_DEL)) //ctrl+alt+del == monkey grip | ||
| 33 | #define SPECIAL LT(_FUN, DE_CIRC) // | ||
| 34 | |||
| 35 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 36 | |||
| 37 | [_DL] = LAYOUT( | ||
| 38 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, DE_SS, DE_ACUT, ______, KC_BSPC, \ | ||
| 39 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UE, DE_PLUS, ______, \ | ||
| 40 | SPECIAL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_OE, DE_AE, DE_HASH, KC_ENT, \ | ||
| 41 | KC_LSFT, DE_LESS, DE_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, DE_MINS, KC_RSFT, MONKEY, \ | ||
| 42 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , ______, KC_ALGR, TG(_LED), KC_RCTL ), | ||
| 43 | |||
| 44 | [_FUN] = LAYOUT( | ||
| 45 | ______, 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_DEL, \ | ||
| 46 | ______, KC_PGUP, KC_UP, KC_PGDN, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ | ||
| 47 | ______, KC_LEFT, KC_DOWN, KC_RIGHT, KC_HOME, ______, ______, KC_END, ______, ______, ______, ______, ______, ______, \ | ||
| 48 | ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_UP, ______, \ | ||
| 49 | ______, ______, ______, ______ , ______, KC_LEFT, KC_DOWN, KC_RIGHT ), | ||
| 50 | |||
| 51 | [_LED] = LAYOUT( | ||
| 52 | ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, RESET, \ | ||
| 53 | ______, RGB_TOG, RGB_MI, RGB_MD, RGB_ST, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ | ||
| 54 | ______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ | ||
| 55 | ______, ______, RGB_VAI, RGB_VAD, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ | ||
| 56 | ______, ______, ______, ______ , ______, ______, TG(_LED), ______ ), | ||
| 57 | }; | ||
diff --git a/keyboards/plain60/keymaps/RGB/rules.mk b/keyboards/plain60/keymaps/RGB/rules.mk new file mode 100644 index 000000000..793bd869a --- /dev/null +++ b/keyboards/plain60/keymaps/RGB/rules.mk | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | #Copyright 2019 Sebastian Spindler <sebastian.spindler@gmail.com> | ||
| 2 | |||
| 3 | #This program is free software: you can redistribute it and/or modify | ||
| 4 | #it under the terms of the GNU General Public License as published by | ||
| 5 | #the Free Software Foundation, either version 2 of the License, or | ||
| 6 | #(at your option) any later version. | ||
| 7 | |||
| 8 | #This program is distributed in the hope that it will be useful, | ||
| 9 | #but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | #GNU General Public License for more details. | ||
| 12 | |||
| 13 | #You should have received a copy of the GNU General Public License | ||
| 14 | #along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | |||
| 16 | # Build Options | ||
| 17 | # comment out to disable the options. | ||
| 18 | # | ||
| 19 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
| 20 | NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 21 | RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) | ||
| 22 | RAW_ENABLE = no | ||
| 23 | DYNAMIC_KEYMAP_ENABLE = no | ||
