From 0082ecf1f3328eb45a865bf50d3f44ca632d9f7b Mon Sep 17 00:00:00 2001 From: Yan-Fa Li Date: Mon, 16 Dec 2019 11:26:02 -0800 Subject: Move kwerdenker's personal keymap from RGB (#7645) * Move kwerdenker's personal keymap from RGB Talked to Maartenwut about making RGB an actual template instead of kwerdenker's keymap. Free'd up B7 so it can be used for audio in agreement with MW. He's considering adding a speaker footprint to next rev of plain60, and only B7 can be used with Audio. RGB uses bitbang driver so it doesn't really make any difference if it's pin B0. - RGB should be a template for other people to modify, not a personal keymap - change default pin to B0 to free up B7 for audio use - rename RGB to kwerdenker * Add RGB keycodes to FN layer * don't use uppercase in keymap names - doesn't work properly on MacOS or Windows * Add an audio specific keymap * Enum instead of define * Suggested change to keymap - maintain compatibility with old keymap --- keyboards/maartenwut/plain60/keymaps/RGB/config.h | 26 ---------- keyboards/maartenwut/plain60/keymaps/RGB/keymap.c | 57 ---------------------- keyboards/maartenwut/plain60/keymaps/RGB/rules.mk | 23 --------- .../maartenwut/plain60/keymaps/audio/config.h | 3 ++ .../maartenwut/plain60/keymaps/audio/keymap.c | 27 ++++++++++ .../maartenwut/plain60/keymaps/audio/rules.mk | 4 ++ .../maartenwut/plain60/keymaps/kwerdenker/config.h | 26 ++++++++++ .../maartenwut/plain60/keymaps/kwerdenker/keymap.c | 57 ++++++++++++++++++++++ .../maartenwut/plain60/keymaps/kwerdenker/rules.mk | 23 +++++++++ keyboards/maartenwut/plain60/keymaps/rgb/config.h | 8 +++ keyboards/maartenwut/plain60/keymaps/rgb/keymap.c | 27 ++++++++++ keyboards/maartenwut/plain60/keymaps/rgb/rules.mk | 3 ++ 12 files changed, 178 insertions(+), 106 deletions(-) delete mode 100644 keyboards/maartenwut/plain60/keymaps/RGB/config.h delete mode 100644 keyboards/maartenwut/plain60/keymaps/RGB/keymap.c delete mode 100644 keyboards/maartenwut/plain60/keymaps/RGB/rules.mk create mode 100644 keyboards/maartenwut/plain60/keymaps/audio/config.h create mode 100644 keyboards/maartenwut/plain60/keymaps/audio/keymap.c create mode 100644 keyboards/maartenwut/plain60/keymaps/audio/rules.mk create mode 100644 keyboards/maartenwut/plain60/keymaps/kwerdenker/config.h create mode 100644 keyboards/maartenwut/plain60/keymaps/kwerdenker/keymap.c create mode 100644 keyboards/maartenwut/plain60/keymaps/kwerdenker/rules.mk create mode 100644 keyboards/maartenwut/plain60/keymaps/rgb/config.h create mode 100644 keyboards/maartenwut/plain60/keymaps/rgb/keymap.c create mode 100644 keyboards/maartenwut/plain60/keymaps/rgb/rules.mk (limited to 'keyboards/maartenwut/plain60') diff --git a/keyboards/maartenwut/plain60/keymaps/RGB/config.h b/keyboards/maartenwut/plain60/keymaps/RGB/config.h deleted file mode 100644 index 5fadcf821..000000000 --- a/keyboards/maartenwut/plain60/keymaps/RGB/config.h +++ /dev/null @@ -1,26 +0,0 @@ -/* -Copyright 2019 Sebastian Spindler - -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 . -*/ - -#pragma once - -/* RGB Underglow */ -#define RGB_DI_PIN B7 -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 30 // Number of LEDs -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/maartenwut/plain60/keymaps/RGB/keymap.c b/keyboards/maartenwut/plain60/keymaps/RGB/keymap.c deleted file mode 100644 index 25370823d..000000000 --- a/keyboards/maartenwut/plain60/keymaps/RGB/keymap.c +++ /dev/null @@ -1,57 +0,0 @@ -/* -Copyright 2019 Sebastian Spindler - -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 - -#include "keymap_extras/keymap_german.h" - -//Layer renaming -#define _DL 0 //default -#define _FUN 1 //function layer -#define _LED 2 //LED configurations - -//Keymapping renaming -#define ______ KC_TRNS //renaming KC_TRNS for readability in keymaps -#define RGB_MI RGB_MODE_FORWARD //increase RGB mode -#define RGB_MD RGB_MODE_REVERSE //decrease RGB mode -#define RGB_ST RGB_M_P //rgb static -#define MONKEY LCTL(LALT(KC_DEL)) //ctrl+alt+del == monkey grip -#define SPECIAL LT(_FUN, DE_CIRC) // - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_DL] = LAYOUT( - 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, \ - 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, ______, \ - 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, \ - 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, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , ______, KC_ALGR, TG(_LED), KC_RCTL ), - - [_FUN] = LAYOUT( - ______, 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, \ - ______, KC_PGUP, KC_UP, KC_PGDN, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ - ______, KC_LEFT, KC_DOWN, KC_RIGHT, KC_HOME, ______, ______, KC_END, ______, ______, ______, ______, ______, ______, \ - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_UP, ______, \ - ______, ______, ______, ______ , ______, KC_LEFT, KC_DOWN, KC_RIGHT ), - - [_LED] = LAYOUT( - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, RESET, \ - ______, RGB_TOG, RGB_MI, RGB_MD, RGB_ST, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ - ______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ - ______, ______, RGB_VAI, RGB_VAD, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ - ______, ______, ______, ______ , ______, ______, TG(_LED), ______ ), -}; diff --git a/keyboards/maartenwut/plain60/keymaps/RGB/rules.mk b/keyboards/maartenwut/plain60/keymaps/RGB/rules.mk deleted file mode 100644 index 793bd869a..000000000 --- a/keyboards/maartenwut/plain60/keymaps/RGB/rules.mk +++ /dev/null @@ -1,23 +0,0 @@ -#Copyright 2019 Sebastian Spindler - -#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 . - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) -RAW_ENABLE = no -DYNAMIC_KEYMAP_ENABLE = no diff --git a/keyboards/maartenwut/plain60/keymaps/audio/config.h b/keyboards/maartenwut/plain60/keymaps/audio/config.h new file mode 100644 index 000000000..9a43b7fbe --- /dev/null +++ b/keyboards/maartenwut/plain60/keymaps/audio/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define B7_AUDIO diff --git a/keyboards/maartenwut/plain60/keymaps/audio/keymap.c b/keyboards/maartenwut/plain60/keymaps/audio/keymap.c new file mode 100644 index 000000000..91ac37501 --- /dev/null +++ b/keyboards/maartenwut/plain60/keymaps/audio/keymap.c @@ -0,0 +1,27 @@ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum _layers { + _MA, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_MA] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, \ + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, LT(_FN, KC_UP), \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, LT(_FN, KC_APP), KC_RCTRL), + +[_FN] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + AU_TOG, MU_TOG, MU_MOD, CK_TOGG, _______, _______, _______, _______) +}; diff --git a/keyboards/maartenwut/plain60/keymaps/audio/rules.mk b/keyboards/maartenwut/plain60/keymaps/audio/rules.mk new file mode 100644 index 000000000..600978d17 --- /dev/null +++ b/keyboards/maartenwut/plain60/keymaps/audio/rules.mk @@ -0,0 +1,4 @@ +AUDIO_ENABLE = yes +RAW_ENABLE = no +DYNAMIC_KEYMAP_ENABLE = no + diff --git a/keyboards/maartenwut/plain60/keymaps/kwerdenker/config.h b/keyboards/maartenwut/plain60/keymaps/kwerdenker/config.h new file mode 100644 index 000000000..5fadcf821 --- /dev/null +++ b/keyboards/maartenwut/plain60/keymaps/kwerdenker/config.h @@ -0,0 +1,26 @@ +/* +Copyright 2019 Sebastian Spindler + +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 . +*/ + +#pragma once + +/* RGB Underglow */ +#define RGB_DI_PIN B7 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 30 // Number of LEDs +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/maartenwut/plain60/keymaps/kwerdenker/keymap.c b/keyboards/maartenwut/plain60/keymaps/kwerdenker/keymap.c new file mode 100644 index 000000000..25370823d --- /dev/null +++ b/keyboards/maartenwut/plain60/keymaps/kwerdenker/keymap.c @@ -0,0 +1,57 @@ +/* +Copyright 2019 Sebastian Spindler + +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 + +#include "keymap_extras/keymap_german.h" + +//Layer renaming +#define _DL 0 //default +#define _FUN 1 //function layer +#define _LED 2 //LED configurations + +//Keymapping renaming +#define ______ KC_TRNS //renaming KC_TRNS for readability in keymaps +#define RGB_MI RGB_MODE_FORWARD //increase RGB mode +#define RGB_MD RGB_MODE_REVERSE //decrease RGB mode +#define RGB_ST RGB_M_P //rgb static +#define MONKEY LCTL(LALT(KC_DEL)) //ctrl+alt+del == monkey grip +#define SPECIAL LT(_FUN, DE_CIRC) // + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_DL] = LAYOUT( + 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, \ + 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, ______, \ + 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, \ + 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, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , ______, KC_ALGR, TG(_LED), KC_RCTL ), + + [_FUN] = LAYOUT( + ______, 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, \ + ______, KC_PGUP, KC_UP, KC_PGDN, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, KC_LEFT, KC_DOWN, KC_RIGHT, KC_HOME, ______, ______, KC_END, ______, ______, ______, ______, ______, ______, \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_UP, ______, \ + ______, ______, ______, ______ , ______, KC_LEFT, KC_DOWN, KC_RIGHT ), + + [_LED] = LAYOUT( + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, RESET, \ + ______, RGB_TOG, RGB_MI, RGB_MD, RGB_ST, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, ______, RGB_VAI, RGB_VAD, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, ______, ______, ______ , ______, ______, TG(_LED), ______ ), +}; diff --git a/keyboards/maartenwut/plain60/keymaps/kwerdenker/rules.mk b/keyboards/maartenwut/plain60/keymaps/kwerdenker/rules.mk new file mode 100644 index 000000000..793bd869a --- /dev/null +++ b/keyboards/maartenwut/plain60/keymaps/kwerdenker/rules.mk @@ -0,0 +1,23 @@ +#Copyright 2019 Sebastian Spindler + +#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 . + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) +RAW_ENABLE = no +DYNAMIC_KEYMAP_ENABLE = no diff --git a/keyboards/maartenwut/plain60/keymaps/rgb/config.h b/keyboards/maartenwut/plain60/keymaps/rgb/config.h new file mode 100644 index 000000000..842693812 --- /dev/null +++ b/keyboards/maartenwut/plain60/keymaps/rgb/config.h @@ -0,0 +1,8 @@ +#pragma once + +#define RGB_DI_PIN B0 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 20 // limit to 20 otherwise brownouts +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/maartenwut/plain60/keymaps/rgb/keymap.c b/keyboards/maartenwut/plain60/keymaps/rgb/keymap.c new file mode 100644 index 000000000..abfb5f6b1 --- /dev/null +++ b/keyboards/maartenwut/plain60/keymaps/rgb/keymap.c @@ -0,0 +1,27 @@ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum _layers { + _MA, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_MA] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, \ + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, LT(_FN, KC_UP), \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, LT(_FN, KC_APP), KC_RCTRL), + +[_FN] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______) +}; diff --git a/keyboards/maartenwut/plain60/keymaps/rgb/rules.mk b/keyboards/maartenwut/plain60/keymaps/rgb/rules.mk new file mode 100644 index 000000000..b6cd87b7d --- /dev/null +++ b/keyboards/maartenwut/plain60/keymaps/rgb/rules.mk @@ -0,0 +1,3 @@ +RGBLIGHT_ENABLE = yes +RAW_ENABLE = no +DYNAMIC_KEYMAP_ENABLE = no -- cgit v1.2.3