diff options
Diffstat (limited to 'keyboards/rgbkb')
36 files changed, 1326 insertions, 472 deletions
diff --git a/keyboards/rgbkb/sol/common/glcdfont.c b/keyboards/rgbkb/sol/common/glcdfont.c index f772e3181..61b40c092 100644 --- a/keyboards/rgbkb/sol/common/glcdfont.c +++ b/keyboards/rgbkb/sol/common/glcdfont.c @@ -168,11 +168,11 @@ static const unsigned char font[] PROGMEM = { 0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, - 0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, - 0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, - 0x00, 0x00, 0x00, 0xE0, 0xEC, 0xDF, - 0xFC, 0xE0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xF0, 0xF4, 0xEC, 0xDE, + 0xDE, 0xBE, 0x3E, 0x3E, 0x3F, 0x3F, + 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x3F, + 0x3F, 0x3E, 0x3E, 0xBE, 0xDE, 0xDE, + 0xEC, 0xF4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x80, 0x80, 0x80, 0x70, 0x0F, 0x00, 0x00, 0x80, 0x7F, 0x00, 0x00, 0x7F, 0x80, 0x80, @@ -200,11 +200,11 @@ static const unsigned char font[] PROGMEM = { 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, - 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, - 0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, - 0x40, 0x7C, 0x3F, 0x3F, 0x23, 0x01, - 0x23, 0x3F, 0x37, 0x6C, 0x40, 0x00, + 0x00, 0x00, 0x01, 0x0F, 0x3F, 0xFF, + 0xFF, 0xFF, 0xFC, 0xE0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0xE0, 0xFC, 0xFF, 0xFF, 0xFF, + 0x3F, 0x0F, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -233,8 +233,8 @@ static const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F, + 0xFE, 0xFC, 0x00, 0xFC, 0xFE, 0x7F, + 0x3F, 0x1F, 0x0F, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; diff --git a/keyboards/rgbkb/sol/config.h b/keyboards/rgbkb/sol/config.h index 1afd973e9..9b136db05 100644 --- a/keyboards/rgbkb/sol/config.h +++ b/keyboards/rgbkb/sol/config.h @@ -35,17 +35,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COLS 7 #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7 } -// Encoder support -#define NUMBER_OF_ENCODERS 1 -#define ENCODERS_PAD_A { D2 } -#define ENCODERS_PAD_B { D6 } - /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 -/* ws2812 RGB LED */ -#define RGB_DI_PIN B3 - #ifdef IOS_DEVICE_ENABLE #define RGBLIGHT_LIMIT_VAL 40 #elif RGBLIGHT_FULL_POWER diff --git a/keyboards/rgbkb/sol/keymaps/brianweyer/rules.mk b/keyboards/rgbkb/sol/keymaps/brianweyer/rules.mk index 12c877946..47dd9a7e2 100644 --- a/keyboards/rgbkb/sol/keymaps/brianweyer/rules.mk +++ b/keyboards/rgbkb/sol/keymaps/brianweyer/rules.mk @@ -1,38 +1,15 @@ -# 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 = no # 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 -RGBLIGHT_ENABLE = yes # Enable global lighting effects. Do not enable with RGB Matrix -RGBLIGHT_ANIMATIONS = yes # LED animations -LED_MIRRORED = no # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master) -RGB_MATRIX_ENABLE = no # Enable per-key coordinate based RGB effects. Do not enable with RGBlight (+8500) -RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. Can be very laggy (+1500) -RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port -UNICODE_ENABLE = no # Unicode -SWAP_HANDS_ENABLE = no # Enable one-hand typing - -OLED_DRIVER_ENABLE = yes # Enable the OLED Driver (+5000) -IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) +# Overridden build options from rev1 + +# RGB Options +LED_MIRRORED = no # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master) + +# Misc +OLED_DRIVER_ENABLE = yes # Enable the OLED Driver -# Do not edit past here -ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE -else ifeq ($(strip $(RGBLIGHT_FULL_POWER)), yes) - OPT_DEFS += -DRGBLIGHT_FULL_POWER -endif -ifeq ($(strip $(RGB_MATRIX_KEYPRESSES)), yes) - OPT_DEFS += -DRGB_MATRIX_KEYPRESSES -endif -ifeq ($(strip $(LED_MIRRORED)), yes) - OPT_DEFS += -DLED_MIRRORED -endif + +# Do not edit past here + +include keyboards/$(KEYBOARD)/post_rules.mk diff --git a/keyboards/rgbkb/sol/keymaps/danielhklein/rules.mk b/keyboards/rgbkb/sol/keymaps/danielhklein/rules.mk index 09b0e201d..2993bdacc 100644 --- a/keyboards/rgbkb/sol/keymaps/danielhklein/rules.mk +++ b/keyboards/rgbkb/sol/keymaps/danielhklein/rules.mk @@ -1,38 +1,14 @@ -# 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 = yes # 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 -RGBLIGHT_ENABLE = yes # Enable global lighting effects. Do not enable with RGB Matrix -RGBLIGHT_ANIMATIONS = yes # LED animations -LED_MIRRORED = yes # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master) -RGB_MATRIX_ENABLE = no # Enable per-key coordinate based RGB effects. Do not enable with RGBlight (+8500) -RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. Can be very laggy (+1500) -RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port -UNICODE_ENABLE = no # Unicode -SWAP_HANDS_ENABLE = no # Enable one-hand typing - -OLED_DRIVER_ENABLE = no # Enable the OLED Driver (+5000) -IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) +# Overridden build options from rev1 + +# Debug Options +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration + -# Do not edit past here -ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE -else ifeq ($(strip $(RGBLIGHT_FULL_POWER)), yes) - OPT_DEFS += -DRGBLIGHT_FULL_POWER -endif -ifeq ($(strip $(RGB_MATRIX_KEYPRESSES)), yes) - OPT_DEFS += -DRGB_MATRIX_KEYPRESSES -endif -ifeq ($(strip $(LED_MIRRORED)), yes) - OPT_DEFS += -DLED_MIRRORED -endif +# Do not edit past here + +include keyboards/$(KEYBOARD)/post_rules.mk + diff --git a/keyboards/rgbkb/sol/keymaps/default/keymap.c b/keyboards/rgbkb/sol/keymaps/default/keymap.c index ca7352482..51039e48e 100644 --- a/keyboards/rgbkb/sol/keymaps/default/keymap.c +++ b/keyboards/rgbkb/sol/keymaps/default/keymap.c @@ -5,13 +5,6 @@ #include "split_util.h" #endif -extern keymap_config_t keymap_config; - -#ifdef RGBLIGHT_ENABLE -//Following line allows macro to read current RGB settings -extern rgblight_config_t rgblight_config; -#endif - // 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 @@ -23,22 +16,18 @@ enum layer_number { _ADJ }; -enum custom_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - FN, - ADJ, - BACKLIT, - RGBRST -}; +// Keycode defines for layers +#define QWERTY DF(_QWERTY) +#define COLEMAK DF(_COLEMAK) +#define FN MO(_FN) +#define ADJ MO(_ADJ) -enum macro_keycodes { - KC_SAMPLEMACRO, +enum custom_keycodes { + RGBRST = SAFE_RANGE, + RGB_MENU }; - - -#define FN_ESC LT(_FN, KC_ESC) +#define FN_ESC LT(_FN, KC_ESC) #define FN_CAPS LT(_FN, KC_CAPS) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -50,9 +39,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| * |FN(CAPS)| A | S | D | F | G | ( | | ) | H | J | K | L | ; | ' | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * |Shift | Z | X | C | V | B | { | | } | N | M | , | . | / |Shift | + * |Shift | Z | X | C | V | B | { | | } | N | M | , | . | / |Enter | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Ctrl | Win | Alt | RGB | ADJ | Space| DEL | | Enter| Space| FN | Left | Down | Up |Right | + * | Ctrl | Win | Alt | RGB | ADJ | Space| DEL | | Enter| Space| FN | Left | Down | Up |Right | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------' * | Space| DEL | | Enter| Space| * `-------------' `-------------' @@ -74,7 +63,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| * |FN(CAPS)| A | R | S | T | G | ( | | ) | K | N | E | I | O | ' | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * |Shift | Z | X | C | D | V | { | | } | M | H | , | . | / |Shift | + * |Shift | Z | X | C | D | V | { | | } | M | H | , | . | / |Enter | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| * | Ctrl | Win | Alt | RGB | ADJ | Space| DEL | | Enter| Space| FN | Left | Down | Up |Right | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------' @@ -83,9 +72,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_COLEMAK] = LAYOUT( \ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_LBRC, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, \ - FN_CAPS, KC_A, KC_R, KC_S, KC_T, KC_G, KC_LPRN, KC_RPRN, 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_LCBR, KC_RCBR, KC_M, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_LBRC, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, \ + FN_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, KC_LPRN, KC_RPRN, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCBR, KC_RCBR, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, ADJ, KC_SPC, KC_DEL, KC_ENT, KC_SPC, FN, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, \ KC_SPC, KC_DEL, KC_ENT, KC_SPC \ ), @@ -107,8 +96,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_FN] = LAYOUT( \ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_PSCR, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ - _______, KC_PGDN, KC_UP, KC_PGUP, _______, _______, _______, _______, _______, KC_PGDN, KC_UP, KC_PGUP, KC_PSCR, KC_HOME, \ - _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_END, \ + _______, KC_PGDN, KC_UP, KC_PGUP, _______, _______, _______, KC_SLCK, _______, KC_PGDN, KC_UP, KC_PGUP, KC_PSCR, KC_HOME, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_NLCK, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_END, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, \ _______, _______, _______, _______ \ @@ -122,7 +111,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| * | | HUD | VAD | HUI |RGBRST| | | | | |QWERTY|COLEMK| | | | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | | | | | | | | | | |RGBTOG| HUI | SAI | VAI | + * | | SPD | | SPI | | | | | | | |RGBTOG| HUI | SAI | VAI | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| * | | | |RGBMOD(| | | | | | | |RGBRMOD| HUD | SAD | VAD | * `------+------+------+------+------+------+------| |------+------+------+------+------+------+------' @@ -134,120 +123,184 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ _______, RGB_SAD, RGB_VAI, RGB_SAI, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, RGB_HUD, RGB_VAD, RGB_HUI, RGBRST, _______, _______, _______, _______, QWERTY, COLEMAK, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ - _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, _______, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, \ + _______, RGB_SPD, _______, RGB_SPI, _______, _______, _______, _______, _______, RGB_SPI, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ + _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, RGB_SPD, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, \ _______, _______, _______, _______ \ ) }; +// For RGBRST Keycode +#if defined(RGB_MATRIX_ENABLE) +void rgb_matrix_increase_flags(void) +{ + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: { + rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_UNDERGLOW: { + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_disable_noeeprom(); + } + break; + default: { + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_enable_noeeprom(); + } + break; + } +} +void rgb_matrix_decrease_flags(void) +{ + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_disable_noeeprom(); + } + break; + case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: { + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_UNDERGLOW: { + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + default: { + rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); + rgb_matrix_enable_noeeprom(); + } + break; + } +} +#endif -// define variables for reactive RGB -bool TOG_STATUS = false; -int RGB_current_mode; +#ifdef RGB_OLED_MENU +uint8_t rgb_encoder_state = 4; + +typedef void (*rgb_matrix_f)(void); + +const rgb_matrix_f rgb_matrix_functions[6][2] = { + { rgb_matrix_increase_hue, rgb_matrix_decrease_hue }, + { rgb_matrix_increase_sat, rgb_matrix_decrease_sat }, + { rgb_matrix_increase_val, rgb_matrix_decrease_val }, + { rgb_matrix_increase_speed, rgb_matrix_decrease_speed }, + { rgb_matrix_step, rgb_matrix_step_reverse }, + { rgb_matrix_increase_flags, rgb_matrix_decrease_flags } +}; +#endif #ifdef ENCODER_ENABLE + +static pin_t encoders_pad_a[] = ENCODERS_PAD_A; +#define NUMBER_OF_ENCODERS (sizeof(encoders_pad_a)/sizeof(pin_t)) + +const uint16_t PROGMEM encoders[][NUMBER_OF_ENCODERS * 2][2] = { + [_QWERTY] = ENCODER_LAYOUT( \ + KC_VOLU, KC_VOLD, + KC_VOLU, KC_VOLD + ), + [_COLEMAK] = ENCODER_LAYOUT( \ + _______, _______, + _______, _______ + ), + [_FN] = ENCODER_LAYOUT( \ + _______, _______, + _______, _______ + ), + [_ADJ] = ENCODER_LAYOUT( \ + _______, _______, + _______, _______ + ) +}; + void encoder_update_user(uint8_t index, bool clockwise) { - if (index == 0) { /* First encoder */ - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } - } else if (index == 1) { /* Second encoder*/ - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); + if (!is_keyboard_master()) + return; + +#ifdef RGB_OLED_MENU + if (index == RGB_OLED_MENU) { + (*rgb_matrix_functions[rgb_encoder_state][clockwise])(); + } else +#endif + { + uint8_t layer = biton32(layer_state); + uint16_t keycode = encoders[layer][index][clockwise]; + while (keycode == KC_TRANSPARENT && layer > 0) + { + layer--; + if ((layer_state & (1 << layer)) != 0) + keycode = encoders[layer][index][clockwise]; } + if (keycode != KC_TRANSPARENT) + tap_code16(keycode); } } #endif -// Setting ADJ layer RGB back to default -void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { - if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { - #ifdef RGBLIGHT_ENABLE - //rgblight_mode(RGB_current_mode); - #endif - layer_on(layer3); - } else { - layer_off(layer3); - } -} - bool process_record_user(uint16_t keycode, keyrecord_t *record) { - //uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)); - + static uint16_t reset_timer; switch (keycode) { - case QWERTY: + case RGBRST: +#if defined(RGBLIGHT_ENABLE) + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + } +#elif defined(RGB_MATRIX_ENABLE) + if (record->event.pressed) { + eeconfig_update_rgb_matrix_default(); + } +#endif + return false; + case RESET: if (record->event.pressed) { - set_single_persistent_default_layer(_QWERTY); + reset_timer = timer_read(); + } else { + if (timer_elapsed(reset_timer) >= 500) { + reset_keyboard(); + } } return false; - break; - case COLEMAK: - if(record->event.pressed) { - set_single_persistent_default_layer(_COLEMAK); +#if defined(RGB_MATRIX_ENABLE) && defined(KEYBOARD_rgbkb_sol_rev2) + case RGB_TOG: + if (record->event.pressed) { + rgb_matrix_increase_flags(); } return false; - break; - case FN: +#endif + case RGB_MENU: +#ifdef RGB_OLED_MENU if (record->event.pressed) { - //not sure how to have keyboard check mode and set it to a variable, so my work around - //uses another variable that would be set to true after the first time a reactive key is pressed. - if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false + if (get_mods() & MOD_MASK_SHIFT) { + rgb_encoder_state = (rgb_encoder_state - 1); + if (rgb_encoder_state > 5) { + rgb_encoder_state = 5; + } } else { - TOG_STATUS = !TOG_STATUS; - #ifdef RGBLIGHT_ENABLE - //rgblight_mode(15); - #endif + rgb_encoder_state = (rgb_encoder_state + 1) % 6; } - layer_on(_FN); - } else { - #ifdef RGBLIGHT_ENABLE - //rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change - #endif - layer_off(_FN); - TOG_STATUS = false; } +#endif return false; - break; - case ADJ: - if (record->event.pressed) { - layer_on(_ADJ); - } else { - layer_off(_ADJ); - } - return false; - break; - //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released - case RGBRST: - #ifdef RGBLIGHT_ENABLE - if (record->event.pressed) { - eeconfig_update_rgblight_default(); - rgblight_enable(); - RGB_current_mode = rgblight_config.mode; - } - #endif - break; } return true; } -void matrix_init_user(void) { -#ifdef RGBLIGHT_ENABLE - RGB_current_mode = rgblight_config.mode; -#endif -} - - // OLED Driver Logic #ifdef OLED_DRIVER_ENABLE - oled_rotation_t oled_init_user(oled_rotation_t rotation) { - if (!has_usb()) - return OLED_ROTATION_180; // flip 180 for offhand + if (is_keyboard_master()) + return OLED_ROTATION_270; return rotation; } @@ -255,62 +308,64 @@ static void render_logo(void) { static const char PROGMEM sol_logo[] = { 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, - 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; - + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0 + }; oled_write_P(sol_logo, false); } -//assign the right code to your layers for OLED display -#define L_BASE 0 -#define L_FN (1<<_FN) -#define L_ADJ (1<<_ADJ) -#define L_ADJ_TRI (L_ADJ|L_FN) - static void render_status(void) { // Render to mode icon - static const char PROGMEM mode_logo[4][4] = { - {0x95,0x96,0x0a,0}, - {0xb5,0xb6,0x0a,0}, - {0x97,0x98,0x0a,0}, - {0xb7,0xb8,0x0a,0} }; - - if (keymap_config.swap_lalt_lgui != false) { - oled_write_P(mode_logo[0], false); - oled_write_P(mode_logo[1], false); - } else { - oled_write_P(mode_logo[2], false); - oled_write_P(mode_logo[3], false); - } - - // Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below - oled_write_P(PSTR("Layer: "), false); - switch (layer_state) { - case L_BASE: - oled_write_P(PSTR("Default\n"), false); + static const char PROGMEM sol_icon[] = { + 0x9b,0x9c,0x9d,0x9e,0x9f, + 0xbb,0xbc,0xbd,0xbe,0xbf, + 0xdb,0xdc,0xdd,0xde,0xdf,0 + }; + oled_write_P(sol_icon, false); + + // Define layers here + oled_write_P(PSTR("Layer"), false); + uint8_t layer = layer_state ? biton(layer_state) : biton32(default_layer_state); + switch (layer) { + case _QWERTY: + oled_write_P(PSTR("BASE "), false); + break; + case _COLEMAK: + oled_write_P(PSTR("CLMK "), false); break; - case L_FN: - oled_write_P(PSTR("FN \n"), false); + case _FN: + oled_write_P(PSTR("FN "), false); break; - case L_ADJ: - case L_ADJ_TRI: - oled_write_P(PSTR("ADJ \n"), false); + case _ADJ: + oled_write_P(PSTR("ADJ "), false); break; default: - oled_write_P(PSTR("UNDEF \n"), false); + oled_write_P(PSTR("UNDEF"), false); } // Host Keyboard LED Status - uint8_t led_usb_state = host_keyboard_leds(); - oled_write_P(led_usb_state & (1<<USB_LED_NUM_LOCK) ? PSTR("NUMLOCK ") : PSTR(" "), false); - oled_write_P(led_usb_state & (1<<USB_LED_CAPS_LOCK) ? PSTR("CAPS ") : PSTR(" "), false); - oled_write_P(led_usb_state & (1<<USB_LED_SCROLL_LOCK) ? PSTR("SCLK ") : PSTR(" "), false); + uint8_t led_state = host_keyboard_leds(); + oled_write_P(PSTR("-----"), false); + oled_write_P(IS_LED_ON(led_state, USB_LED_NUM_LOCK) ? PSTR("NUMLK") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_state, USB_LED_CAPS_LOCK) ? PSTR("CAPLK") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRLK") : PSTR(" "), false); + +#ifdef RGB_OLED_MENU + static char buffer[31] = { 0 }; + snprintf(buffer, sizeof(buffer), "h%3d s%3d v%3d s%3d m%3d e%3d ", rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v, rgb_matrix_config.speed, rgb_matrix_config.mode, rgb_matrix_get_flags()); + buffer[4 + rgb_encoder_state * 5] = '<'; + + oled_write_P(PSTR("-----"), false); + oled_write(buffer, false); +#endif } void oled_task_user(void) { - if (is_keyboard_master()) + if (is_keyboard_master()) { render_status(); - else + } else { render_logo(); + oled_scroll_left(); + } } #endif diff --git a/keyboards/rgbkb/sol/keymaps/default/readme.md b/keyboards/rgbkb/sol/keymaps/default/readme.md index 75182c06f..4a97a7bab 100644 --- a/keyboards/rgbkb/sol/keymaps/default/readme.md +++ b/keyboards/rgbkb/sol/keymaps/default/readme.md @@ -10,7 +10,7 @@ * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| * |FN(CAPS)| A | S | D | F | G | ( | | ) | H | J | K | L | ; | ' | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * |Shift | Z | X | C | V | B | { | | } | N | M | , | . | / |Shift | + * |Shift | Z | X | C | V | B | { | | } | N | M | , | . | / |Enter | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| * | Ctrl | Win | Alt | RGB | ADJ | Space| DEL | | Enter| Space| FN | Left | Down | Up |Right | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------' @@ -27,7 +27,7 @@ * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| * |FN(CAPS)| A | R | S | T | G | ( | | ) | K | N | E | I | O | ' | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * |Shift | Z | X | C | D | V | { | | } | M | H | , | . | / |Shift | + * |Shift | Z | X | C | D | V | { | | } | M | H | , | . | / |Enter | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| * | Ctrl | Win | Alt | RGB | ADJ | Space| DEL | | Enter| Space| FN | Left | Down | Up |Right | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------' diff --git a/keyboards/rgbkb/sol/keymaps/default/rules.mk b/keyboards/rgbkb/sol/keymaps/default/rules.mk index 09b0e201d..269cf2027 100644 --- a/keyboards/rgbkb/sol/keymaps/default/rules.mk +++ b/keyboards/rgbkb/sol/keymaps/default/rules.mk @@ -1,38 +1,11 @@ -# 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 +# Default keymap does not have any overridden options from the rev1 / rev2 rules.mk files. +# Example: +# if you wanted to disable EXTRAKEY_ENABLE, you would copy the line from the rev1/rules.mk file +# and paste it in to this file, changing the yes to no. Like so: +# EXTRAKEY_ENABLE = no # Audio control and System control(+450) # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) +# To keep things clean and tidy, as well as make upgrades easier, only place overrides from the defaults in this file. -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # 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 -RGBLIGHT_ENABLE = yes # Enable global lighting effects. Do not enable with RGB Matrix -RGBLIGHT_ANIMATIONS = yes # LED animations -LED_MIRRORED = yes # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master) -RGB_MATRIX_ENABLE = no # Enable per-key coordinate based RGB effects. Do not enable with RGBlight (+8500) -RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. Can be very laggy (+1500) -RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port -UNICODE_ENABLE = no # Unicode -SWAP_HANDS_ENABLE = no # Enable one-hand typing - -OLED_DRIVER_ENABLE = no # Enable the OLED Driver (+5000) -IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) # Do not edit past here - -ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE -else ifeq ($(strip $(RGBLIGHT_FULL_POWER)), yes) - OPT_DEFS += -DRGBLIGHT_FULL_POWER -endif - -ifeq ($(strip $(RGB_MATRIX_KEYPRESSES)), yes) - OPT_DEFS += -DRGB_MATRIX_KEYPRESSES -endif - -ifeq ($(strip $(LED_MIRRORED)), yes) - OPT_DEFS += -DLED_MIRRORED -endif +include keyboards/$(KEYBOARD)/post_rules.mk diff --git a/keyboards/rgbkb/sol/keymaps/kageurufu/rules.mk b/keyboards/rgbkb/sol/keymaps/kageurufu/rules.mk index 21dca0b11..056959a55 100644 --- a/keyboards/rgbkb/sol/keymaps/kageurufu/rules.mk +++ b/keyboards/rgbkb/sol/keymaps/kageurufu/rules.mk @@ -1,38 +1,21 @@ -# 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 = yes # 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 -RGBLIGHT_ENABLE = no # Enable global lighting effects. Do not enable with RGB Matrix -RGBLIGHT_ANIMATIONS = no # LED animations -LED_MIRRORED = no # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master) -RGB_MATRIX_ENABLE = WS2812 # Enable per-key coordinate based RGB effects. Do not enable with RGBlight (+8500) -RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. Can be very laggy (+1500) -RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port -UNICODE_ENABLE = no # Unicode -SWAP_HANDS_ENABLE = no # Enable one-hand typing - -OLED_DRIVER_ENABLE = no # Enable the OLED Driver (+5000) -IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) +# Overridden build options from rev1 & rev2 -# Do not edit past here +# Debug Options +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration + +# RGB Options +RGBLIGHT_ENABLE = no # Enable global lighting effects. Do not enable with RGB Matrix +RGBLIGHT_ANIMATIONS = no # LED animations +LED_MIRRORED = no # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master) +RGB_MATRIX_ENABLE = WS2812 # Enable per-key coordinate based RGB effects. Do not enable with RGBlight + +# Userspace implements their own LTO +LINK_TIME_OPTIMIZATION_ENABLE = no -ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE -else ifeq ($(strip $(RGBLIGHT_FULL_POWER)), yes) - OPT_DEFS += -DRGBLIGHT_FULL_POWER -endif -ifeq ($(strip $(RGB_MATRIX_KEYPRESSES)), yes) - OPT_DEFS += -DRGB_MATRIX_KEYPRESSES -endif -ifeq ($(strip $(LED_MIRRORED)), yes) - OPT_DEFS += -DLED_MIRRORED -endif +# Do not edit past here + +include keyboards/$(KEYBOARD)/post_rules.mk + diff --git a/keyboards/rgbkb/sol/keymaps/xulkal/config.h b/keyboards/rgbkb/sol/keymaps/xulkal/config.h new file mode 100644 index 000000000..a5c35cfae --- /dev/null +++ b/keyboards/rgbkb/sol/keymaps/xulkal/config.h @@ -0,0 +1,31 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako <wakojun@gmail.com> +Copyright 2015 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/>. +*/ + +#pragma once + +// Xulkal custom stuff +#if KEYBOARD_rgbkb_sol_rev2 + #define OLED_90ROTATION + #define RGB_MATRIX_TOG_LAYERS + #define RGB_MATRIX_HUE_STEP 8 + #define RGB_MATRIX_SAT_STEP 8 + #define RGB_MATRIX_VAL_STEP 8 + #define RGB_MATRIX_SPD_STEP 8 +#endif diff --git a/keyboards/rgbkb/sol/keymaps/xulkal/keymap.c b/keyboards/rgbkb/sol/keymaps/xulkal/keymap.c index e51edd907..c508b0ca8 100644 --- a/keyboards/rgbkb/sol/keymaps/xulkal/keymap.c +++ b/keyboards/rgbkb/sol/keymaps/xulkal/keymap.c @@ -21,7 +21,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| * | Sft[ | Z | X | C | V | B | RGB | |RGBRST| N | M | , | . | / | Sft] | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Ctl- | Win | LOWER| RAISE| Alt | Space|RGBRMOD| |RGBMOD| Space| Left | Up | Down | Right| Ctl= | + * | Ctl- | Win | LOWER| RAISE| Alt | Space| ENC1 | | ENC2 | Space| Left | Up | Down | Right| Ctl= | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------' * | Space| DEL | | Enter| Space| * `-------------' `-------------' @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _________________QWERTY_L2_________________, KC_LBRC, KC_RBRC, _________________QWERTY_R2_________________, \ _________________QWERTY_L3_________________, KC_GRV, KC_QUOT, _________________QWERTY_R3_________________, \ _________________QWERTY_L4_________________, RGB_TOG, RGBRST, _________________QWERTY_R4_________________, \ - _________________QWERTY_L5_________________, RGB_RMOD, RGB_MOD, _________________QWERTY_R5_________________, \ + _________________QWERTY_L5_________________, KC_ENC1, KC_ENC2, _________________QWERTY_R5_________________, \ KC_SPC, TD_DEL, KC_ENT, KC_SPC \ ), @@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ___________________GAME_L2_________________, KC_LBRC, KC_RBRC, ___________________GAME_R2_________________, \ ___________________GAME_L3_________________, KC_GRV, KC_QUOT, ___________________GAME_R3_________________, \ ___________________GAME_L4_________________, RGB_TOG, RGBRST, ___________________GAME_R4_________________, \ - ___________________GAME_L5_________________, RGB_RMOD, RGB_MOD, ___________________GAME_R5_________________, \ + ___________________GAME_L5_________________, KC_ENC1, KC_ENC2, ___________________GAME_R5_________________, \ KC_SPC, KC_DEL, KC_ENT, KC_SPC \ ), #endif diff --git a/keyboards/rgbkb/sol/keymaps/xulkal/rules.mk b/keyboards/rgbkb/sol/keymaps/xulkal/rules.mk index ad0c48034..6a14a99af 100644 --- a/keyboards/rgbkb/sol/keymaps/xulkal/rules.mk +++ b/keyboards/rgbkb/sol/keymaps/xulkal/rules.mk @@ -1,37 +1,25 @@ -# 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 = no # 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 -RGBLIGHT_ENABLE = no # Enable global lighting effects. Do not enable with RGB Matrix -RGBLIGHT_ANIMATIONS = no # LED animations -LED_MIRRORED = no # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master) -RGB_MATRIX_ENABLE = WS2812 # Enable per-key coordinate based RGB effects. Do not enable with RGBlight (+8500) -RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. Can be very laggy (+1500) -RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port -UNICODE_ENABLE = no # Unicode -SWAP_HANDS_ENABLE = no # Enable one-hand typing -OLED_DRIVER_ENABLE = yes # Enable the OLED Driver (+5000) -ENCODER_ENABLE = no # Enable rotary encoder (+90) -IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) +# Overridden build options from rev1 & rev2 -# Do not edit past here +# RGB Options +RGBLIGHT_ENABLE = no # Enable global lighting effects. Do not enable with RGB Matrix +RGBLIGHT_ANIMATIONS = no # LED animations +LED_MIRRORED = no # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master) +RGB_MATRIX_ENABLE = WS2812 # Enable per-key coordinate based RGB effects. Do not enable with RGBlight +FULLHAND_ENABLE = yes # Enables the additional 24 Full Hand LEDs -ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE -else ifeq ($(strip $(RGBLIGHT_FULL_POWER)), yes) - OPT_DEFS += -DRGBLIGHT_FULL_POWER -endif +# Misc +OLED_DRIVER_ENABLE = yes # Enable the OLED Driver -ifeq ($(strip $(RGB_MATRIX_KEYPRESSES)), yes) - OPT_DEFS += -DRGB_MATRIX_KEYPRESSES +# Not using the encoder for rev1 +ifeq ($(strip $(KEYBOARD)), rgbkb/sol/rev1) + ENCODER_ENABLE = no + RGB_OLED_MENU = no +else + ENCODER_ENABLE = yes + RGB_OLED_MENU = 0 endif -ifeq ($(strip $(LED_MIRRORED)), yes) - OPT_DEFS += -DLED_MIRRORED -endif +# Do not edit past here + +include keyboards/$(KEYBOARD)/post_rules.mk + diff --git a/keyboards/rgbkb/sol/keymaps/xyverz/config.h b/keyboards/rgbkb/sol/keymaps/xyverz/config.h new file mode 100644 index 000000000..334eee608 --- /dev/null +++ b/keyboards/rgbkb/sol/keymaps/xyverz/config.h @@ -0,0 +1,26 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako <wakojun@gmail.com> +Copyright 2015 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/>. +*/ + +#pragma once + + +// place overrides here + +/* #define SSD1306OLED */ diff --git a/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c b/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c new file mode 100644 index 000000000..e38663dbb --- /dev/null +++ b/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c @@ -0,0 +1,361 @@ +#include QMK_KEYBOARD_H + +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#include "split_util.h" +#endif + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +enum layer_number { + _DVORAK = 0, + _DESTINY, + _QWERTY, + _COLEMAK, + _LOWER, + _RAISE, + _ADJUST +}; + +enum custom_keycodes { + DVORAK = SAFE_RANGE, + DESTINY, + QWERTY, + COLEMAK, + LOWER, + RAISE, + ADJUST, + RGBRST, + RGB_MENU +}; + +// Aliases to make the keymap clearer. +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ADJUST MO(_ADJUST) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_DVORAK] = LAYOUT( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_HOME, KC_PGUP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_END, KC_PGDN, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, \ + KC_RCTL, KC_A, KC_O, KC_E, KC_U, KC_I, XXXXXXX, XXXXXXX, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, XXXXXXX, XXXXXXX, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \ + KC_GRV, KC_LGUI, KC_LEFT, KC_RGHT, LOWER, KC_LCTL, KC_LALT, KC_RALT, KC_RCTL, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL, \ + KC_BSPC, KC_LGUI, KC_ENT, KC_SPC \ + + ), + + [_DESTINY] = LAYOUT( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_HOME, KC_PGUP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_END, KC_PGDN, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, \ + KC_RCTL, KC_A, KC_O, KC_E, KC_U, KC_I, XXXXXXX, XXXXXXX, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, XXXXXXX, XXXXXXX, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \ + KC_GRV, KC_LGUI, KC_LEFT, KC_RGHT, LOWER, KC_LCTL, KC_LALT, KC_RALT, KC_RCTL, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL, \ + KC_BSPC, KC_DEL, KC_ENT, KC_SPC \ + + ), + + [_QWERTY] = LAYOUT( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_HOME, KC_PGUP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_END, KC_PGDN, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_SLSH, \ + KC_RCTL, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, XXXXXXX, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, XXXXXXX, XXXXXXX, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_GRV, KC_LGUI, KC_LEFT, KC_RGHT, LOWER, KC_LCTL, KC_LALT, KC_RALT, KC_RCTL, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL, \ + KC_BSPC, KC_LGUI, KC_ENT, KC_SPC \ + ), + + [_COLEMAK] = LAYOUT( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_HOME, KC_PGUP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_END, KC_PGDN, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_SLSH, \ + KC_RCTL, KC_A, KC_R, KC_S, KC_T, KC_G, XXXXXXX, XXXXXXX, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, XXXXXXX, XXXXXXX, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_GRV, KC_LGUI, KC_LEFT, KC_RGHT, LOWER, KC_LCTL, KC_LALT, KC_RALT, KC_RCTL, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL, \ + KC_BSPC, KC_LGUI, KC_ENT, KC_SPC \ + ), + + [_LOWER] = LAYOUT( \ + KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, XXXXXXX, XXXXXXX, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_DEL, _______, _______, KC_INS \ + ), + + [_RAISE] = LAYOUT( \ + KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, XXXXXXX, XXXXXXX, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_DEL, _______, _______, KC_INS \ + ), + + [_ADJUST] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_NLCK, _______, _______, \ + KC_CAPS, _______, QWERTY, COLEMAK, DVORAK, DESTINY, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, \ + _______, _______, _______, RGB_SPI, RGB_SPD, _______, XXXXXXX, XXXXXXX, _______, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_DEL, _______, _______, KC_INS \ + ) +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { + case DVORAK: + set_single_persistent_default_layer(_DVORAK); + return false; + case DESTINY: + set_single_persistent_default_layer(_DESTINY); + return false; + case QWERTY: + set_single_persistent_default_layer(_QWERTY); + return false; + case COLEMAK: + set_single_persistent_default_layer(_COLEMAK); + return false; + case RGBRST: +#if defined(RGBLIGHT_ENABLE) + eeconfig_update_rgblight_default(); + rgblight_enable(); +#elif defined(RGB_MATRIX_ENABLE) + eeconfig_update_rgb_matrix_default(); +#endif + return false; +#if defined(RGB_MATRIX_ENABLE) && defined(KEYBOARD_rgbkb_sol_rev2) + case RGB_TOG: + if (record->event.pressed) { + rgb_matrix_increase_flags(); + } + return false; +#endif + case RGB_MENU: +#ifdef RGB_OLED_MENU + if (record->event.pressed) { + if (get_mods() & MOD_MASK_SHIFT) { + rgb_encoder_state = (rgb_encoder_state - 1); + if (rgb_encoder_state > 5) { + rgb_encoder_state = 5; + } + } else { + rgb_encoder_state = (rgb_encoder_state + 1) % 6; + } + } +#endif + return false; + } + } + return true; +}; + +// For RGBRST Keycode +#if defined(RGB_MATRIX_ENABLE) +void rgb_matrix_increase_flags(void) +{ + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: { + rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_UNDERGLOW: { + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_disable_noeeprom(); + } + break; + default: { + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_enable_noeeprom(); + } + break; + } +} + +void rgb_matrix_decrease_flags(void) +{ + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_disable_noeeprom(); + } + break; + case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: { + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_UNDERGLOW: { + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + default: { + rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); + rgb_matrix_enable_noeeprom(); + } + break; + } +} +#endif + +#ifdef RGB_OLED_MENU +uint8_t rgb_encoder_state = 4; + +typedef void (*rgb_matrix_f)(void); + +const rgb_matrix_f rgb_matrix_functions[6][2] = { + { rgb_matrix_increase_hue, rgb_matrix_decrease_hue }, + { rgb_matrix_increase_sat, rgb_matrix_decrease_sat }, + { rgb_matrix_increase_val, rgb_matrix_decrease_val }, + { rgb_matrix_increase_speed, rgb_matrix_decrease_speed }, + { rgb_matrix_step, rgb_matrix_step_reverse }, + { rgb_matrix_increase_flags, rgb_matrix_decrease_flags } +}; +#endif + +#ifdef ENCODER_ENABLE + +static pin_t encoders_pad_a[] = ENCODERS_PAD_A; +#define NUMBER_OF_ENCODERS (sizeof(encoders_pad_a)/sizeof(pin_t)) + +const uint16_t PROGMEM encoders[][NUMBER_OF_ENCODERS * 2][2] = { + [_QWERTY] = ENCODER_LAYOUT( \ + KC_VOLU, KC_VOLD, + KC_VOLU, KC_VOLD + ), + [_COLEMAK] = ENCODER_LAYOUT( \ + _______, _______, + _______, _______ + ), + [_FN] = ENCODER_LAYOUT( \ + _______, _______, + _______, _______ + ), + [_ADJ] = ENCODER_LAYOUT( \ + _______, _______, + _______, _______ + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (!is_keyboard_master()) + return; + +#ifdef RGB_OLED_MENU + if (index == RGB_OLED_MENU) { + (*rgb_matrix_functions[rgb_encoder_state][clockwise])(); + } else +#endif + { + uint8_t layer = biton32(layer_state); + uint16_t keycode = encoders[layer][index][clockwise]; + while (keycode == KC_TRANSPARENT && layer > 0) + { + layer--; + if ((layer_state & (1 << layer)) != 0) + keycode = encoders[layer][index][clockwise]; + } + if (keycode != KC_TRANSPARENT) + tap_code16(keycode); + } +} +#endif + +// OLED Driver Logic +#ifdef OLED_DRIVER_ENABLE + oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (is_keyboard_master()) + return OLED_ROTATION_270; + return rotation; +} + +static void render_logo(void) { + static const char PROGMEM sol_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0 + }; + oled_write_P(sol_logo, false); +} + +static void render_status(void) { + // Render to mode icon + static const char PROGMEM sol_icon[] = { + 0x9b,0x9c,0x9d,0x9e,0x9f, + 0xbb,0xbc,0xbd,0xbe,0xbf, + 0xdb,0xdc,0xdd,0xde,0xdf,0 + }; + oled_write_P(sol_icon, false); + + // Define layers here + oled_write_P(PSTR(" Layer-----"), false); + uint8_t layer = layer_state ? biton(layer_state) : biton32(default_layer_state); + switch (layer) { + case _DVORAK: + oled_write_P(PSTR("DVRAK"), false); + break; + case _DESTINY: + oled_write_P(PSTR("DSTNY"), false); + break; + case _QWERTY: + oled_write_P(PSTR("QWRTY"), false); + break; + case _COLEMAK: + oled_write_P(PSTR("COLMK"), false); + break; + case _LOWER: + oled_write_P(PSTR("LOWER"), false); + break; + case _RAISE: + oled_write_P(PSTR("RAISE"), false); + break; + case _ADJUST: + oled_write_P(PSTR("ADJST"), false); + break; + default: + oled_write_P(PSTR("UNDEF"), false); + } + + // Host Keyboard LED Status + uint8_t led_state = host_keyboard_leds(); + oled_write_P(PSTR("-----"), false); + oled_write_P(IS_LED_ON(led_state, USB_LED_NUM_LOCK) ? PSTR("NUMLK") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_state, USB_LED_CAPS_LOCK) ? PSTR("CAPLK") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRLK") : PSTR(" "), false); + +#ifdef RGB_OLED_MENU + static char buffer[31] = { 0 }; + snprintf(buffer, sizeof(buffer), "h%3d s%3d v%3d s%3d m%3d e%3d ", rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v, rgb_matrix_config.speed, rgb_matrix_config.mode, rgb_matrix_get_flags()); + buffer[4 + rgb_encoder_state * 5] = '<'; + + oled_write_P(PSTR("-----"), false); + oled_write(buffer, false); +#endif +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_status(); + } else { + render_logo(); + oled_scroll_left(); + } +} + +#endif
\ No newline at end of file diff --git a/keyboards/rgbkb/sol/keymaps/xyverz/readme.md b/keyboards/rgbkb/sol/keymaps/xyverz/readme.md new file mode 100644 index 000000000..485426f8e --- /dev/null +++ b/keyboards/rgbkb/sol/keymaps/xyverz/readme.md @@ -0,0 +1,132 @@ +# Xyverz's Sol Layout +## Layout + +### Base modifier layout +``` + * ,------------------------------------------------. ,------------------------------------------------. + * | ESC | | | | | | - | | = | | | | | | \ | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | Tab | | | | | | [ | | ] | | | | | | / | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | Del | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * |Shift | | | | | | | | | | | | | |Shift | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Adj | Alt | ` | Left | Rght | Ctrl | Alt | | Alt | Ctrl | Up | Down | / | = | Adj | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------' + * | BkSp | Win | | Enter| Space| + * `-------------' `-------------' +``` + +### Qwerty alphas +``` + * ,------------------------------------------------. ,------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | Q | W | E | R | T | | | | Y | U | I | O | P | | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | A | S | D | F | G | | | | H | J | K | L | ; | ' | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | Z | X | C | V | B | | | | N | M | , | . | / | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * `------+------+------+------+------+------+------| |------+------+------+------+------+------+------' + * | | | | | | + * `-------------' `-------------' +``` + +### Dvorak alphas +``` + * ,------------------------------------------------. ,------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | " | , | . | P | Y | | | | F | G | C | R | L | | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | A | O | E | U | I | | | | D | H | T | N | S | - | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | ; | Q | J | K | X | | | | B | M | W | V | Z | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * `------+------+------+------+------+------+------| |------+------+------+------+------+------+------' + * | | | | | | + * `-------------' `--------=----' +``` +### Colemak alphas +``` + * ,------------------------------------------------. ,------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | Q | W | F | P | B | | | | J | L | U | Y | ; | | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | A | R | S | T | G | | | | K | N | E | I | O | ' | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | Z | X | C | D | V | | | | M | H | , | . | / | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * `------+------+------+------+------+------+------| |------+------+------+------+------+------+------' + * | | | | | | + * `-------------' `-------------' +``` + +### Adjust (ADJ) +``` + * ,------------------------------------------------. ,------------------------------------------------. + * | F11 | F1 | F2 | F3 | F4 | F5 | RESET| | | F6 | F7 | F8 | F9 | F10 | F12 | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | |QWERTY|DVORAK|COLEMK| | | | | | PrSc | ScLk | NmLk | | | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | | Mute | Vol- | Vol+ | | | | |RGBTOG|RGBMOD| HUI | SAI | VAI | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | Prev | Play | Next | | | | | |RGBRMD| HUD | SAD | VAD | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | | Home | End | | | | | | PgUp | PgDn | | | | + * `------+------+------+------+------+------+------| |------+------+------+------+------+------+------' + * | Del | | | | Ins | + * `-------------' `-------------' +``` + +## Customize + +see `qmk_firmware/keyboards/sol/rev1/keymaps/default/rules.mk` + +``` + +# Variables you can set for SOL + +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = ne # 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 +RGBLIGHT_ENABLE = yes # Enable global lighting effects. Do not enable with RGB Matrix +LED_ANIMATIONS = yes # LED animations +LED_MIRRORED = no # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master) +RGB_MATRIX_ENABLE = no # Enable per-key coordinate based RGB effects. Do not enable with RGBlight +RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. Can be very laggy +RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port +UNICODE_ENABLE = no # Unicode +SWAP_HANDS_ENABLE = no # Enable one-hand typing +ENCODER_ENABLE_CUSTOM = yes # Enable rotary encoder + +OLED_ENABLE = yes # OLED_ENABLE +IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) + + +``` +## Compile + +go to qmk top directory. +``` +$ cd qmk_firmware +``` + +build +``` +$ make sol:xyverz +``` + +After the initial flash with AVRdudess, you should be able to flash using this: +``` +$ make sol:xyverz:flash +``` diff --git a/keyboards/rgbkb/sol/keymaps/xyverz/rules.mk b/keyboards/rgbkb/sol/keymaps/xyverz/rules.mk new file mode 100644 index 000000000..903d4619b --- /dev/null +++ b/keyboards/rgbkb/sol/keymaps/xyverz/rules.mk @@ -0,0 +1,54 @@ +# 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 +MOUSEKEY_ENABLE = no # Mouse keys + +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # 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 +RGBLIGHT_ENABLE = yes # Enable global lighting effects. Do not enable with RGB Matrix +RGBLIGHT_ANIMATIONS = yes # LED animations +LED_MIRRORED = yes # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master) +RGB_MATRIX_ENABLE = no # Enable per-key coordinate based RGB effects. Do not enable with RGBlight +RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. Can be very laggy +RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port +UNICODE_ENABLE = no # Unicode +SWAP_HANDS_ENABLE = no # Enable one-hand typing +ENCODER_ENABLE_CUSTOM = no # Enable rotary encoder +AUDIO_ENABLE = no + +OLED_ENABLE = no # OLED_ENABLE +IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) +DEFAULT_FOLDER = rgbkb/sol/rev1 +ENCODER_ENABLE = no +OLED_DRIVER_ENABLE = yes + +# Do not edit past here + +ifeq ($(strip $(OLED_ENABLE)), yes) + OPT_DEFS += -DOLED_ENABLE +endif + +ifeq ($(strip $(ENCODER_ENABLE_CUSTOM)), yes) + OPT_DEFS += -DENCODER_ENABLE_CUSTOM + SRC += common/knob_v2.c + +endif + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE + +else ifeq ($(strip $(RGBLIGHT_FULL_POWER)), yes) + OPT_DEFS += -DRGBLIGHT_FULL_POWER +endif + +ifeq ($(strip $(RGB_MATRIX_KEYPRESSES)), yes) + OPT_DEFS += -DRGB_MATRIX_KEYPRESSES +endif + +ifeq ($(strip $(LED_MIRRORED)), yes) + OPT_DEFS += -DLED_MIRRORED +endif
\ No newline at end of file diff --git a/keyboards/rgbkb/sol/readme.md b/keyboards/rgbkb/sol/readme.md index 391189095..7e7946d57 100644 --- a/keyboards/rgbkb/sol/readme.md +++ b/keyboards/rgbkb/sol/readme.md @@ -1,15 +1,15 @@ # Sol -![Sol](https://cdn.shopify.com/s/files/1/0008/8827/5005/products/CqdJAno_2048x2048.jpg?v=1533825028) +![Sol](https://imgur.com/1chZff9) -Sol is a split ergonomic keyboard with ortholinear alphas and several modifier layouts. It can use up to 88 RGB LEDs, with per-key backlighting and underglow. The boards have presoldered components, including type C ports and ATmega32U4. Sol, when used with dual power supplies, is the brightest keyboard on earth. +Sol is a split ergonomic keyboard with ortholinear alphas and several modifier layouts. It can use up to 180 RGB LEDs, with per-key backlighting, perimeter, and optional underglow. The boards have presoldered components, including type C ports and ATmega32U4. Sol, when used with dual power supplies, is the brightest keyboard on earth. Keyboard Maintainer: [Legonut](https://github.com/Legonut) -Hardware Supported: Sol PCB R1.0, R1.1 +Hardware Supported: Sol PCB R1.0, R1.1, R2.0, R2.1 Hardware Availability: [RGBKB](https://www.rgbkb.net) Make example for this keyboard (after setting up your build environment): - make rgbkb/sol:default + make rgbkb/sol/rev2:default 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/rgbkb/sol/rev1/config.h b/keyboards/rgbkb/sol/rev1/config.h index 51c4bbb65..3cfc3eef9 100644 --- a/keyboards/rgbkb/sol/rev1/config.h +++ b/keyboards/rgbkb/sol/rev1/config.h @@ -26,6 +26,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define PRODUCT Sol #define DESCRIPTION "An RGB, split, ortho-esque keyboard" +/* ws2812 RGB LED */ +#define RGB_DI_PIN B3 + #ifdef LED_MIRRORED #define RGBLED_NUM 35 #else @@ -34,3 +37,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DRIVER_LED_TOTAL RGBLED_NUM #define RGB_MATRIX_CENTER { 112, 35 } + +// Encoder support +#define ENCODERS_PAD_A { D2 } +#define ENCODERS_PAD_B { D6 } diff --git a/keyboards/rgbkb/sol/rev1/post_rules.mk b/keyboards/rgbkb/sol/rev1/post_rules.mk new file mode 100644 index 000000000..ede37a1ad --- /dev/null +++ b/keyboards/rgbkb/sol/rev1/post_rules.mk @@ -0,0 +1,19 @@ +# As long as the users rules.mk has include $(KEYBOARD)/post_rules.mk this will be run after to properly setup any keyboard features and defines + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +else ifeq ($(strip $(RGBLIGHT_FULL_POWER)), yes) + OPT_DEFS += -DRGBLIGHT_FULL_POWER +endif + +ifeq ($(strip $(RGB_MATRIX_KEYPRESSES)), yes) + OPT_DEFS += -DRGB_MATRIX_KEYPRESSES +endif + +ifeq ($(strip $(RGB_MATRIX_FRAMEBUFFER)), yes) + OPT_DEFS += -DRGB_MATRIX_FRAMEBUFFER_EFFECTS +endif + +ifeq ($(strip $(LED_MIRRORED)), yes) + OPT_DEFS += -DLED_MIRRORED +endif diff --git a/keyboards/rgbkb/sol/rev1/rev1.c b/keyboards/rgbkb/sol/rev1/rev1.c index 6ee4b610b..21b4503ab 100644 --- a/keyboards/rgbkb/sol/rev1/rev1.c +++ b/keyboards/rgbkb/sol/rev1/rev1.c @@ -2,18 +2,18 @@ #ifdef RGB_MATRIX_ENABLE led_config_t g_led_config = { { - { 0, 1, 2, 3, 4, 5, 6 }, - { 7, 8, 9, 10, 11, 12, 13 }, - { 14, 15, 16, 17, 18, 19, 20 }, - { 21, 22, 23, 24, 25, 26, 27 }, - { 28, 29, 30, 31, 32, 33, 34 }, - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 33, 34 }, - { 35, 36, 37, 38, 39, 40, 41 }, - { 42, 43, 44, 45, 46, 47, 48 }, - { 49, 50, 51, 52, 53, 54, 55 }, - { 56, 57, 58, 59, 60, 61, 62 }, - { 63, 64, 65, 66, 67, 68, 68 }, - { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 68, 68 } + { 0, 1, 2, 3, 4, 5, 6 }, + { 7, 8, 9, 10, 11, 12, 13 }, + { 14, 15, 16, 17, 18, 19, 20 }, + { 21, 22, 23, 24, 25, 26, 27 }, + { 28, 29, 30, 31, 32, 33, 34 }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 33, 34 }, + { 35, 36, 37, 38, 39, 40, 41 }, + { 42, 43, 44, 45, 46, 47, 48 }, + { 49, 50, 51, 52, 53, 54, 55 }, + { 56, 57, 58, 59, 60, 61, 62 }, + { 63, 64, 65, 66, 67, 68, 68 }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 68, 68 } }, { // Left Hand Mapped Left to Right { 0, 0 }, { 21, 0 }, { 38, 0 }, { 56, 0 }, { 73, 0 }, { 91, 0 }, { 112, 0 }, diff --git a/keyboards/rgbkb/sol/rev1/rules.mk b/keyboards/rgbkb/sol/rev1/rules.mk index e69de29bb..dd6d25eb9 100644 --- a/keyboards/rgbkb/sol/rev1/rules.mk +++ b/keyboards/rgbkb/sol/rev1/rules.mk @@ -0,0 +1,28 @@ +# RGBKB Sol Rev1 Defaults + +# Keycode Options +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +UNICODE_ENABLE = no # Unicode keycodes +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work + +# Debug Options +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration + +# RGB Options +RGBLIGHT_ENABLE = yes # Enable global lighting effects. Do not enable with RGB Matrix +RGBLIGHT_ANIMATIONS = yes # LED animations +LED_MIRRORED = yes # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master) + +RGB_MATRIX_ENABLE = no # Enable per-key coordinate based RGB effects. Do not enable with RGBlight +RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. +RGB_MATRIX_FRAMEBUFFER_EFFECTS = no # Enable frame buffer effects like the typing heatmap. + +RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness for RGBLIGHT or RGB_MATRIX. Otherwise, limited to a safe level for a normal USB-A port +IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) + +# Misc +OLED_DRIVER_ENABLE = no # Enable the OLED Driver +SWAP_HANDS_ENABLE = no # Enable one-hand typing diff --git a/keyboards/rgbkb/sol/rev2/config.h b/keyboards/rgbkb/sol/rev2/config.h new file mode 100644 index 000000000..af74b7e46 --- /dev/null +++ b/keyboards/rgbkb/sol/rev2/config.h @@ -0,0 +1,61 @@ +/* +Copyright 2012 Jun Wako <wakojun@gmail.com> +Copyright 2015 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/>. +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0002 +#define MANUFACTURER RGBKB +#define PRODUCT Sol +#define DESCRIPTION "An RGB, split, ortho-esque keyboard" + +/* ws2812 RGB LED */ +#define RGB_DI_PIN B7 + +#define BACKLIGHT_LEDS 124 + +#ifdef FULLHAND_ENABLE + #define FULLHAND_LEDS 24 +#else + #define FULLHAND_LEDS 0 +#endif + +// Underglow / DIY Tent Glow are parallel to the top row leds, no separate define + +#ifdef LED_MIRRORED + #define RGBLED_NUM ((BACKLIGHT_LEDS + FULLHAND_LEDS) / 2) +#else + #define RGBLED_NUM (BACKLIGHT_LEDS + FULLHAND_LEDS) +#endif +#define DRIVER_LED_TOTAL RGBLED_NUM + +#define RGB_MATRIX_CENTER { 112, 37 } + +// Encoder support +#ifndef EXTRA_ENCODERS_ENABLE +#define ENCODERS_PAD_A { D2 } +#define ENCODERS_PAD_B { D6 } +#else +#ifdef OLED_DRIVER_ENABLE + #error Extra encoders cannot be enabled at the same time as the OLED Driver as they use the same pins. +#endif +#define ENCODERS_PAD_A { D2, D1, B0 } +#define ENCODERS_PAD_B { D6, B1, D0 } +#endif diff --git a/keyboards/rgbkb/sol/rev2/info.json b/keyboards/rgbkb/sol/rev2/info.json new file mode 100644 index 000000000..e252ea2e2 --- /dev/null +++ b/keyboards/rgbkb/sol/rev2/info.json @@ -0,0 +1,87 @@ +{ + "keyboard_name": "Sol", + "url": "", + "maintainer": "Legonut", + "width": 17, + "height": 6.5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"L00", "x":0, "y":0, "w":1.5}, + {"label":"L01", "x":1.5, "y":0}, + {"label":"L02", "x":2.5, "y":0}, + {"label":"L03", "x":3.5, "y":0}, + {"label":"L04", "x":4.5, "y":0}, + {"label":"L05", "x":5.5, "y":0}, + {"label":"L06", "x":6.75, "y":0}, + {"label":"R06", "x":9.25, "y":0}, + {"label":"R00", "x":10.5, "y":0}, + {"label":"R01", "x":11.5, "y":0}, + {"label":"R02", "x":12.5, "y":0}, + {"label":"R03", "x":13.5, "y":0}, + {"label":"R04", "x":14.5, "y":0}, + {"label":"R05", "x":15.5, "y":0, "w":1.5}, + {"label":"L10", "x":0, "y":1, "w":1.5}, + {"label":"L11", "x":1.5, "y":1}, + {"label":"L12", "x":2.5, "y":1}, + {"label":"L13", "x":3.5, "y":1}, + {"label":"L14", "x":4.5, "y":1}, + {"label":"L15", "x":5.5, "y":1}, + {"label":"L16", "x":6.75, "y":1}, + {"label":"R16", "x":9.25, "y":1}, + {"label":"R10", "x":10.5, "y":1}, + {"label":"R11", "x":11.5, "y":1}, + {"label":"R12", "x":12.5, "y":1}, + {"label":"R13", "x":13.5, "y":1}, + {"label":"R14", "x":14.5, "y":1}, + {"label":"R15", "x":15.5, "y":1, "w":1.5}, + {"label":"L20", "x":0, "y":2, "w":1.5}, + {"label":"L21", "x":1.5, "y":2}, + {"label":"L22", "x":2.5, "y":2}, + {"label":"L23", "x":3.5, "y":2}, + {"label":"L24", "x":4.5, "y":2}, + {"label":"L25", "x":5.5, "y":2}, + {"label":"L26", "x":6.75, "y":2}, + {"label":"R26", "x":9.25, "y":2}, + {"label":"R20", "x":10.5, "y":2}, + {"label":"R21", "x":11.5, "y":2}, + {"label":"R22", "x":12.5, "y":2}, + {"label":"R23", "x":13.5, "y":2}, + {"label":"R24", "x":14.5, "y":2}, + {"label":"R25", "x":15.5, "y":2, "w":1.5}, + {"label":"L30", "x":0, "y":3, "w":1.5}, + {"label":"L31", "x":1.5, "y":3}, + {"label":"L32", "x":2.5, "y":3}, + {"label":"L33", "x":3.5, "y":3}, + {"label":"L34", "x":4.5, "y":3}, + {"label":"L35", "x":5.5, "y":3}, + {"label":"L36", "x":6.75, "y":3}, + {"label":"R36", "x":9.25, "y":3}, + {"label":"R30", "x":10.5, "y":3}, + {"label":"R31", "x":11.5, "y":3}, + {"label":"R32", "x":12.5, "y":3}, + {"label":"R33", "x":13.5, "y":3}, + {"label":"R34", "x":14.5, "y":3}, + {"label":"R35", "x":15.5, "y":3, "w":1.5}, + {"label":"L40", "x":0, "y":4, "w":1.5}, + {"label":"L41", "x":1.5, "y":4}, + {"label":"L42", "x":2.5, "y":4}, + {"label":"L43", "x":3.5, "y":4}, + {"label":"L44", "x":4.5, "y":4}, + {"label":"L45", "x":6, "y":4.5}, + {"label":"L46", "x":7, "y":4.5}, + {"label":"R46", "x":9, "y":4.5}, + {"label":"R40", "x":10, "y":4.5}, + {"label":"R41", "x":11.5, "y":4}, + {"label":"R42", "x":12.5, "y":4}, + {"label":"R43", "x":13.5, "y":4}, + {"label":"R44", "x":14.5, "y":4}, + {"label":"R45", "x":15.5, "y":4, "w":1.5}, + {"label":"L55", "x":6, "y":5.5}, + {"label":"L56", "x":7, "y":5.5}, + {"label":"R56", "x":9, "y":5.5}, + {"label":"R50", "x":10, "y":5.5} + ] + } + } +} diff --git a/keyboards/rgbkb/sol/rev2/post_rules.mk b/keyboards/rgbkb/sol/rev2/post_rules.mk new file mode 100644 index 000000000..0cbf430ad --- /dev/null +++ b/keyboards/rgbkb/sol/rev2/post_rules.mk @@ -0,0 +1,37 @@ +# As long as the users rules.mk has include $(KEYBOARD)/post_rules.mk this will be run after to properly setup any keyboard features and defines + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +else ifeq ($(strip $(RGBLIGHT_FULL_POWER)), yes) + OPT_DEFS += -DRGBLIGHT_FULL_POWER +endif + +ifeq ($(strip $(RGB_MATRIX_KEYPRESSES)), yes) + OPT_DEFS += -DRGB_MATRIX_KEYPRESSES +endif + +ifeq ($(strip $(RGB_MATRIX_FRAMEBUFFER)), yes) + OPT_DEFS += -DRGB_MATRIX_FRAMEBUFFER_EFFECTS +endif + +ifeq ($(strip $(LED_MIRRORED)), yes) + OPT_DEFS += -DLED_MIRRORED +endif + +ifeq ($(strip $(FULLHAND_ENABLE)), yes) + OPT_DEFS += -DFULLHAND_ENABLE +endif + +ifeq ($(strip $(EXTRA_ENCODERS_ENABLE)), yes) + OPT_DEFS += -DEXTRA_ENCODERS_ENABLE +endif + +ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) + ifeq ($(strip $(ENCODER_ENABLE)), yes) + ifneq ($(strip $(RGB_MATRIX_ENABLE)), no) + ifneq ($(strip $(RGB_OLED_MENU)), no) + OPT_DEFS += -DRGB_OLED_MENU=$(strip $(RGB_OLED_MENU)) + endif + endif + endif +endif diff --git a/keyboards/rgbkb/sol/rev2/rev2.c b/keyboards/rgbkb/sol/rev2/rev2.c new file mode 100644 index 000000000..467aa18e4 --- /dev/null +++ b/keyboards/rgbkb/sol/rev2/rev2.c @@ -0,0 +1,89 @@ +#include "quantum.h" + +#ifdef RGB_MATRIX_ENABLE +led_config_t g_led_config = { { + { 0, 1, 2, 3, 4, 5, 6 }, + { 7, 8, 9, 10, 11, 12, 13 }, + { 14, 15, 16, 17, 18, 19, 20 }, + { 21, 22, 23, 24, 25, 26, 27 }, + { 28, 29, 30, 31, 32, 33, 34 }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 33, 34 }, +// Need to shift Right hand indexes if full hand LEDs are enabled +#define LO (FULLHAND_LEDS / 2) + { LO+62, LO+63, LO+64, LO+65, LO+66, LO+67, LO+68 }, + { LO+69, LO+70, LO+71, LO+72, LO+73, LO+74, LO+75 }, + { LO+76, LO+77, LO+78, LO+79, LO+80, LO+81, LO+82 }, + { LO+83, LO+84, LO+85, LO+86, LO+87, LO+88, LO+89 }, + { LO+90, LO+91, LO+92, LO+93, LO+94, LO+95, LO+95 }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, LO+95, LO+95 } +#undef LO +}, { +// Left Hand Mapped Left to Right + { 11, 14 }, { 28, 14 }, { 42, 14 }, { 56, 14 }, { 70, 14 }, { 84, 14 }, { 102, 14 }, + { 11, 28 }, { 28, 28 }, { 42, 28 }, { 56, 28 }, { 70, 28 }, { 84, 28 }, { 98, 25 }, + { 11, 42 }, { 28, 42 }, { 42, 42 }, { 56, 42 }, { 70, 42 }, { 84, 42 }, { 98, 39 }, + { 11, 56 }, { 28, 56 }, { 42, 56 }, { 56, 56 }, { 70, 56 }, { 84, 56 }, { 98, 53 }, + { 11, 70 }, { 28, 70 }, { 42, 70 }, { 56, 70 }, { 70, 70 }, { 83, 87 }, { 93, 97 }, +// Edge Light Left + { 0, 66 }, { 0, 52 }, { 0, 38 }, { 0, 24 }, { 0, 10 }, { 31, 0 }, { 38, 0 }, + { 46, 0 }, { 54, 0 }, { 61, 0 }, { 69, 0 }, { 76, 0 }, { 84, 0 }, { 109, 11 }, + { 109, 24 }, { 109, 39 }, { 109, 53 }, { 110, 73 }, { 112, 85 }, { 106, 95 }, { 95, 98 }, + { 83, 91 }, { 71, 84 }, { 58, 77 }, { 42, 74 }, { 28, 74 }, { 14, 74 }, +// Full Hand Left +#ifdef FULLHAND_ENABLE + { 2, 88 }, { 2, 103 }, { 2, 117 }, { 2, 132 }, { 10, 145 }, { 25, 145 }, { 39, 145 }, + { 54, 145 }, { 69, 145 }, { 79, 136 }, { 87, 124 }, { 94, 111 }, +#endif +// Left Hand Mapped Right to Left + { 213, 14 }, { 196, 14 }, { 182, 14 }, { 168, 14 }, { 154, 14 }, { 140, 14 }, { 122, 14 }, + { 213, 28 }, { 196, 28 }, { 182, 28 }, { 168, 28 }, { 154, 28 }, { 140, 28 }, { 126, 25 }, + { 213, 42 }, { 196, 42 }, { 182, 42 }, { 168, 42 }, { 154, 42 }, { 140, 42 }, { 126, 39 }, + { 213, 56 }, { 196, 56 }, { 182, 56 }, { 168, 56 }, { 154, 56 }, { 140, 56 }, { 126, 53 }, + { 213, 70 }, { 196, 70 }, { 182, 70 }, { 168, 70 }, { 154, 70 }, { 141, 87 }, { 131, 97 }, +// Edge Light Right + { 224, 66 }, { 224, 52 }, { 224, 38 }, { 224, 24 }, { 224, 10 }, { 193, 0 }, { 186, 0 }, + { 178, 0 }, { 170, 0 }, { 163, 0 }, { 155, 0 }, { 148, 0 }, { 140, 0 }, { 115, 11 }, + { 115, 24 }, { 115, 39 }, { 115, 53 }, { 114, 73 }, { 112, 85 }, { 118, 95 }, { 129, 98 }, + { 141, 91 }, { 153, 84 }, { 166, 77 }, { 182, 74 }, { 196, 74 }, { 210, 74 } +// Full Hand Right +#ifdef FULLHAND_ENABLE + ,{ 222, 88 }, { 222, 103 }, { 222, 117 }, { 222, 132 }, { 214, 145 }, { 199, 145 }, { 185, 145 }, + { 170, 145 }, { 155, 145 }, { 145, 136 }, { 137, 124 }, { 130, 111 } +#endif +}, { +// Left Hand Mapped Left to Right + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 1, 1, 1, 1, +// Edge Light Left + 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, +// Full Hand Left +#ifdef FULLHAND_ENABLE + 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, +#endif +// Left Hand Mapped Right to Left + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 1, 1, 1, 1, +// Edge Light Right + 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2 +// Full Hand Right +#ifdef FULLHAND_ENABLE + ,2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2 +#endif +} }; + +#endif + diff --git a/keyboards/rgbkb/sol/rev2/rev2.h b/keyboards/rgbkb/sol/rev2/rev2.h new file mode 100644 index 000000000..6f70f09be --- /dev/null +++ b/keyboards/rgbkb/sol/rev2/rev2.h @@ -0,0 +1 @@ +#pragma once diff --git a/keyboards/rgbkb/sol/rev2/rules.mk b/keyboards/rgbkb/sol/rev2/rules.mk new file mode 100644 index 000000000..87b400fa1 --- /dev/null +++ b/keyboards/rgbkb/sol/rev2/rules.mk @@ -0,0 +1,35 @@ +# RGBKB Sol Rev2 Defaults + +# Keycode Options +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration( +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +UNICODE_ENABLE = no # Unicode keycodes +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work + +# Debug Options +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration + +# RGB Options +RGBLIGHT_ENABLE = no # Enable global lighting effects. Do not enable with RGB Matrix +RGBLIGHT_ANIMATIONS = no # LED animations +LED_MIRRORED = no # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master) + +RGB_MATRIX_ENABLE = WS2812 # Enable per-key coordinate based RGB effects. Do not enable with RGBlight +RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. +RGB_MATRIX_FRAMEBUFFER_EFFECTS = no # Enable frame buffer effects like the typing heatmap. + +RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness for RGBLIGHT or RGB_MATRIX. Otherwise, limited to a safe level for a normal USB-A port +FULLHAND_ENABLE = no # Enables the additional 24 Full Hand LEDs +IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) + +# Misc +OLED_DRIVER_ENABLE = no # Enable the OLED Driver +EXTRA_ENCODERS_ENABLE = no # Enables 3 encoders per side (up from 1, not compatible with OLED_DRIVER_ENABLE) +SWAP_HANDS_ENABLE = no # Enable one-hand typing +LINK_TIME_OPTIMIZATION_ENABLE = yes # Enable Link Time Optimizations greatly reducing firmware size by disabling the old Macros and Functions features + +# Special RGB Matrix, OLED, & Encoder Control Menu! +RGB_OLED_MENU = no # Enabled by setting this to the encoder index (0-5) you wish to use to control the menu. + # Use the RGB_MENU keycode in the keymap for the encoder to advance the menu to the next option. diff --git a/keyboards/rgbkb/sol/rules.mk b/keyboards/rgbkb/sol/rules.mk index 62dd969aa..e3d3953df 100644 --- a/keyboards/rgbkb/sol/rules.mk +++ b/keyboards/rgbkb/sol/rules.mk @@ -1,66 +1,20 @@ # 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) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = qmk-dfu -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Custom local font file OPT_DEFS += -DOLED_FONT_H=\"common/glcdfont.c\" SPLIT_KEYBOARD = yes ENCODER_ENABLE = yes -# 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 = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = yes # 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 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. - -DEFAULT_FOLDER = rgbkb/sol/rev1 +DEFAULT_FOLDER = rgbkb/sol/rev2 diff --git a/keyboards/rgbkb/sol/sol.h b/keyboards/rgbkb/sol/sol.h index d26546006..1bc87cb0a 100644 --- a/keyboards/rgbkb/sol/sol.h +++ b/keyboards/rgbkb/sol/sol.h @@ -3,6 +3,8 @@ #include "quantum.h" #ifdef KEYBOARD_rgbkb_sol_rev1 #include "rev1.h" +#else +#include "rev2.h" #endif @@ -29,6 +31,32 @@ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, R50, R56 } \ } +#define ENCODER_LAYOUT( \ + E10, E11, \ + E20, E21 \ +) \ +{ \ + { E10, E11 }, \ + { E20, E21 } \ +} + +#define EXTRA_ENCODER_LAYOUT( \ + E10, E11, \ + E20, E21, \ + E30, E31, \ + E40, E41, \ + E50, E51, \ + E60, E61 \ +) \ +{ \ + { E10, E11 }, \ + { E20, E21 }, \ + { E30, E31 }, \ + { E40, E41 }, \ + { E50, E51 }, \ + { E60, E61 } \ +} + #define KC________ KC_TRNS #define KC_RGB_MOD RGB_MOD #define KC_FN FN diff --git a/keyboards/rgbkb/zen/rev1/keymaps/default/keymap.c b/keyboards/rgbkb/zen/rev1/keymaps/default/keymap.c index 54462ec0f..9eee64311 100644 --- a/keyboards/rgbkb/zen/rev1/keymaps/default/keymap.c +++ b/keyboards/rgbkb/zen/rev1/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // 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. diff --git a/keyboards/rgbkb/zen/rev1/rev1.h b/keyboards/rgbkb/zen/rev1/rev1.h index a12f2ea78..470a26a43 100644 --- a/keyboards/rgbkb/zen/rev1/rev1.h +++ b/keyboards/rgbkb/zen/rev1/rev1.h @@ -2,10 +2,8 @@ #include "zen.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" - #ifdef USE_I2C #include <stddef.h> #ifdef __AVR__ @@ -14,8 +12,6 @@ #endif #endif -//void promicro_bootloader_jmp(bool program); - #define LAYOUT( \ k00, k01, k02, k03, k04, k05, k55, k54, k53, k52, k51, k50, \ k10, k11, k12, k13, k14, k15, k65, k64, k63, k62, k61, k60, \ diff --git a/keyboards/rgbkb/zen/rev2/config.h b/keyboards/rgbkb/zen/rev2/config.h index b9f3d2228..c2bb360bd 100644 --- a/keyboards/rgbkb/zen/rev2/config.h +++ b/keyboards/rgbkb/zen/rev2/config.h @@ -41,8 +41,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { C6, E6, B5, D7, B4 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B3, B1, B2 } -#define NUMBER_OF_ENCODERS 1 - #define ENCODERS_PAD_A { D4 } #define ENCODERS_PAD_B { D2 } diff --git a/keyboards/rgbkb/zen/rev2/keymaps/default/keymap.c b/keyboards/rgbkb/zen/rev2/keymaps/default/keymap.c index dba4a2ddd..2f0138c8e 100644 --- a/keyboards/rgbkb/zen/rev2/keymaps/default/keymap.c +++ b/keyboards/rgbkb/zen/rev2/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // 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. diff --git a/keyboards/rgbkb/zen/rev2/rev2.h b/keyboards/rgbkb/zen/rev2/rev2.h index 101622988..c545710ab 100644 --- a/keyboards/rgbkb/zen/rev2/rev2.h +++ b/keyboards/rgbkb/zen/rev2/rev2.h @@ -2,10 +2,8 @@ #include "zen.h" -//void promicro_bootloader_jmp(bool program); #include "quantum.h" - #ifdef USE_I2C #include <stddef.h> #ifdef __AVR__ @@ -14,8 +12,6 @@ #endif #endif -//void promicro_bootloader_jmp(bool program); - #ifdef CONVERT_TO_PROTON_C #define LAYOUT( \ k00, k01, k02, k03, k04, k05, k55, k54, k53, k52, k51, k50, \ diff --git a/keyboards/rgbkb/zen/rules.mk b/keyboards/rgbkb/zen/rules.mk index 7473b61cf..4193d23e0 100644 --- a/keyboards/rgbkb/zen/rules.mk +++ b/keyboards/rgbkb/zen/rules.mk @@ -1,11 +1,15 @@ -# Pro Micro or Elite-C -# Automagically converted to Proton-C +# MCU name MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) -BOOTLOADER = dfu -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina ifeq ($(strip $(CTPC)), yes) CONVERT_TO_PROTON_C=yes diff --git a/keyboards/rgbkb/zygomorph/rev1/config.h b/keyboards/rgbkb/zygomorph/rev1/config.h index ad58761cc..6e55a6a5f 100644 --- a/keyboards/rgbkb/zygomorph/rev1/config.h +++ b/keyboards/rgbkb/zygomorph/rev1/config.h @@ -40,7 +40,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define SOFT_SERIAL_PIN D3 -#define NUMBER_OF_ENCODERS 1 #define ENCODERS_PAD_A { D2 } #define ENCODERS_PAD_B { D7 } diff --git a/keyboards/rgbkb/zygomorph/rules.mk b/keyboards/rgbkb/zygomorph/rules.mk index 9bafc7b1d..955221fdf 100644 --- a/keyboards/rgbkb/zygomorph/rules.mk +++ b/keyboards/rgbkb/zygomorph/rules.mk @@ -1,47 +1,16 @@ # MCU name 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) - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = qmk-dfu -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Build Options # change yes to no to disable # |