From 9f738cadd649ea974404c2414c0f91330cfeee3a Mon Sep 17 00:00:00 2001 From: denisg Date: Sat, 16 Jul 2022 17:02:09 +0300 Subject: [PATCH 01/11] SofleV2 wonderbeat --- keyboards/sofle/keymaps/wonderbeat/config.h | 61 +++++ keyboards/sofle/keymaps/wonderbeat/encoder.c | 55 +++++ keyboards/sofle/keymaps/wonderbeat/keymap.c | 230 ++++++++++++++++++ keyboards/sofle/keymaps/wonderbeat/oled.c | 232 +++++++++++++++++++ keyboards/sofle/keymaps/wonderbeat/rules.mk | 7 + 5 files changed, 585 insertions(+) create mode 100644 keyboards/sofle/keymaps/wonderbeat/config.h create mode 100644 keyboards/sofle/keymaps/wonderbeat/encoder.c create mode 100644 keyboards/sofle/keymaps/wonderbeat/keymap.c create mode 100644 keyboards/sofle/keymaps/wonderbeat/oled.c create mode 100644 keyboards/sofle/keymaps/wonderbeat/rules.mk diff --git a/keyboards/sofle/keymaps/wonderbeat/config.h b/keyboards/sofle/keymaps/wonderbeat/config.h new file mode 100644 index 000000000000..6aefdea1c5c3 --- /dev/null +++ b/keyboards/sofle/keymaps/wonderbeat/config.h @@ -0,0 +1,61 @@ + /* Copyright 2020 Josef Adamcik + * Modification for VIA support and RGB underglow by Jens Bonk-Wiltfang + * + * 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 + +/* The way how "handedness" is decided (which half is which), +see https://docs.qmk.fm/#/feature_split_keyboard?id=setting-handedness +for more options. +*/ + +#define EE_HANDS + +#ifdef RGBLIGHT_ENABLE +#define RGBLIGHT_ANIMATIONS +/* #define RGB_LIGHT_EFFECT_BREATHE_MAX 200 */ +/* #define RGBLIGHT_RAINBOW_SWIRL_RANGE 127 */ +/* #define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_RAINBOW_MOOD */ +/* #define RGBLIGHT_DEFAULT_HUE 205 */ +/* #define RGBLIGHT_EFFECT_RAINBOW_MOOD */ +#define RGBLIGHT_DEFAULT_SPD 10 +#endif + +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT +#define PERMISSIVE_HOLD + + +#ifdef RGB_MATRIX_ENABLE +#define RGB_DI_PIN D3 +#define DRIVER_LED_TOTAL RGBLED_NUM +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 80 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. +/* #define RGB_MATRIX_HUE_STEP 8 */ +/* #define RGB_MATRIX_SAT_STEP 8 */ +/* #define RGB_MATRIX_VAL_STEP 8 */ +/* #define RGB_MATRIX_SPD_STEP 10 */ +#define RGB_MATRIX_KEYPRESSES +/* #define RGB_MATRIX_FRAMEBUFFER_EFFECTS */ +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_MULTISPLASH +/* #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_RAINDROPS */ +#define RGB_MATRIX_SPLIT {37,37} +/* #define SPLIT_TRANSPORT_MIRROR */ + +#endif diff --git a/keyboards/sofle/keymaps/wonderbeat/encoder.c b/keyboards/sofle/keymaps/wonderbeat/encoder.c new file mode 100644 index 000000000000..933425f5c983 --- /dev/null +++ b/keyboards/sofle/keymaps/wonderbeat/encoder.c @@ -0,0 +1,55 @@ + /* Copyright 2020 Josef Adamcik + * Modification for VIA support and RGB underglow by Jens Bonk-Wiltfang + * + * 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 . + */ + +//Setting up what encoder rotation does. If your encoder can be pressed as a button, that function can be set in Via. + +#ifdef ENCODER_ENABLE + +bool encoder_update_user(uint8_t index, bool clockwise) { + uint8_t temp_mod = get_mods(); + uint8_t temp_osm = get_oneshot_mods(); + bool is_shift = (temp_mod | temp_osm) & MOD_MASK_SHIFT; + bool is_gui = (temp_mod | temp_osm) & MOD_MASK_GUI; + if (index == 0) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if(index == 1 && is_shift) { + if (clockwise) { + rgb_matrix_increase_speed(); + } else { + rgb_matrix_decrease_speed(); + } + } else if(index == 1 && is_gui) { + if (clockwise) { + rgblight_increase_val(); + } else { + rgblight_decrease_val(); + } + } else if(index == 1) { + if (clockwise) { + tap_code(KC_BRMD); + } else { + tap_code(KC_BRK); + } + } + return true; +} + +#endif diff --git a/keyboards/sofle/keymaps/wonderbeat/keymap.c b/keyboards/sofle/keymaps/wonderbeat/keymap.c new file mode 100644 index 000000000000..4d5c3b2022bb --- /dev/null +++ b/keyboards/sofle/keymaps/wonderbeat/keymap.c @@ -0,0 +1,230 @@ + /* Copyright 2020 Josef Adamcik + * Modification for VIA support and RGB underglow by Jens Bonk-Wiltfang + * + * 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 "oled.c" +#include "encoder.c" + +//Tap Dance Declarations +enum { + TD_QUOT_LBRC = 0, + TD_UNDS_RBRC +}; + +//Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_UNDS_RBRC] = ACTION_TAP_DANCE_DOUBLE(KC_UNDS, KC_RBRC), + [TD_QUOT_LBRC] = ACTION_TAP_DANCE_DOUBLE(KC_QUOT, KC_LBRC) +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * QWERTY + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ESC | Q | W | E | R | T | | Y | U | I | O | P | Bspc | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' | + * |------+------+------+------+------+------| | | |------+------+------+------+------+------| + * |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / |RShift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI | + * | | | | |/ / \ \ | | | | | + * `----------------------------------' '------''---------------------------' + */ + +[0] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, + KC_ESC, LSFT_T(KC_A), LCTL_T(KC_S), LALT_T(KC_D), KC_F, KC_G, KC_H, KC_J, LALT_T(KC_K), LCTL_T(KC_L), LSFT_T(KC_SCLN), KC_BSPC, + TD(TD_QUOT_LBRC), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, TG(1), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, TD(TD_UNDS_RBRC), + KC_LCTRL,KC_LALT,MO(2),KC_LGUI, KC_ENT, KC_SPC, KC_RGUI, MO(3), KC_RALT, KC_RCTRL +), +/* + * COLEMAK + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ESC | Q | W | F | P | G | | J | L | U | Y | ; | Bspc | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | TAB | A | R | S | T | D |-------. ,-------| H | N | E | I | O | ' | + * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------| + * |LShift| Z | X | C | V | B |-------| |-------| K | M | , | . | / |RShift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI | + * | | | | |/ / \ \ | | | | | + * `----------------------------------' '------''---------------------------' + */ +[1] = LAYOUT( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______, + _______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, _______, + _______, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______,KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, + _______,_______,_______,_______, _______, _______,_______,_______,_______, _______ +), +/* LOWER + * ,-----------------------------------------. ,-----------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | ! | @ | # | $ | % |-------. ,-------| ^ | & | * | ( | ) | | | + * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------| + * | Shift| = | - | + | { | } |-------| |-------| [ | ] | ; | : | \ | Shift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI | + * | | | | |/ / \ \ | | | | | + * `----------------------------------' '------''---------------------------' + */ +[2] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F12, + _______, KC_EQL, KC_MINS, KC_PLUS, KC_LCBR, KC_RCBR, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +/* RAISE + * ,----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc | Ins | Pscr | Menu | | | | | PWrd | Up | NWrd | DLine| Bspc | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | LAt | LCtl |LShift| | Caps |-------. ,-------| | Left | Down | Rigth| Del | Bspc | + * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------| + * |Shift | Undo | Cut | Copy | Paste| |-------| |-------| | LStr | | LEnd | | Shift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI | + * | | | | |/ / \ \ | | | | | + * `----------------------------------' '------''---------------------------' + */ +[3] = LAYOUT( + _______, _______ , _______ , _______ , _______ , _______, _______, _______ , _______, _______ , _______ ,_______, + _______, KC_INS, KC_PSCR, KC_APP, XXXXXXX, XXXXXXX, KC_PGUP, _______, KC_UP, _______,_______, KC_BSPC, + _______, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_CAPS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_BSPC, + _______,KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, XXXXXXX, _______, _______, XXXXXXX, _______, XXXXXXX, _______, XXXXXXX, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) +}; + + +#ifdef RGB_MATRIX_ENABLE + // Physical Layout + // Columns + // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 + // ROWS + // 12 13 22 23 32 33 33 32 23 22 13 12 0 + // 02 03 04 04 03 02 + // 11 14 21 24 31 34 34 31 24 21 14 11 1 + // 01 01 + // 10 15 20 25 30 35 35 30 25 20 15 10 2 + // + // 09 16 19 26 29 36 36 29 26 19 16 09 3 + // + // 08 17 18 27 28 28 27 18 17 08 4 + // 07 06 05 05 06 07 + +led_config_t g_led_config = { + { + { 11, 12, 21, 22, 31, 32 }, + { 10, 13, 20, 23, 30, 33 }, + { 9, 14, 19, 24, 29, 34}, + { 8, 15, 18, 25, 28, 35}, + { 7, 16, 17, 26, 27, NO_LED }, + { 47, 48, 57, 58, 67, 68}, + { 46, 49, 56, 59, 66, 69}, + { 45, 50, 55, 60, 65, 70}, + { 44, 51, 54, 61, 64, 71}, + { 43, 52, 53, 62, 63, NO_LED } + }, + { + // Left side underglow + {96, 40}, {16, 20}, {48, 10}, {80, 18}, {88, 60}, {56, 57}, {24,60}, + // Left side Matrix + {32, 57}, { 0, 48}, { 0, 36}, { 0, 24}, { 0, 12}, + {16, 12}, {16, 24}, {16, 36}, {16, 48}, {48, 55}, + {64, 57}, {32, 45}, {32, 33}, {32, 21}, {32, 9}, + {48, 7}, {48, 19}, {48, 31}, {48, 43}, {80, 59}, + {96, 64}, {64, 45}, {64, 33}, {64, 21}, {64, 9}, + {80, 10}, {80, 22}, {80, 34}, {80, 47}, + + + // Right side underglow + {128, 40}, {208, 20}, {176, 10}, {144, 18}, {136, 60}, {168, 57}, {200,60}, + // Right side Matrix + {192, 57}, {224, 48}, {224, 36}, {224, 24}, {224, 12}, + {208, 12}, {208, 24}, {208, 36}, {208, 48}, {176, 55}, + {160, 57}, {192, 45}, {192, 33}, {192, 21}, {192, 9}, + {176, 7}, {176, 19}, {176, 31}, {176, 43}, {144, 59}, + {128, 64}, {160, 45}, {160, 33}, {160, 21}, {160, 9}, + {144, 10}, {144, 22}, {144, 34}, {144, 47}, + }, + { + LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + LED_FLAG_KEYLIGHT, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT + } +}; +#endif + + +void keyboard_post_init_rgb_light(void) { + +#ifdef RGBLIGHT_ENABLE + rgblight_sethsv_pink(); + /* rgblight_setrgb(RGB_ORANGE); */ + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 1); +#endif +/* #ifdef RGB_MATRIX_ENABLE */ +/* rgb_matrix_mode(RGB_MATRIX_RAINBOW_MOVING_CHEVRON); */ +/* #endif */ +} + +#ifdef RGB_MATRIX_ENABLE +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { + case 0: + rgb_matrix_mode(RGB_MATRIX_RAINBOW_MOVING_CHEVRON); + break; + case 1: + rgb_matrix_mode(RGB_MATRIX_JELLYBEAN_RAINDROPS); + break; + case 2: + rgb_matrix_mode(RGB_MATRIX_SOLID_SPLASH); + break; + default: // for any other layers, or the default layer + rgb_matrix_mode(RGB_MATRIX_RAINBOW_MOVING_CHEVRON); + break; + } + return state; +} +#endif + +void keyboard_post_init_user(void) { + keyboard_post_init_rgb_light(); +} diff --git a/keyboards/sofle/keymaps/wonderbeat/oled.c b/keyboards/sofle/keymaps/wonderbeat/oled.c new file mode 100644 index 000000000000..3a28ab12a0a7 --- /dev/null +++ b/keyboards/sofle/keymaps/wonderbeat/oled.c @@ -0,0 +1,232 @@ + /* Copyright 2020 Josef Adamcik + * Modification for VIA support and RGB underglow by Jens Bonk-Wiltfang + * + * 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 . + */ + +//Sets up what the OLED screens display. + +#ifdef OLED_ENABLE + +/* KEYBOARD PET START */ + +/* settings */ +# define MIN_WALK_SPEED 10 +# define MIN_RUN_SPEED 40 + +/* advanced settings */ +# define ANIM_FRAME_DURATION 400 // how long each frame lasts in ms +# define ANIM_SIZE 96 // number of bytes in array. If you change sprites, minimize for adequate firmware size. max is 1024 + +/* timers */ +uint32_t anim_timer = 0; +uint32_t anim_sleep = 0; + +/* current frame */ +uint8_t current_frame = 0; + +/* status variables */ +int current_wpm = 0; +led_t led_usb_state; + +bool isSneaking = false; +bool isJumping = false; +bool showedJump = true; + + +/* logic */ +static void render_luna(int LUNA_X, int LUNA_Y) { + /* Sit */ + static const char PROGMEM sit[2][ANIM_SIZE] = {/* 'sit1', 32x22px */ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x68, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28, 0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }, + + /* 'sit2', 32x22px */ + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x90, 0x08, 0x18, 0x60, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0e, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28, 0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}; + + /* Walk */ + static const char PROGMEM walk[2][ANIM_SIZE] = {/* 'walk1', 32x22px */ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x90, 0x90, 0x90, 0xa0, 0xc0, 0x80, 0x80, 0x80, 0x70, 0x08, 0x14, 0x08, 0x90, 0x10, 0x10, 0x08, 0xa4, 0x78, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x18, 0xea, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x20, 0x20, 0x3c, 0x0f, 0x11, 0x1f, 0x03, 0x06, 0x18, 0x20, 0x20, 0x3c, 0x0c, 0x12, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }, + + /* 'walk2', 32x22px */ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x20, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x28, 0x10, 0x20, 0x20, 0x20, 0x10, 0x48, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x20, 0xf8, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x30, 0xd5, 0x20, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x30, 0x0c, 0x02, 0x05, 0x09, 0x12, 0x1e, 0x02, 0x1c, 0x14, 0x08, 0x10, 0x20, 0x2c, 0x32, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }}; + + /* Run */ + static const char PROGMEM run[2][ANIM_SIZE] = {/* 'run1', 32x22px */ + { + 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x08, 0xc8, 0xb0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0xc4, 0xa4, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x58, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x09, 0x04, 0x04, 0x04, 0x04, 0x02, 0x03, 0x02, 0x01, 0x01, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, + }, + + /* 'run2', 32x22px */ + { + 0x00, 0x00, 0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x78, 0x28, 0x08, 0x10, 0x20, 0x30, 0x08, 0x10, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x10, 0xb0, 0x50, 0x55, 0x20, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x1e, 0x20, 0x20, 0x18, 0x0c, 0x14, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }}; + + /* Bark */ + static const char PROGMEM bark[2][ANIM_SIZE] = {/* 'bark1', 32x22px */ + { + 0x00, 0xc0, 0x20, 0x10, 0xd0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }, + + /* 'bark2', 32x22px */ + { + 0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x2c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x20, 0x4a, 0x09, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }}; + + /* Sneak */ + static const char PROGMEM sneak[2][ANIM_SIZE] = {/* 'sneak1', 32x22px */ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x40, 0x40, 0x80, 0x00, 0x80, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x21, 0xf0, 0x04, 0x02, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x04, 0x04, 0x04, 0x03, 0x01, 0x00, 0x00, 0x09, 0x01, 0x80, 0x80, 0xab, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x20, 0x20, 0x3c, 0x0f, 0x11, 0x1f, 0x02, 0x06, 0x18, 0x20, 0x20, 0x38, 0x08, 0x10, 0x18, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, + }, + + /* 'sneak2', 32x22px */ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xa0, 0x20, 0x40, 0x80, 0xc0, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x41, 0xf0, 0x04, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x02, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x40, 0x40, 0x55, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x30, 0x0c, 0x02, 0x05, 0x09, 0x12, 0x1e, 0x04, 0x18, 0x10, 0x08, 0x10, 0x20, 0x28, 0x34, 0x06, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + }}; + + /* animation */ + void animate_luna(void) { + + /* jump */ + if (isJumping || !showedJump) { + /* clear */ + oled_set_cursor(LUNA_X, LUNA_Y + 2); + oled_write(" ", false); + + oled_set_cursor(LUNA_X, LUNA_Y - 1); + + showedJump = true; + } else { + /* clear */ + oled_set_cursor(LUNA_X, LUNA_Y - 1); + oled_write(" ", false); + + oled_set_cursor(LUNA_X, LUNA_Y); + } + + /* switch frame */ + current_frame = (current_frame + 1) % 2; + + /* current status */ + if (led_usb_state.caps_lock) { + oled_write_raw_P(bark[abs(1 - current_frame)], ANIM_SIZE); + + } else if (isSneaking) { + oled_write_raw_P(sneak[abs(1 - current_frame)], ANIM_SIZE); + + } else if (current_wpm <= MIN_WALK_SPEED) { + oled_write_raw_P(sit[abs(1 - current_frame)], ANIM_SIZE); + + } else if (current_wpm <= MIN_RUN_SPEED) { + oled_write_raw_P(walk[abs(1 - current_frame)], ANIM_SIZE); + + } else { + oled_write_raw_P(run[abs(1 - current_frame)], ANIM_SIZE); + } + } + + /* animation timer */ + if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + anim_timer = timer_read32(); + animate_luna(); + } + +} + + + + + +static void render_logo(void) { + static const char PROGMEM qmk_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(qmk_logo, false); +} + +static void print_status_narrow(void) { + /* this fixes the screen on and off bug */ + if (current_wpm > 0) { + oled_on(); + anim_sleep = timer_read32(); + } else if (timer_elapsed32(anim_sleep) > OLED_TIMEOUT) { + oled_off(); + return; + } + + // Print current mode + oled_write_P(PSTR("\n\n"), false); + + switch (get_highest_layer(layer_state)) { + case 0: + oled_write_ln_P(PSTR("Qwrt"), false); + break; + case 1: + oled_write_ln_P(PSTR("Clmk"), false); + break; + default: + oled_write_P(PSTR("Mod\n"), false); + break; + } + oled_write_P(PSTR("\n\n"), false); + // Print current layer + oled_write_ln_P(PSTR("LAYER"), false); + switch (get_highest_layer(layer_state)) { + case 0: + case 1: + oled_write_P(PSTR("Base\n"), false); + break; + case 2: + oled_write_P(PSTR("Raise"), false); + break; + case 3: + oled_write_P(PSTR("Lower"), false); + break; + default: + oled_write_ln_P(PSTR("Undef"), false); + } + oled_write_P(PSTR("\n\n"), false); + led_t led_usb_state = host_keyboard_led_state(); + oled_write_ln_P(PSTR("CPSLK"), led_usb_state.caps_lock); + render_luna(0, 13); +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (is_keyboard_master()) { + return OLED_ROTATION_270; + } + return rotation; +} + +bool oled_task_user(void) { + current_wpm = get_current_wpm(); + led_usb_state = host_keyboard_led_state(); + + if (is_keyboard_master()) { + print_status_narrow(); + } else { + render_logo(); + } + return true; +} + +#endif diff --git a/keyboards/sofle/keymaps/wonderbeat/rules.mk b/keyboards/sofle/keymaps/wonderbeat/rules.mk new file mode 100644 index 000000000000..803d7f542d6f --- /dev/null +++ b/keyboards/sofle/keymaps/wonderbeat/rules.mk @@ -0,0 +1,7 @@ +CONSOLE_ENABLE = no +VIA_ENABLE = no +WPM_ENABLE = yes +OLED_DRIVER = SSD1306 +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 +TAP_DANCE_ENABLE = yes From 059651319708246259b083cc1264f52b4dc41eb7 Mon Sep 17 00:00:00 2001 From: denisg Date: Sat, 16 Jul 2022 19:21:42 +0300 Subject: [PATCH 02/11] shift-pipe, media button --- .envrc | 1 + keyboards/sofle/keymaps/wonderbeat/config.h | 5 +- keyboards/sofle/keymaps/wonderbeat/keymap.c | 59 +++++++++++---------- 3 files changed, 35 insertions(+), 30 deletions(-) create mode 100644 .envrc diff --git a/.envrc b/.envrc new file mode 100644 index 000000000000..051d09d292a8 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +eval "$(lorri direnv)" diff --git a/keyboards/sofle/keymaps/wonderbeat/config.h b/keyboards/sofle/keymaps/wonderbeat/config.h index 6aefdea1c5c3..778632573113 100644 --- a/keyboards/sofle/keymaps/wonderbeat/config.h +++ b/keyboards/sofle/keymaps/wonderbeat/config.h @@ -41,7 +41,7 @@ for more options. #ifdef RGB_MATRIX_ENABLE #define RGB_DI_PIN D3 -#define DRIVER_LED_TOTAL RGBLED_NUM +#define DRIVER_LED_TOTAL 74 #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 80 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. /* #define RGB_MATRIX_HUE_STEP 8 */ @@ -50,7 +50,8 @@ for more options. /* #define RGB_MATRIX_SPD_STEP 10 */ #define RGB_MATRIX_KEYPRESSES /* #define RGB_MATRIX_FRAMEBUFFER_EFFECTS */ -#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +/* #define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON */ #define ENABLE_RGB_MATRIX_SOLID_SPLASH #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS #define ENABLE_RGB_MATRIX_MULTISPLASH diff --git a/keyboards/sofle/keymaps/wonderbeat/keymap.c b/keyboards/sofle/keymaps/wonderbeat/keymap.c index 4d5c3b2022bb..ac2ddae67431 100644 --- a/keyboards/sofle/keymaps/wonderbeat/keymap.c +++ b/keyboards/sofle/keymaps/wonderbeat/keymap.c @@ -21,14 +21,20 @@ //Tap Dance Declarations enum { - TD_QUOT_LBRC = 0, - TD_UNDS_RBRC + TD_UNDS_PIPE = 0, + TD_LCBR_LBRC, + TD_RCBR_RBRC, + TD_NEXT_PLAY, + SLSH_BSLS }; //Tap Dance Definitions qk_tap_dance_action_t tap_dance_actions[] = { - [TD_UNDS_RBRC] = ACTION_TAP_DANCE_DOUBLE(KC_UNDS, KC_RBRC), - [TD_QUOT_LBRC] = ACTION_TAP_DANCE_DOUBLE(KC_QUOT, KC_LBRC) + [TD_UNDS_PIPE] = ACTION_TAP_DANCE_DOUBLE(KC_UNDS, KC_PIPE), + [TD_LCBR_LBRC] = ACTION_TAP_DANCE_DOUBLE(KC_LCBR, KC_LBRC), + [TD_RCBR_RBRC] = ACTION_TAP_DANCE_DOUBLE(KC_RCBR, KC_RBRC), + [TD_NEXT_PLAY] = ACTION_TAP_DANCE_DOUBLE(KC_MNXT, KC_MPLY), + [SLSH_BSLS] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_BSLS) }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -37,9 +43,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------. ,-----------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | ESC | Q | W | E | R | T | | Y | U | I | O | P | Bspc | + * | ESC | Q | W | E | R | T | | Y | U | I | O | P | ' | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Tab | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' | + * | Tab | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | Bspc | * |------+------+------+------+------+------| | | |------+------+------+------+------+------| * |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / |RShift| * `-----------------------------------------/ / \ \-----------------------------------------' @@ -49,33 +55,33 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [0] = LAYOUT( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, - KC_ESC, LSFT_T(KC_A), LCTL_T(KC_S), LALT_T(KC_D), KC_F, KC_G, KC_H, KC_J, LALT_T(KC_K), LCTL_T(KC_L), LSFT_T(KC_SCLN), KC_BSPC, - TD(TD_QUOT_LBRC), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, TG(1), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, TD(TD_UNDS_RBRC), - KC_LCTRL,KC_LALT,MO(2),KC_LGUI, KC_ENT, KC_SPC, KC_RGUI, MO(3), KC_RALT, KC_RCTRL + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, /**/ KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, /**/ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, + KC_ESC, LSFT_T(KC_A), LCTL_T(KC_S), LALT_T(KC_D), KC_F, KC_G, /**/ KC_H, KC_J, LALT_T(KC_K), LCTL_T(KC_L), LSFT_T(KC_SCLN), KC_BSPC, + TD(SLSH_BSLS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, /**/ TG(1), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, TD(TD_UNDS_PIPE), + TD(TD_LCBR_LBRC),TD(TD_RCBR_RBRC),MO(2),KC_LGUI, KC_ENT, /**/ KC_SPC, KC_RGUI, MO(3), KC_RALT, TD(TD_NEXT_PLAY) ), /* - * COLEMAK + * COLEMAK-DH * ,-----------------------------------------. ,-----------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | ESC | Q | W | F | P | G | | J | L | U | Y | ; | Bspc | + * | ESC | Q | W | F | P | B | | J | L | U | Y | ; | Bspc | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | TAB | A | R | S | T | D |-------. ,-------| H | N | E | I | O | ' | + * | TAB | A | R | S | T | G |-------. ,-------| M | N | E | I | O | ' | * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------| - * |LShift| Z | X | C | V | B |-------| |-------| K | M | , | . | / |RShift| + * |LShift| Z | X | C | D | V |-------| |-------| K | H | , | . | / |RShift| * `-----------------------------------------/ / \ \-----------------------------------------' * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI | * | | | | |/ / \ \ | | | | | * `----------------------------------' '------''---------------------------' */ [1] = LAYOUT( - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, - _______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______, - _______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, _______, - _______, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______,KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, - _______,_______,_______,_______, _______, _______,_______,_______,_______, _______ + _______, KC_1, KC_2, KC_3, KC_4, KC_5, /**/ KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, KC_Q, KC_W, KC_F, KC_P, KC_B, /**/ KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______, + _______, KC_A, LSFT_T(KC_R), LCTL_T(KC_S), LALT_T(KC_T), /**/ KC_G, KC_M, KC_N, LALT_T(KC_E), LCTL_T(KC_I), LSFT_T(KC_O), _______, + _______, KC_Z, KC_X, KC_C, KC_D, KC_V, _______, /**/ _______, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, _______, + _______,_______,_______,_______, _______, /**/ _______,_______,_______,_______, _______ ), /* LOWER * ,-----------------------------------------. ,-----------------------------------------. @@ -200,25 +206,22 @@ void keyboard_post_init_rgb_light(void) { /* rgblight_setrgb(RGB_ORANGE); */ rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 1); #endif -/* #ifdef RGB_MATRIX_ENABLE */ -/* rgb_matrix_mode(RGB_MATRIX_RAINBOW_MOVING_CHEVRON); */ -/* #endif */ } #ifdef RGB_MATRIX_ENABLE layer_state_t layer_state_set_user(layer_state_t state) { switch (get_highest_layer(state)) { case 0: - rgb_matrix_mode(RGB_MATRIX_RAINBOW_MOVING_CHEVRON); - break; - case 1: - rgb_matrix_mode(RGB_MATRIX_JELLYBEAN_RAINDROPS); + rgb_matrix_mode(RGB_MATRIX_CYCLE_LEFT_RIGHT); break; + /* case 1: */ + /* rgb_matrix_mode(RGB_MATRIX_JELLYBEAN_RAINDROPS); */ + /* break; */ case 2: rgb_matrix_mode(RGB_MATRIX_SOLID_SPLASH); break; default: // for any other layers, or the default layer - rgb_matrix_mode(RGB_MATRIX_RAINBOW_MOVING_CHEVRON); + rgb_matrix_mode(RGB_MATRIX_CYCLE_LEFT_RIGHT); break; } return state; From 83788d273f00fd02475da29931c755939ea78813 Mon Sep 17 00:00:00 2001 From: denisg Date: Sat, 16 Jul 2022 20:44:07 +0300 Subject: [PATCH 03/11] Custom logo --- keyboards/sofle/keymaps/wonderbeat/config.h | 6 ++++++ keyboards/sofle/keymaps/wonderbeat/glcdfont.c | 10 ++++++++++ keyboards/sofle/keymaps/wonderbeat/oled.c | 8 +++----- 3 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 keyboards/sofle/keymaps/wonderbeat/glcdfont.c diff --git a/keyboards/sofle/keymaps/wonderbeat/config.h b/keyboards/sofle/keymaps/wonderbeat/config.h index 778632573113..a0758dbd8fd3 100644 --- a/keyboards/sofle/keymaps/wonderbeat/config.h +++ b/keyboards/sofle/keymaps/wonderbeat/config.h @@ -60,3 +60,9 @@ for more options. /* #define SPLIT_TRANSPORT_MIRROR */ #endif + +#if defined(OLED_FONT_H) +# undef OLED_FONT_H +#endif + +#define OLED_FONT_H "keyboards/sofle/keymaps/wonderbeat/glcdfont.c" diff --git a/keyboards/sofle/keymaps/wonderbeat/glcdfont.c b/keyboards/sofle/keymaps/wonderbeat/glcdfont.c new file mode 100644 index 000000000000..7f28fdf4d3a4 --- /dev/null +++ b/keyboards/sofle/keymaps/wonderbeat/glcdfont.c @@ -0,0 +1,10 @@ +#include "progmem.h" + + +// clang-format off +const unsigned char font[] PROGMEM = { +0,0,0,0,0,0,62,91,79,91,62,0,62,107,79,107,62,0,28,62,124,62,28,0,24,60,126,60,24,0,28,87,125,87,28,0,28,94,127,94,28,0,0,24,60,24,0,0,255,231,195,231,255,0,0,24,36,24,0,0,255,231,219,231,255,0,48,72,58,6,14,0,38,41,121,41,38,0,64,127,5,5,7,0,64,127,5,37,63,0,90,60,231,60,90,0,127,62,28,28,8,0,8,28,28,62,127,0,20,34,127,34,20,0,95,95,0,95,95,0,6,9,127,1,127,0,0,102,137,149,106,0,96,96,96,96,96,0,148,162,255,162,148,0,8,4,126,4,8,0,16,32,126,32,16,0,8,8,42,28,8,0,8,28,42,8,8,0,30,16,16,16,16,0,12,30,12,30,12,0,48,56,62,56,48,0,6,14,62,14,6,0,0,0,0,0,0,0,0,0,95,0,0,0,0,7,0,7,0,0,20,127,20,127,20,0,36,42,127,42,18,0,35,19,8,100,98,0,54,73,86,32,80,0,0,8,7,3,0,0,0,28,34,65,0,0,0,65,34,28,0,0,42,28,127,28,42,0,8,8,62,8,8,0,0,128,112,48,0,0,8,8,8,8,8,0,0,0,96,96,0,0,32,16,8,4,2,0,62,81,73,69,62,0,0,66,127,64,0,0,114,73,73,73,70,0,33,65,73,77,51,0,24,20,18,127,16,0,39,69,69,69,57,0,60,74,73,73,49,0,65,33,17,9,7,0,54,73,73,73,54,0,70,73,73,41,30,0,0,0,20,0,0,0,0,64,52,0,0,0,0,8,20,34,65,0,20,20,20,20,20,0,0,65,34,20,8,0,2,1,89,9,6,0,62,65,93,89,78,0,124,18,17,18,124,0,127,73,73,73,54,0,62,65,65,65,34,0,127,65,65,65,62,0,127,73,73,73,65,0,127,9,9,9,1,0,62,65,65,81,115,0,127,8,8,8,127,0,0,65,127,65,0,0,32,64,65,63,1,0,127,8,20,34,65,0,127,64,64,64,64,0,127,2,28,2,127,0,127,4,8,16,127,0,62,65,65,65,62,0,127,9,9,9,6,0,62,65,81,33,94,0,127,9,25,41,70,0,38,73,73,73,50,0,3,1,127,1,3,0,63,64,64,64,63,0,31,32,64,32,31,0,63,64,56,64,63,0,99,20,8,20,99,0,3,4,120,4,3,0,97,89,73,77,67,0,0,127,65,65,65,0,2,4,8,16,32,0,0,65,65,65,127,0,4,2,1,2,4,0,64,64,64,64,64,0,0,3,7,8,0,0,32,84,84,120,64,0,127,40,68,68,56,0,56,68,68,68,40,0,56,68,68,40,127,0,56,84,84,84,24,0,0,8,126,9,2,0,24,36,36,28,120,0,127,8,4,4,120,0,0,68,125,64,0,0,32,64,64,61,0,0,127,16,40,68,0,0,0,65,127,64,0,0,124,4,120,4,120,0,124,8,4,4,120,0,56,68,68,68,56,0,124,24,36,36,24,0,24,36,36,24,124,0,124,8,4,4,8,0,72,84,84,84,36,0,4,4,63,68,36,0,60,64,64,32,124,0,28,32,64,32,28,0,60,64,48,64,60,0,68,40,16,40,68,0,76,144,144,144,124,0,68,100,84,76,68,0,0,8,54,65,0,0,0,0,119,0,0,0,0,65,54,8,0,0,2,1,2,4,2,0,60,38,35,38,60,0,0,0,0,192,192,192,0,0,0,0,128,192,192,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,240,240,240,224,236,238,247,243,112,32,0,124,124,124,126,0,126,126,126,127,127,127,0,0,128,192,224,126,91,79,91,254,192,0,0,192,0,220,215,222,222,222,215,220,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,7,15,254,252,255,7,35,252,254,142,6,6,6,254,252,248,0,254,254,128,0,0,0,254,254,254,0,0,254,254,254,6,6,6,0,0,0,0,0,0,254,254,254,6,6,6,254,252,254,6,6,6,254,254,240,0,32,252,254,142,6,6,6,254,252,248,0,254,254,254,6,6,6,254,252,254,6,6,6,254,254,240,0,0,0,0,0,0,0,252,254,6,6,6,6,254,254,254,0,0,226,242,50,50,22,150,254,252,0,2,30,126,248,192,192,248,254,30,2,0,0,15,31,63,127,127,127,127,127,63,30,12,0,31,31,31,63,0,63,63,63,127,127,127,0,48,123,127,120,48,32,32,48,120,127,59,0,3,0,15,127,15,15,15,127,15,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,0,0,1,3,3,3,3,3,3,1,0,0,1,3,3,3,3,3,3,3,3,0,0,3,3,3,0,0,0,0,0,0,0,0,0,3,3,3,0,0,0,3,3,3,0,0,0,3,3,3,0,0,1,3,3,3,3,3,3,1,0,0,3,3,3,0,0,0,3,3,3,0,0,0,3,3,3,0,0,0,0,0,0,0,1,51,51,35,51,51,63,31,7,0,0,1,3,3,3,3,3,3,3,0,0,32,32,57,63,31,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + + +}; diff --git a/keyboards/sofle/keymaps/wonderbeat/oled.c b/keyboards/sofle/keymaps/wonderbeat/oled.c index 3a28ab12a0a7..3c5903ec2453 100644 --- a/keyboards/sofle/keymaps/wonderbeat/oled.c +++ b/keyboards/sofle/keymaps/wonderbeat/oled.c @@ -181,15 +181,13 @@ static void print_status_narrow(void) { oled_write_ln_P(PSTR("Qwrt"), false); break; case 1: - oled_write_ln_P(PSTR("Clmk"), false); + oled_write_ln_P(PSTR("ClmkDH"), false); break; default: - oled_write_P(PSTR("Mod\n"), false); break; } - oled_write_P(PSTR("\n\n"), false); + oled_write_P(PSTR("\n"), false); // Print current layer - oled_write_ln_P(PSTR("LAYER"), false); switch (get_highest_layer(layer_state)) { case 0: case 1: @@ -202,7 +200,7 @@ static void print_status_narrow(void) { oled_write_P(PSTR("Lower"), false); break; default: - oled_write_ln_P(PSTR("Undef"), false); + oled_write_ln_P(PSTR("undef"), false); } oled_write_P(PSTR("\n\n"), false); led_t led_usb_state = host_keyboard_led_state(); From c74ca204a2d25948baeca172d7c25189a3bfb576 Mon Sep 17 00:00:00 2001 From: dgolovachev Date: Sun, 12 Mar 2023 17:54:50 +0300 Subject: [PATCH 04/11] NIV updated --- lib/chibios | 2 +- lib/chibios-contrib | 2 +- lib/lufa | 2 +- lib/printf | 2 +- lib/vusb | 2 +- util/nix/sources.json | 12 ++++++------ 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/chibios b/lib/chibios index 0062927e3058..257302333c31 160000 --- a/lib/chibios +++ b/lib/chibios @@ -1 +1 @@ -Subproject commit 0062927e3058a8b5ef587234bbd98d42fb4e595e +Subproject commit 257302333c31f1f710800c2b97acf3550de043e1 diff --git a/lib/chibios-contrib b/lib/chibios-contrib index a224be155ae1..2a6b73ff51ba 160000 --- a/lib/chibios-contrib +++ b/lib/chibios-contrib @@ -1 +1 @@ -Subproject commit a224be155ae18d38deccf33a6c1d259b9a5ad8d3 +Subproject commit 2a6b73ff51baf89083a220b6692a04ca2cae8750 diff --git a/lib/lufa b/lib/lufa index 549b97320d51..19a5d533f02a 160000 --- a/lib/lufa +++ b/lib/lufa @@ -1 +1 @@ -Subproject commit 549b97320d515bfca2f95c145a67bd13be968faa +Subproject commit 19a5d533f02a7b46eeadca99cc9699659cef7a60 diff --git a/lib/printf b/lib/printf index c2e3b4e10d28..d3b984684bb8 160000 --- a/lib/printf +++ b/lib/printf @@ -1 +1 @@ -Subproject commit c2e3b4e10d281e7f0f694d3ecbd9f320977288cc +Subproject commit d3b984684bb8a8bdc48cc7a1abecb93ce59bbe3e diff --git a/lib/vusb b/lib/vusb index 819dbc1e5d59..bdb53e4c043d 160000 --- a/lib/vusb +++ b/lib/vusb @@ -1 +1 @@ -Subproject commit 819dbc1e5d5926b17e27e00ca6d3d2988adae04e +Subproject commit bdb53e4c043d089279d9891b68bea77614cb97ee diff --git a/util/nix/sources.json b/util/nix/sources.json index 8cdb9e499680..5e06c30d0702 100644 --- a/util/nix/sources.json +++ b/util/nix/sources.json @@ -5,10 +5,10 @@ "homepage": "https://github.com/nmattia/niv", "owner": "nmattia", "repo": "niv", - "rev": "af958e8057f345ee1aca714c1247ef3ba1c15f5e", - "sha256": "1qjavxabbrsh73yck5dcq8jggvh3r2jkbr6b5nlz5d9yrqm9255n", + "rev": "82e5cd1ad3c387863f0545d7591512e76ab0fc41", + "sha256": "090l219mzc0gi33i3psgph6s2pwsc8qy4lyrqjdj4qzkvmaj65a7", "type": "tarball", - "url": "https://github.com/nmattia/niv/archive/af958e8057f345ee1aca714c1247ef3ba1c15f5e.tar.gz", + "url": "https://github.com/nmattia/niv/archive/82e5cd1ad3c387863f0545d7591512e76ab0fc41.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "nixpkgs": { @@ -17,10 +17,10 @@ "homepage": "", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c0e881852006b132236cbf0301bd1939bb50867e", - "sha256": "0fy7z7yxk5n7yslsvx5cyc6h21qwi4bhxf3awhirniszlbvaazy2", + "rev": "3802c98cffe636d54dc8f2812d143e50b4b07bb0", + "sha256": "1037fc5b2gzir41snkfga88znpn4zbpwzzccy5cx082v8qdcvcdq", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/c0e881852006b132236cbf0301bd1939bb50867e.tar.gz", + "url": "https://github.com/NixOS/nixpkgs/archive/3802c98cffe636d54dc8f2812d143e50b4b07bb0.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "poetry2nix": { From 1ceb340ae5b8f6d365923bdd047951c3682f7d84 Mon Sep 17 00:00:00 2001 From: denisg Date: Sat, 13 Aug 2022 21:09:02 +0300 Subject: [PATCH 05/11] HSV RGB --- keyboards/sofle/keymaps/wonderbeat/config.h | 115 +++--- keyboards/sofle/keymaps/wonderbeat/keymap.c | 400 +++++++++---------- keyboards/sofle/keymaps/wonderbeat/oled.c | 410 ++++++++++---------- 3 files changed, 452 insertions(+), 473 deletions(-) diff --git a/keyboards/sofle/keymaps/wonderbeat/config.h b/keyboards/sofle/keymaps/wonderbeat/config.h index a0758dbd8fd3..18d74b703495 100644 --- a/keyboards/sofle/keymaps/wonderbeat/config.h +++ b/keyboards/sofle/keymaps/wonderbeat/config.h @@ -1,68 +1,69 @@ /* Copyright 2020 Josef Adamcik * Modification for VIA support and RGB underglow by Jens Bonk-Wiltfang - * - * 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 . - */ + * + * 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 + #pragma once -/* The way how "handedness" is decided (which half is which), -see https://docs.qmk.fm/#/feature_split_keyboard?id=setting-handedness -for more options. -*/ + /* The way how "handedness" is decided (which half is which), + see https://docs.qmk.fm/#/feature_split_keyboard?id=setting-handedness + for more options. + */ -#define EE_HANDS + #define EE_HANDS -#ifdef RGBLIGHT_ENABLE -#define RGBLIGHT_ANIMATIONS -/* #define RGB_LIGHT_EFFECT_BREATHE_MAX 200 */ -/* #define RGBLIGHT_RAINBOW_SWIRL_RANGE 127 */ -/* #define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_RAINBOW_MOOD */ -/* #define RGBLIGHT_DEFAULT_HUE 205 */ -/* #define RGBLIGHT_EFFECT_RAINBOW_MOOD */ -#define RGBLIGHT_DEFAULT_SPD 10 -#endif + #ifdef RGBLIGHT_ENABLE + # define RGBLIGHT_ANIMATIONS + /* #define RGB_LIGHT_EFFECT_BREATHE_MAX 200 */ + /* #define RGBLIGHT_RAINBOW_SWIRL_RANGE 127 */ + /* #define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_RAINBOW_MOOD */ + /* #define RGBLIGHT_DEFAULT_HUE 205 */ + /* #define RGBLIGHT_EFFECT_RAINBOW_MOOD */ + # define RGBLIGHT_DEFAULT_SPD 10 + #endif -#define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT -#define PERMISSIVE_HOLD + #define TAPPING_TERM 200 + #define IGNORE_MOD_TAP_INTERRUPT + #define PERMISSIVE_HOLD + #ifdef RGB_MATRIX_ENABLE + # define RGB_DI_PIN D3 + # define DRIVER_LED_TOTAL 74 + # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended + # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 80 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. + /* #define RGB_MATRIX_HUE_STEP 8 */ + /* #define RGB_MATRIX_SAT_STEP 8 */ + /* #define RGB_MATRIX_VAL_STEP 8 */ + /* #define RGB_MATRIX_SPD_STEP 10 */ + # define RGB_MATRIX_KEYPRESSES + /* #define RGB_MATRIX_FRAMEBUFFER_EFFECTS */ + /* # define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT */ + /* #define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON */ + # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + # define ENABLE_RGB_MATRIX_PIXEL_FRACTAL + # define LUNA + /* # define ENABLE_RGB_MATRIX_MULTISPLASH */ + /* #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_RAINDROPS */ + # define RGB_MATRIX_SPLIT \ + { 37, 37 } + /* #define SPLIT_TRANSPORT_MIRROR */ -#ifdef RGB_MATRIX_ENABLE -#define RGB_DI_PIN D3 -#define DRIVER_LED_TOTAL 74 -#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended -#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 80 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. -/* #define RGB_MATRIX_HUE_STEP 8 */ -/* #define RGB_MATRIX_SAT_STEP 8 */ -/* #define RGB_MATRIX_VAL_STEP 8 */ -/* #define RGB_MATRIX_SPD_STEP 10 */ -#define RGB_MATRIX_KEYPRESSES -/* #define RGB_MATRIX_FRAMEBUFFER_EFFECTS */ -#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -/* #define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON */ -#define ENABLE_RGB_MATRIX_SOLID_SPLASH -#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -#define ENABLE_RGB_MATRIX_MULTISPLASH -/* #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_RAINDROPS */ -#define RGB_MATRIX_SPLIT {37,37} -/* #define SPLIT_TRANSPORT_MIRROR */ + #endif -#endif + #if defined(OLED_FONT_H) + # undef OLED_FONT_H + #endif -#if defined(OLED_FONT_H) -# undef OLED_FONT_H -#endif - -#define OLED_FONT_H "keyboards/sofle/keymaps/wonderbeat/glcdfont.c" + #define OLED_FONT_H "keyboards/sofle/keymaps/wonderbeat/glcdfont.c" diff --git a/keyboards/sofle/keymaps/wonderbeat/keymap.c b/keyboards/sofle/keymaps/wonderbeat/keymap.c index ac2ddae67431..5cf264bed561 100644 --- a/keyboards/sofle/keymaps/wonderbeat/keymap.c +++ b/keyboards/sofle/keymaps/wonderbeat/keymap.c @@ -15,219 +15,207 @@ * along with this program. If not, see . */ -#include QMK_KEYBOARD_H -#include "oled.c" -#include "encoder.c" + #include QMK_KEYBOARD_H + #include "oled.c" + #include "encoder.c" -//Tap Dance Declarations -enum { - TD_UNDS_PIPE = 0, - TD_LCBR_LBRC, - TD_RCBR_RBRC, - TD_NEXT_PLAY, - SLSH_BSLS -}; + // Tap Dance Declarations + enum { TD_UNDS_PIPE = 0, TD_LCBR_LBRC, TD_RCBR_RBRC, TD_NEXT_PLAY, SLSH_BSLS }; -//Tap Dance Definitions -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_UNDS_PIPE] = ACTION_TAP_DANCE_DOUBLE(KC_UNDS, KC_PIPE), - [TD_LCBR_LBRC] = ACTION_TAP_DANCE_DOUBLE(KC_LCBR, KC_LBRC), - [TD_RCBR_RBRC] = ACTION_TAP_DANCE_DOUBLE(KC_RCBR, KC_RBRC), - [TD_NEXT_PLAY] = ACTION_TAP_DANCE_DOUBLE(KC_MNXT, KC_MPLY), - [SLSH_BSLS] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_BSLS) -}; + // Tap Dance Definitions + qk_tap_dance_action_t tap_dance_actions[] = {[TD_UNDS_PIPE] = ACTION_TAP_DANCE_DOUBLE(KC_UNDS, KC_PIPE), [TD_LCBR_LBRC] = ACTION_TAP_DANCE_DOUBLE(KC_LCBR, KC_LBRC), [TD_RCBR_RBRC] = ACTION_TAP_DANCE_DOUBLE(KC_RCBR, KC_RBRC), [TD_NEXT_PLAY] = ACTION_TAP_DANCE_DOUBLE(KC_MNXT, KC_MPLY), [SLSH_BSLS] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_BSLS)}; -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* - * QWERTY - * ,-----------------------------------------. ,-----------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | ESC | Q | W | E | R | T | | Y | U | I | O | P | ' | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Tab | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | Bspc | - * |------+------+------+------+------+------| | | |------+------+------+------+------+------| - * |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / |RShift| - * `-----------------------------------------/ / \ \-----------------------------------------' - * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI | - * | | | | |/ / \ \ | | | | | - * `----------------------------------' '------''---------------------------' - */ + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * QWERTY + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ESC | Q | W | E | R | T | | Y | U | I | O | P | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | Bspc | + * |------+------+------+------+------+------| | | |------+------+------+------+------+------| + * |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / |RShift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI | + * | | | | |/ / \ \ | | | | | + * `----------------------------------' '------''---------------------------' + */ -[0] = LAYOUT( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, /**/ KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, /**/ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, - KC_ESC, LSFT_T(KC_A), LCTL_T(KC_S), LALT_T(KC_D), KC_F, KC_G, /**/ KC_H, KC_J, LALT_T(KC_K), LCTL_T(KC_L), LSFT_T(KC_SCLN), KC_BSPC, - TD(SLSH_BSLS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, /**/ TG(1), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, TD(TD_UNDS_PIPE), - TD(TD_LCBR_LBRC),TD(TD_RCBR_RBRC),MO(2),KC_LGUI, KC_ENT, /**/ KC_SPC, KC_RGUI, MO(3), KC_RALT, TD(TD_NEXT_PLAY) -), -/* - * COLEMAK-DH - * ,-----------------------------------------. ,-----------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | ESC | Q | W | F | P | B | | J | L | U | Y | ; | Bspc | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | TAB | A | R | S | T | G |-------. ,-------| M | N | E | I | O | ' | - * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------| - * |LShift| Z | X | C | D | V |-------| |-------| K | H | , | . | / |RShift| - * `-----------------------------------------/ / \ \-----------------------------------------' - * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI | - * | | | | |/ / \ \ | | | | | - * `----------------------------------' '------''---------------------------' - */ -[1] = LAYOUT( - _______, KC_1, KC_2, KC_3, KC_4, KC_5, /**/ KC_6, KC_7, KC_8, KC_9, KC_0, _______, - _______, KC_Q, KC_W, KC_F, KC_P, KC_B, /**/ KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______, - _______, KC_A, LSFT_T(KC_R), LCTL_T(KC_S), LALT_T(KC_T), /**/ KC_G, KC_M, KC_N, LALT_T(KC_E), LCTL_T(KC_I), LSFT_T(KC_O), _______, - _______, KC_Z, KC_X, KC_C, KC_D, KC_V, _______, /**/ _______, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, _______, - _______,_______,_______,_______, _______, /**/ _______,_______,_______,_______, _______ -), -/* LOWER - * ,-----------------------------------------. ,-----------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | F12 | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Tab | ! | @ | # | $ | % |-------. ,-------| ^ | & | * | ( | ) | | | - * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------| - * | Shift| = | - | + | { | } |-------| |-------| [ | ] | ; | : | \ | Shift| - * `-----------------------------------------/ / \ \-----------------------------------------' - * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI | - * | | | | |/ / \ \ | | | | | - * `----------------------------------' '------''---------------------------' - */ -[2] = LAYOUT( - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F12, - _______, KC_EQL, KC_MINS, KC_PLUS, KC_LCBR, KC_RCBR, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, - _______, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), -/* RAISE - * ,----------------------------------------. ,-----------------------------------------. - * | | | | | | | | | | | | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Esc | Ins | Pscr | Menu | | | | | PWrd | Up | NWrd | DLine| Bspc | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Tab | LAt | LCtl |LShift| | Caps |-------. ,-------| | Left | Down | Rigth| Del | Bspc | - * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------| - * |Shift | Undo | Cut | Copy | Paste| |-------| |-------| | LStr | | LEnd | | Shift| - * `-----------------------------------------/ / \ \-----------------------------------------' - * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI | - * | | | | |/ / \ \ | | | | | - * `----------------------------------' '------''---------------------------' - */ -[3] = LAYOUT( - _______, _______ , _______ , _______ , _______ , _______, _______, _______ , _______, _______ , _______ ,_______, - _______, KC_INS, KC_PSCR, KC_APP, XXXXXXX, XXXXXXX, KC_PGUP, _______, KC_UP, _______,_______, KC_BSPC, - _______, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_CAPS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_BSPC, - _______,KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, XXXXXXX, _______, _______, XXXXXXX, _______, XXXXXXX, _______, XXXXXXX, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -) -}; + [0] = LAYOUT(KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, /**/ KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, /**/ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, KC_ESC, LSFT_T(KC_A), LCTL_T(KC_S), LALT_T(KC_D), KC_F, KC_G, /**/ KC_H, KC_J, LALT_T(KC_K), LCTL_T(KC_L), LSFT_T(KC_SCLN), KC_BSPC, TD(SLSH_BSLS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, /**/ TG(1), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, TD(TD_UNDS_PIPE), TD(TD_LCBR_LBRC), TD(TD_RCBR_RBRC), MO(2), KC_LGUI, KC_ENT, /**/ KC_SPC, KC_RGUI, MO(3), KC_RALT, TD(TD_NEXT_PLAY)), + /* + * COLEMAK-DH + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ESC | Q | W | F | P | B | | J | L | U | Y | ; | Bspc | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | TAB | A | R | S | T | G |-------. ,-------| M | N | E | I | O | ' | + * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------| + * |LShift| Z | X | C | D | V |-------| |-------| K | H | , | . | / |RShift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI | + * | | | | |/ / \ \ | | | | | + * `----------------------------------' '------''---------------------------' + */ + [1] = LAYOUT(_______, KC_1, KC_2, KC_3, KC_4, KC_5, /**/ KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, KC_Q, KC_W, KC_F, KC_P, KC_B, /**/ KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______, _______, KC_A, LSFT_T(KC_R), LCTL_T(KC_S), LALT_T(KC_T), /**/ KC_G, KC_M, KC_N, LALT_T(KC_E), LCTL_T(KC_I), LSFT_T(KC_O), _______, _______, KC_Z, KC_X, KC_C, KC_D, KC_V, _______, /**/ _______, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______), + /* LOWER + * ,-----------------------------------------. ,-----------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | ! | @ | # | $ | % |-------. ,-------| ^ | & | * | ( | ) | | | + * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------| + * | Shift| = | - | + | { | } |-------| |-------| [ | ] | ; | : | \ | Shift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI | + * | | | | |/ / \ \ | | | | | + * `----------------------------------' '------''---------------------------' + */ + [2] = LAYOUT(_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F12, _______, KC_EQL, KC_MINS, KC_PLUS, KC_LCBR, KC_RCBR, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, _______, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + /* RAISE + * ,----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc | Ins | Pscr | Menu | | | | | PWrd | Up | NWrd | DLine| Bspc | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | LAt | LCtl |LShift| | Caps |-------. ,-------| | Left | Down | Rigth| Del | Bspc | + * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------| + * |Shift | Undo | Cut | Copy | Paste| |-------| |-------| | LStr | | LEnd | | Shift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI | + * | | | | |/ / \ \ | | | | | + * `----------------------------------' '------''---------------------------' + */ + [3] = LAYOUT(_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_PSCR, KC_APP, XXXXXXX, XXXXXXX, KC_PGUP, _______, KC_UP, _______, _______, KC_BSPC, _______, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_CAPS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_BSPC, _______, KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, XXXXXXX, _______, _______, XXXXXXX, _______, XXXXXXX, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______)}; + #ifdef RGB_MATRIX_ENABLE + // Physical Layout + // Columns + // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 + // ROWS + // 12 13 22 23 32 33 33 32 23 22 13 12 0 + // 02 03 04 04 03 02 + // 11 14 21 24 31 34 34 31 24 21 14 11 1 + // 01 01 + // 10 15 20 25 30 35 35 30 25 20 15 10 2 + // + // 09 16 19 26 29 36 36 29 26 19 16 09 3 + // + // 08 17 18 27 28 28 27 18 17 08 4 + // 07 06 05 05 06 07 -#ifdef RGB_MATRIX_ENABLE - // Physical Layout - // Columns - // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 - // ROWS - // 12 13 22 23 32 33 33 32 23 22 13 12 0 - // 02 03 04 04 03 02 - // 11 14 21 24 31 34 34 31 24 21 14 11 1 - // 01 01 - // 10 15 20 25 30 35 35 30 25 20 15 10 2 - // - // 09 16 19 26 29 36 36 29 26 19 16 09 3 - // - // 08 17 18 27 28 28 27 18 17 08 4 - // 07 06 05 05 06 07 + led_config_t g_led_config = {{{11, 12, 21, 22, 31, 32}, {10, 13, 20, 23, 30, 33}, {9, 14, 19, 24, 29, 34}, {8, 15, 18, 25, 28, 35}, {7, 16, 17, 26, 27, NO_LED}, {47, 48, 57, 58, 67, 68}, {46, 49, 56, 59, 66, 69}, {45, 50, 55, 60, 65, 70}, {44, 51, 54, 61, 64, 71}, {43, 52, 53, 62, 63, NO_LED}}, + { + // Left side underglow + {96, 40}, + {16, 20}, + {48, 10}, + {80, 18}, + {88, 60}, + {56, 57}, + {24, 60}, + // Left side Matrix + {32, 57}, + {0, 48}, + {0, 36}, + {0, 24}, + {0, 12}, + {16, 12}, + {16, 24}, + {16, 36}, + {16, 48}, + {48, 55}, + {64, 57}, + {32, 45}, + {32, 33}, + {32, 21}, + {32, 9}, + {48, 7}, + {48, 19}, + {48, 31}, + {48, 43}, + {80, 59}, + {96, 64}, + {64, 45}, + {64, 33}, + {64, 21}, + {64, 9}, + {80, 10}, + {80, 22}, + {80, 34}, + {80, 47}, -led_config_t g_led_config = { - { - { 11, 12, 21, 22, 31, 32 }, - { 10, 13, 20, 23, 30, 33 }, - { 9, 14, 19, 24, 29, 34}, - { 8, 15, 18, 25, 28, 35}, - { 7, 16, 17, 26, 27, NO_LED }, - { 47, 48, 57, 58, 67, 68}, - { 46, 49, 56, 59, 66, 69}, - { 45, 50, 55, 60, 65, 70}, - { 44, 51, 54, 61, 64, 71}, - { 43, 52, 53, 62, 63, NO_LED } - }, - { - // Left side underglow - {96, 40}, {16, 20}, {48, 10}, {80, 18}, {88, 60}, {56, 57}, {24,60}, - // Left side Matrix - {32, 57}, { 0, 48}, { 0, 36}, { 0, 24}, { 0, 12}, - {16, 12}, {16, 24}, {16, 36}, {16, 48}, {48, 55}, - {64, 57}, {32, 45}, {32, 33}, {32, 21}, {32, 9}, - {48, 7}, {48, 19}, {48, 31}, {48, 43}, {80, 59}, - {96, 64}, {64, 45}, {64, 33}, {64, 21}, {64, 9}, - {80, 10}, {80, 22}, {80, 34}, {80, 47}, + // Right side underglow + {128, 40}, + {208, 20}, + {176, 10}, + {144, 18}, + {136, 60}, + {168, 57}, + {200, 60}, + // Right side Matrix + {192, 57}, + {224, 48}, + {224, 36}, + {224, 24}, + {224, 12}, + {208, 12}, + {208, 24}, + {208, 36}, + {208, 48}, + {176, 55}, + {160, 57}, + {192, 45}, + {192, 33}, + {192, 21}, + {192, 9}, + {176, 7}, + {176, 19}, + {176, 31}, + {176, 43}, + {144, 59}, + {128, 64}, + {160, 45}, + {160, 33}, + {160, 21}, + {160, 9}, + {144, 10}, + {144, 22}, + {144, 34}, + {144, 47}, + }, + {LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT}}; + #endif + void keyboard_post_init_rgb_light(void) { + #ifdef RGBLIGHT_ENABLE + rgblight_sethsv_pink(); + /* rgblight_setrgb(RGB_ORANGE); */ + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 1); + #endif + } - // Right side underglow - {128, 40}, {208, 20}, {176, 10}, {144, 18}, {136, 60}, {168, 57}, {200,60}, - // Right side Matrix - {192, 57}, {224, 48}, {224, 36}, {224, 24}, {224, 12}, - {208, 12}, {208, 24}, {208, 36}, {208, 48}, {176, 55}, - {160, 57}, {192, 45}, {192, 33}, {192, 21}, {192, 9}, - {176, 7}, {176, 19}, {176, 31}, {176, 43}, {144, 59}, - {128, 64}, {160, 45}, {160, 33}, {160, 21}, {160, 9}, - {144, 10}, {144, 22}, {144, 34}, {144, 47}, - }, - { - LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, - LED_FLAG_KEYLIGHT, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, - LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT - } -}; -#endif + #ifdef RGB_MATRIX_ENABLE + layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { + case 1: + rgb_matrix_sethsv(HSV_AZURE); + break; + case 2: + rgb_matrix_sethsv(HSV_GREEN); + rgb_matrix_mode(RGB_MATRIX_PIXEL_FRACTAL); + break; + default: // for any other layers, or the default layer + rgb_matrix_mode(RGB_MATRIX_SOLID_MULTISPLASH); + break; + } + return state; + } + #endif - -void keyboard_post_init_rgb_light(void) { - -#ifdef RGBLIGHT_ENABLE - rgblight_sethsv_pink(); - /* rgblight_setrgb(RGB_ORANGE); */ - rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 1); -#endif -} - -#ifdef RGB_MATRIX_ENABLE -layer_state_t layer_state_set_user(layer_state_t state) { - switch (get_highest_layer(state)) { - case 0: - rgb_matrix_mode(RGB_MATRIX_CYCLE_LEFT_RIGHT); - break; - /* case 1: */ - /* rgb_matrix_mode(RGB_MATRIX_JELLYBEAN_RAINDROPS); */ - /* break; */ - case 2: - rgb_matrix_mode(RGB_MATRIX_SOLID_SPLASH); - break; - default: // for any other layers, or the default layer - rgb_matrix_mode(RGB_MATRIX_CYCLE_LEFT_RIGHT); - break; - } - return state; -} -#endif - -void keyboard_post_init_user(void) { - keyboard_post_init_rgb_light(); -} + void keyboard_post_init_user(void) { + keyboard_post_init_rgb_light(); + } diff --git a/keyboards/sofle/keymaps/wonderbeat/oled.c b/keyboards/sofle/keymaps/wonderbeat/oled.c index 3c5903ec2453..a3b22d753c6a 100644 --- a/keyboards/sofle/keymaps/wonderbeat/oled.c +++ b/keyboards/sofle/keymaps/wonderbeat/oled.c @@ -1,230 +1,220 @@ /* Copyright 2020 Josef Adamcik * Modification for VIA support and RGB underglow by Jens Bonk-Wiltfang - * - * 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 . - */ - -//Sets up what the OLED screens display. - -#ifdef OLED_ENABLE - -/* KEYBOARD PET START */ - -/* settings */ -# define MIN_WALK_SPEED 10 -# define MIN_RUN_SPEED 40 - -/* advanced settings */ -# define ANIM_FRAME_DURATION 400 // how long each frame lasts in ms -# define ANIM_SIZE 96 // number of bytes in array. If you change sprites, minimize for adequate firmware size. max is 1024 - -/* timers */ -uint32_t anim_timer = 0; -uint32_t anim_sleep = 0; - -/* current frame */ -uint8_t current_frame = 0; - -/* status variables */ -int current_wpm = 0; -led_t led_usb_state; - -bool isSneaking = false; -bool isJumping = false; -bool showedJump = true; - - -/* logic */ -static void render_luna(int LUNA_X, int LUNA_Y) { - /* Sit */ - static const char PROGMEM sit[2][ANIM_SIZE] = {/* 'sit1', 32x22px */ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x68, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28, 0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - }, - - /* 'sit2', 32x22px */ - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x90, 0x08, 0x18, 0x60, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0e, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28, 0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}; - - /* Walk */ - static const char PROGMEM walk[2][ANIM_SIZE] = {/* 'walk1', 32x22px */ + * + * 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 . + */ + + // Sets up what the OLED screens display. + + #ifdef OLED_ENABLE + + /* KEYBOARD PET START */ + + /* settings */ + # define MIN_WALK_SPEED 10 + # define MIN_RUN_SPEED 40 + + /* advanced settings */ + # define ANIM_FRAME_DURATION 400 // how long each frame lasts in ms + # define ANIM_SIZE 96 // number of bytes in array. If you change sprites, minimize for adequate firmware size. max is 1024 + + int current_wpm = 0; + led_t led_usb_state; + uint32_t anim_sleep = 0; + + # ifdef LUNA + /* timers */ + uint32_t anim_timer = 0; + + /* current frame */ + uint8_t current_frame = 0; + + bool isSneaking = false; + bool isJumping = false; + bool showedJump = true; + + /* logic */ + static void render_luna(int LUNA_X, int LUNA_Y) { + /* Sit */ + static const char PROGMEM sit[2][ANIM_SIZE] = {/* 'sit1', 32x22px */ { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x90, 0x90, 0x90, 0xa0, 0xc0, 0x80, 0x80, 0x80, 0x70, 0x08, 0x14, 0x08, 0x90, 0x10, 0x10, 0x08, 0xa4, 0x78, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x18, 0xea, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x20, 0x20, 0x3c, 0x0f, 0x11, 0x1f, 0x03, 0x06, 0x18, 0x20, 0x20, 0x3c, 0x0c, 0x12, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x68, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28, 0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }, - /* 'walk2', 32x22px */ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x20, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x28, 0x10, 0x20, 0x20, 0x20, 0x10, 0x48, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x20, 0xf8, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x30, 0xd5, 0x20, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x30, 0x0c, 0x02, 0x05, 0x09, 0x12, 0x1e, 0x02, 0x1c, 0x14, 0x08, 0x10, 0x20, 0x2c, 0x32, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - }}; + /* 'sit2', 32x22px */ + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x90, 0x08, 0x18, 0x60, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0e, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28, 0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}; - /* Run */ - static const char PROGMEM run[2][ANIM_SIZE] = {/* 'run1', 32x22px */ - { - 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x08, 0xc8, 0xb0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0xc4, 0xa4, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x58, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x09, 0x04, 0x04, 0x04, 0x04, 0x02, 0x03, 0x02, 0x01, 0x01, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, - }, + /* Walk */ + static const char PROGMEM walk[2][ANIM_SIZE] = {/* 'walk1', 32x22px */ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x90, 0x90, 0x90, 0xa0, 0xc0, 0x80, 0x80, 0x80, 0x70, 0x08, 0x14, 0x08, 0x90, 0x10, 0x10, 0x08, 0xa4, 0x78, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x18, 0xea, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x20, 0x20, 0x3c, 0x0f, 0x11, 0x1f, 0x03, 0x06, 0x18, 0x20, 0x20, 0x3c, 0x0c, 0x12, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }, - /* 'run2', 32x22px */ - { - 0x00, 0x00, 0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x78, 0x28, 0x08, 0x10, 0x20, 0x30, 0x08, 0x10, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x10, 0xb0, 0x50, 0x55, 0x20, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x1e, 0x20, 0x20, 0x18, 0x0c, 0x14, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - }}; + /* 'walk2', 32x22px */ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x20, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x28, 0x10, 0x20, 0x20, 0x20, 0x10, 0x48, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x20, 0xf8, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x30, 0xd5, 0x20, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x30, 0x0c, 0x02, 0x05, 0x09, 0x12, 0x1e, 0x02, 0x1c, 0x14, 0x08, 0x10, 0x20, 0x2c, 0x32, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }}; - /* Bark */ - static const char PROGMEM bark[2][ANIM_SIZE] = {/* 'bark1', 32x22px */ + /* Run */ + static const char PROGMEM run[2][ANIM_SIZE] = {/* 'run1', 32x22px */ { - 0x00, 0xc0, 0x20, 0x10, 0xd0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x08, 0xc8, 0xb0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0xc4, 0xa4, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x58, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x09, 0x04, 0x04, 0x04, 0x04, 0x02, 0x03, 0x02, 0x01, 0x01, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, }, - /* 'bark2', 32x22px */ + /* 'run2', 32x22px */ { - 0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x2c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x20, 0x4a, 0x09, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x78, 0x28, 0x08, 0x10, 0x20, 0x30, 0x08, 0x10, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x10, 0xb0, 0x50, 0x55, 0x20, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x1e, 0x20, 0x20, 0x18, 0x0c, 0x14, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}; - /* Sneak */ - static const char PROGMEM sneak[2][ANIM_SIZE] = {/* 'sneak1', 32x22px */ + /* Bark */ + static const char PROGMEM bark[2][ANIM_SIZE] = {/* 'bark1', 32x22px */ { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x40, 0x40, 0x80, 0x00, 0x80, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x21, 0xf0, 0x04, 0x02, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x04, 0x04, 0x04, 0x03, 0x01, 0x00, 0x00, 0x09, 0x01, 0x80, 0x80, 0xab, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x20, 0x20, 0x3c, 0x0f, 0x11, 0x1f, 0x02, 0x06, 0x18, 0x20, 0x20, 0x38, 0x08, 0x10, 0x18, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xc0, 0x20, 0x10, 0xd0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }, - /* 'sneak2', 32x22px */ + /* 'bark2', 32x22px */ { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xa0, 0x20, 0x40, 0x80, 0xc0, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x41, 0xf0, 0x04, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x02, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x40, 0x40, 0x55, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x30, 0x0c, 0x02, 0x05, 0x09, 0x12, 0x1e, 0x04, 0x18, 0x10, 0x08, 0x10, 0x20, 0x28, 0x34, 0x06, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x2c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x20, 0x4a, 0x09, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }}; - /* animation */ - void animate_luna(void) { - - /* jump */ - if (isJumping || !showedJump) { - /* clear */ - oled_set_cursor(LUNA_X, LUNA_Y + 2); - oled_write(" ", false); - - oled_set_cursor(LUNA_X, LUNA_Y - 1); - - showedJump = true; - } else { - /* clear */ - oled_set_cursor(LUNA_X, LUNA_Y - 1); - oled_write(" ", false); - - oled_set_cursor(LUNA_X, LUNA_Y); - } - - /* switch frame */ - current_frame = (current_frame + 1) % 2; - - /* current status */ - if (led_usb_state.caps_lock) { - oled_write_raw_P(bark[abs(1 - current_frame)], ANIM_SIZE); - - } else if (isSneaking) { - oled_write_raw_P(sneak[abs(1 - current_frame)], ANIM_SIZE); - - } else if (current_wpm <= MIN_WALK_SPEED) { - oled_write_raw_P(sit[abs(1 - current_frame)], ANIM_SIZE); - - } else if (current_wpm <= MIN_RUN_SPEED) { - oled_write_raw_P(walk[abs(1 - current_frame)], ANIM_SIZE); - - } else { - oled_write_raw_P(run[abs(1 - current_frame)], ANIM_SIZE); - } - } - - /* animation timer */ - if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { - anim_timer = timer_read32(); - animate_luna(); - } - -} - - - - - -static void render_logo(void) { - static const char PROGMEM qmk_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(qmk_logo, false); -} - -static void print_status_narrow(void) { - /* this fixes the screen on and off bug */ - if (current_wpm > 0) { - oled_on(); - anim_sleep = timer_read32(); - } else if (timer_elapsed32(anim_sleep) > OLED_TIMEOUT) { - oled_off(); - return; - } - - // Print current mode - oled_write_P(PSTR("\n\n"), false); - - switch (get_highest_layer(layer_state)) { - case 0: - oled_write_ln_P(PSTR("Qwrt"), false); - break; - case 1: - oled_write_ln_P(PSTR("ClmkDH"), false); - break; - default: - break; - } - oled_write_P(PSTR("\n"), false); - // Print current layer - switch (get_highest_layer(layer_state)) { - case 0: - case 1: - oled_write_P(PSTR("Base\n"), false); - break; - case 2: - oled_write_P(PSTR("Raise"), false); - break; - case 3: - oled_write_P(PSTR("Lower"), false); - break; - default: - oled_write_ln_P(PSTR("undef"), false); - } - oled_write_P(PSTR("\n\n"), false); - led_t led_usb_state = host_keyboard_led_state(); - oled_write_ln_P(PSTR("CPSLK"), led_usb_state.caps_lock); - render_luna(0, 13); -} - -oled_rotation_t oled_init_user(oled_rotation_t rotation) { - if (is_keyboard_master()) { - return OLED_ROTATION_270; - } - return rotation; -} - -bool oled_task_user(void) { - current_wpm = get_current_wpm(); - led_usb_state = host_keyboard_led_state(); - - if (is_keyboard_master()) { - print_status_narrow(); - } else { - render_logo(); - } - return true; -} - -#endif + /* Sneak */ + static const char PROGMEM sneak[2][ANIM_SIZE] = {/* 'sneak1', 32x22px */ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x40, 0x40, 0x80, 0x00, 0x80, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x21, 0xf0, 0x04, 0x02, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x04, 0x04, 0x04, 0x03, 0x01, 0x00, 0x00, 0x09, 0x01, 0x80, 0x80, 0xab, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x20, 0x20, 0x3c, 0x0f, 0x11, 0x1f, 0x02, 0x06, 0x18, 0x20, 0x20, 0x38, 0x08, 0x10, 0x18, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, + }, + + /* 'sneak2', 32x22px */ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xa0, 0x20, 0x40, 0x80, 0xc0, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x41, 0xf0, 0x04, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x02, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x40, 0x40, 0x55, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x30, 0x0c, 0x02, 0x05, 0x09, 0x12, 0x1e, 0x04, 0x18, 0x10, 0x08, 0x10, 0x20, 0x28, 0x34, 0x06, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + }}; + + /* animation */ + void animate_luna(void) { + /* jump */ + if (isJumping || !showedJump) { + /* clear */ + oled_set_cursor(LUNA_X, LUNA_Y + 2); + oled_write(" ", false); + + oled_set_cursor(LUNA_X, LUNA_Y - 1); + + showedJump = true; + } else { + /* clear */ + oled_set_cursor(LUNA_X, LUNA_Y - 1); + oled_write(" ", false); + + oled_set_cursor(LUNA_X, LUNA_Y); + } + + /* switch frame */ + current_frame = (current_frame + 1) % 2; + + /* current status */ + if (led_usb_state.caps_lock) { + oled_write_raw_P(bark[abs(1 - current_frame)], ANIM_SIZE); + + } else if (isSneaking) { + oled_write_raw_P(sneak[abs(1 - current_frame)], ANIM_SIZE); + + } else if (current_wpm <= MIN_WALK_SPEED) { + oled_write_raw_P(sit[abs(1 - current_frame)], ANIM_SIZE); + + } else if (current_wpm <= MIN_RUN_SPEED) { + oled_write_raw_P(walk[abs(1 - current_frame)], ANIM_SIZE); + + } else { + oled_write_raw_P(run[abs(1 - current_frame)], ANIM_SIZE); + } + } + + /* animation timer */ + if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + anim_timer = timer_read32(); + animate_luna(); + } + } + + # endif + + static void render_logo(void) { + static const char PROGMEM qmk_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(qmk_logo, false); + } + + static void print_status_narrow(void) { + /* this fixes the screen on and off bug */ + if (current_wpm > 0) { + oled_on(); + anim_sleep = timer_read32(); + } else if (is_oled_on() && timer_elapsed32(anim_sleep) > OLED_TIMEOUT) { + oled_off(); + return; + } + // Print current mode + oled_write_P(PSTR("\n\n"), false); + + switch (get_highest_layer(layer_state)) { + case 0: + oled_write_ln_P(PSTR("QWRT"), false); + break; + case 1: + oled_write_ln_P(PSTR("CDH"), false); + break; + case 2: + oled_write_P(PSTR("Raise"), false); + break; + case 3: + oled_write_P(PSTR("Lower"), false); + break; + default: + break; + } + oled_write_ln_P(PSTR("\n\n\nCPSLK"), led_usb_state.caps_lock); + # ifdef LUNA + render_luna(0, 13); + # endif + } + + oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (is_keyboard_master()) { + return OLED_ROTATION_270; + } + return rotation; + } + + bool oled_task_user(void) { + current_wpm = get_current_wpm(); + led_usb_state = host_keyboard_led_state(); + + if (current_wpm > 70) { + rgb_matrix_sethsv(HSV_RED); + } else if (current_wpm > 35) { + rgb_matrix_sethsv(HSV_YELLOW); + } else if (current_wpm > 20) { + rgb_matrix_sethsv(HSV_MAGENTA); + } else if (current_wpm == 0) { + rgb_matrix_sethsv(HSV_BLUE); + } + + if (is_keyboard_master()) { + print_status_narrow(); + } else { + render_logo(); + } + return true; + } + + #endif From 342ec41d685c971431360be5d7112812316c0eaa Mon Sep 17 00:00:00 2001 From: denisg Date: Sun, 14 Aug 2022 22:59:25 +0300 Subject: [PATCH 06/11] 74 leds --- keyboards/sofle/keymaps/wonderbeat/config.h | 25 +++----- keyboards/sofle/keymaps/wonderbeat/glcdfont.c | 4 -- keyboards/sofle/keymaps/wonderbeat/keymap.c | 17 +++-- keyboards/sofle/keymaps/wonderbeat/oled.c | 62 ++++++++++--------- keyboards/sofle/keymaps/wonderbeat/rules.mk | 4 ++ 5 files changed, 56 insertions(+), 56 deletions(-) diff --git a/keyboards/sofle/keymaps/wonderbeat/config.h b/keyboards/sofle/keymaps/wonderbeat/config.h index 18d74b703495..a63093c97d1c 100644 --- a/keyboards/sofle/keymaps/wonderbeat/config.h +++ b/keyboards/sofle/keymaps/wonderbeat/config.h @@ -22,16 +22,13 @@ for more options. */ - #define EE_HANDS + /* #define EE_HANDS */ + + #define MASTER_LEFT #ifdef RGBLIGHT_ENABLE # define RGBLIGHT_ANIMATIONS - /* #define RGB_LIGHT_EFFECT_BREATHE_MAX 200 */ - /* #define RGBLIGHT_RAINBOW_SWIRL_RANGE 127 */ - /* #define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_RAINBOW_MOOD */ - /* #define RGBLIGHT_DEFAULT_HUE 205 */ - /* #define RGBLIGHT_EFFECT_RAINBOW_MOOD */ - # define RGBLIGHT_DEFAULT_SPD 10 + # define RGBLIGHT_DEFAULT_SPD 12 #endif #define TAPPING_TERM 200 @@ -42,26 +39,20 @@ # define RGB_DI_PIN D3 # define DRIVER_LED_TOTAL 74 # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended - # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 80 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. - /* #define RGB_MATRIX_HUE_STEP 8 */ - /* #define RGB_MATRIX_SAT_STEP 8 */ - /* #define RGB_MATRIX_VAL_STEP 8 */ - /* #define RGB_MATRIX_SPD_STEP 10 */ + # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 70 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. # define RGB_MATRIX_KEYPRESSES - /* #define RGB_MATRIX_FRAMEBUFFER_EFFECTS */ - /* # define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT */ - /* #define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON */ + # define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH # define ENABLE_RGB_MATRIX_PIXEL_FRACTAL - # define LUNA /* # define ENABLE_RGB_MATRIX_MULTISPLASH */ /* #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_RAINDROPS */ # define RGB_MATRIX_SPLIT \ { 37, 37 } - /* #define SPLIT_TRANSPORT_MIRROR */ #endif + #define LUNA + #if defined(OLED_FONT_H) # undef OLED_FONT_H #endif diff --git a/keyboards/sofle/keymaps/wonderbeat/glcdfont.c b/keyboards/sofle/keymaps/wonderbeat/glcdfont.c index 7f28fdf4d3a4..5596e7137a38 100644 --- a/keyboards/sofle/keymaps/wonderbeat/glcdfont.c +++ b/keyboards/sofle/keymaps/wonderbeat/glcdfont.c @@ -1,10 +1,6 @@ #include "progmem.h" - // clang-format off const unsigned char font[] PROGMEM = { 0,0,0,0,0,0,62,91,79,91,62,0,62,107,79,107,62,0,28,62,124,62,28,0,24,60,126,60,24,0,28,87,125,87,28,0,28,94,127,94,28,0,0,24,60,24,0,0,255,231,195,231,255,0,0,24,36,24,0,0,255,231,219,231,255,0,48,72,58,6,14,0,38,41,121,41,38,0,64,127,5,5,7,0,64,127,5,37,63,0,90,60,231,60,90,0,127,62,28,28,8,0,8,28,28,62,127,0,20,34,127,34,20,0,95,95,0,95,95,0,6,9,127,1,127,0,0,102,137,149,106,0,96,96,96,96,96,0,148,162,255,162,148,0,8,4,126,4,8,0,16,32,126,32,16,0,8,8,42,28,8,0,8,28,42,8,8,0,30,16,16,16,16,0,12,30,12,30,12,0,48,56,62,56,48,0,6,14,62,14,6,0,0,0,0,0,0,0,0,0,95,0,0,0,0,7,0,7,0,0,20,127,20,127,20,0,36,42,127,42,18,0,35,19,8,100,98,0,54,73,86,32,80,0,0,8,7,3,0,0,0,28,34,65,0,0,0,65,34,28,0,0,42,28,127,28,42,0,8,8,62,8,8,0,0,128,112,48,0,0,8,8,8,8,8,0,0,0,96,96,0,0,32,16,8,4,2,0,62,81,73,69,62,0,0,66,127,64,0,0,114,73,73,73,70,0,33,65,73,77,51,0,24,20,18,127,16,0,39,69,69,69,57,0,60,74,73,73,49,0,65,33,17,9,7,0,54,73,73,73,54,0,70,73,73,41,30,0,0,0,20,0,0,0,0,64,52,0,0,0,0,8,20,34,65,0,20,20,20,20,20,0,0,65,34,20,8,0,2,1,89,9,6,0,62,65,93,89,78,0,124,18,17,18,124,0,127,73,73,73,54,0,62,65,65,65,34,0,127,65,65,65,62,0,127,73,73,73,65,0,127,9,9,9,1,0,62,65,65,81,115,0,127,8,8,8,127,0,0,65,127,65,0,0,32,64,65,63,1,0,127,8,20,34,65,0,127,64,64,64,64,0,127,2,28,2,127,0,127,4,8,16,127,0,62,65,65,65,62,0,127,9,9,9,6,0,62,65,81,33,94,0,127,9,25,41,70,0,38,73,73,73,50,0,3,1,127,1,3,0,63,64,64,64,63,0,31,32,64,32,31,0,63,64,56,64,63,0,99,20,8,20,99,0,3,4,120,4,3,0,97,89,73,77,67,0,0,127,65,65,65,0,2,4,8,16,32,0,0,65,65,65,127,0,4,2,1,2,4,0,64,64,64,64,64,0,0,3,7,8,0,0,32,84,84,120,64,0,127,40,68,68,56,0,56,68,68,68,40,0,56,68,68,40,127,0,56,84,84,84,24,0,0,8,126,9,2,0,24,36,36,28,120,0,127,8,4,4,120,0,0,68,125,64,0,0,32,64,64,61,0,0,127,16,40,68,0,0,0,65,127,64,0,0,124,4,120,4,120,0,124,8,4,4,120,0,56,68,68,68,56,0,124,24,36,36,24,0,24,36,36,24,124,0,124,8,4,4,8,0,72,84,84,84,36,0,4,4,63,68,36,0,60,64,64,32,124,0,28,32,64,32,28,0,60,64,48,64,60,0,68,40,16,40,68,0,76,144,144,144,124,0,68,100,84,76,68,0,0,8,54,65,0,0,0,0,119,0,0,0,0,65,54,8,0,0,2,1,2,4,2,0,60,38,35,38,60,0,0,0,0,192,192,192,0,0,0,0,128,192,192,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,240,240,240,224,236,238,247,243,112,32,0,124,124,124,126,0,126,126,126,127,127,127,0,0,128,192,224,126,91,79,91,254,192,0,0,192,0,220,215,222,222,222,215,220,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,7,15,254,252,255,7,35,252,254,142,6,6,6,254,252,248,0,254,254,128,0,0,0,254,254,254,0,0,254,254,254,6,6,6,0,0,0,0,0,0,254,254,254,6,6,6,254,252,254,6,6,6,254,254,240,0,32,252,254,142,6,6,6,254,252,248,0,254,254,254,6,6,6,254,252,254,6,6,6,254,254,240,0,0,0,0,0,0,0,252,254,6,6,6,6,254,254,254,0,0,226,242,50,50,22,150,254,252,0,2,30,126,248,192,192,248,254,30,2,0,0,15,31,63,127,127,127,127,127,63,30,12,0,31,31,31,63,0,63,63,63,127,127,127,0,48,123,127,120,48,32,32,48,120,127,59,0,3,0,15,127,15,15,15,127,15,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,0,0,1,3,3,3,3,3,3,1,0,0,1,3,3,3,3,3,3,3,3,0,0,3,3,3,0,0,0,0,0,0,0,0,0,3,3,3,0,0,0,3,3,3,0,0,0,3,3,3,0,0,1,3,3,3,3,3,3,1,0,0,3,3,3,0,0,0,3,3,3,0,0,0,3,3,3,0,0,0,0,0,0,0,1,51,51,35,51,51,63,31,7,0,0,1,3,3,3,3,3,3,3,0,0,32,32,57,63,31,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - - - }; diff --git a/keyboards/sofle/keymaps/wonderbeat/keymap.c b/keyboards/sofle/keymaps/wonderbeat/keymap.c index 5cf264bed561..8e0f01a9dab2 100644 --- a/keyboards/sofle/keymaps/wonderbeat/keymap.c +++ b/keyboards/sofle/keymaps/wonderbeat/keymap.c @@ -104,9 +104,9 @@ // 09 16 19 26 29 36 36 29 26 19 16 09 3 // // 08 17 18 27 28 28 27 18 17 08 4 - // 07 06 05 05 06 07 - - led_config_t g_led_config = {{{11, 12, 21, 22, 31, 32}, {10, 13, 20, 23, 30, 33}, {9, 14, 19, 24, 29, 34}, {8, 15, 18, 25, 28, 35}, {7, 16, 17, 26, 27, NO_LED}, {47, 48, 57, 58, 67, 68}, {46, 49, 56, 59, 66, 69}, {45, 50, 55, 60, 65, 70}, {44, 51, 54, 61, 64, 71}, {43, 52, 53, 62, 63, NO_LED}}, + // (08) 07 06 05 05 06 07 (08) + // + led_config_t g_led_config = {{{12, 13, 22, 23, 32, 33}, {11, 14, 21, 24, 31, 34}, {10, 15, 20, 25, 30, 35}, {9, 16, 19, 26, 29, 36}, {8, 17, 18, 27, 28, NO_LED}, {48, 49, 58, 59, 68, 69}, {47, 50, 57, 60, 67, 70}, {46, 51, 56, 61, 66, 71}, {45, 52, 55, 62, 65, 72}, {44, 53, 54, 63, 64, NO_LED}}, { // Left side underglow {96, 40}, @@ -116,6 +116,7 @@ {88, 60}, {56, 57}, {24, 60}, + {10, 60}, // Left side Matrix {32, 57}, {0, 48}, @@ -155,6 +156,7 @@ {136, 60}, {168, 57}, {200, 60}, + {210, 60}, // Right side Matrix {192, 57}, {224, 48}, @@ -186,8 +188,8 @@ {144, 34}, {144, 47}, }, - {LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, - LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT}}; + {LED_FLAG_NONE, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT}}; #endif void keyboard_post_init_rgb_light(void) { @@ -196,6 +198,11 @@ /* rgblight_setrgb(RGB_ORANGE); */ rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 1); #endif + + #ifdef RGB_MATRIX_ENABLE + /* rgblight_mode(RGB_MATRIX_JELLYBEAN_RAINDROPS); */ + rgb_matrix_mode(RGB_MATRIX_SOLID_MULTISPLASH); + #endif } #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/sofle/keymaps/wonderbeat/oled.c b/keyboards/sofle/keymaps/wonderbeat/oled.c index a3b22d753c6a..e21e9c29103b 100644 --- a/keyboards/sofle/keymaps/wonderbeat/oled.c +++ b/keyboards/sofle/keymaps/wonderbeat/oled.c @@ -150,42 +150,40 @@ static void render_logo(void) { static const char PROGMEM qmk_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(qmk_logo, false); } static void print_status_narrow(void) { /* this fixes the screen on and off bug */ - if (current_wpm > 0) { + anim_sleep = timer_read32(); + if (current_wpm > 1) { oled_on(); - anim_sleep = timer_read32(); + // Print current mode + oled_write_P(PSTR("\n\n"), false); + + switch (get_highest_layer(layer_state)) { + case 0: + oled_write_ln_P(PSTR("QWRT"), false); + break; + case 1: + oled_write_ln_P(PSTR("CDH"), false); + break; + case 2: + oled_write_P(PSTR("Raise"), false); + break; + case 3: + oled_write_P(PSTR("Lower"), false); + break; + default: + break; + } + oled_write_ln_P(PSTR("\n\n\nCPSLK"), led_usb_state.caps_lock); + # ifdef LUNA + render_luna(0, 13); + # endif } else if (is_oled_on() && timer_elapsed32(anim_sleep) > OLED_TIMEOUT) { oled_off(); - return; - } - // Print current mode - oled_write_P(PSTR("\n\n"), false); - - switch (get_highest_layer(layer_state)) { - case 0: - oled_write_ln_P(PSTR("QWRT"), false); - break; - case 1: - oled_write_ln_P(PSTR("CDH"), false); - break; - case 2: - oled_write_P(PSTR("Raise"), false); - break; - case 3: - oled_write_P(PSTR("Lower"), false); - break; - default: - break; } - oled_write_ln_P(PSTR("\n\n\nCPSLK"), led_usb_state.caps_lock); - # ifdef LUNA - render_luna(0, 13); - # endif } oled_rotation_t oled_init_user(oled_rotation_t rotation) { @@ -199,12 +197,16 @@ current_wpm = get_current_wpm(); led_usb_state = host_keyboard_led_state(); - if (current_wpm > 70) { + if (current_wpm > 110) { rgb_matrix_sethsv(HSV_RED); - } else if (current_wpm > 35) { + } else if (current_wpm > 75) { rgb_matrix_sethsv(HSV_YELLOW); - } else if (current_wpm > 20) { + } else if (current_wpm > 55) { + rgb_matrix_sethsv(HSV_PURPLE); + } else if (current_wpm > 35) { rgb_matrix_sethsv(HSV_MAGENTA); + } else if (current_wpm > 23) { + rgb_matrix_sethsv(HSV_TEAL); } else if (current_wpm == 0) { rgb_matrix_sethsv(HSV_BLUE); } diff --git a/keyboards/sofle/keymaps/wonderbeat/rules.mk b/keyboards/sofle/keymaps/wonderbeat/rules.mk index 803d7f542d6f..57a104f8517b 100644 --- a/keyboards/sofle/keymaps/wonderbeat/rules.mk +++ b/keyboards/sofle/keymaps/wonderbeat/rules.mk @@ -5,3 +5,7 @@ OLED_DRIVER = SSD1306 RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = WS2812 TAP_DANCE_ENABLE = yes + +# Additional thing to reduce compiled size +LTO_ENABLE = yes +NO_USB_STARTUP_CHECK = yes From fe996e67a9636e49c2cc76a315c3031f393dccfc Mon Sep 17 00:00:00 2001 From: dgolovachev Date: Sun, 12 Mar 2023 17:45:51 +0300 Subject: [PATCH 07/11] Charybdis keymamp for my new keyboard! --- .../charybdis/4x6/keymaps/wonderbeat/keymap.c | 75 +++++++++++++++++++ .../4x6/keymaps/wonderbeat/readme.md | 7 ++ .../charybdis/4x6/keymaps/wonderbeat/rules.mk | 26 +++++++ keyboards/bastardkb/charybdis/config.h | 4 +- 4 files changed, 110 insertions(+), 2 deletions(-) create mode 100644 keyboards/bastardkb/charybdis/4x6/keymaps/wonderbeat/keymap.c create mode 100644 keyboards/bastardkb/charybdis/4x6/keymaps/wonderbeat/readme.md create mode 100644 keyboards/bastardkb/charybdis/4x6/keymaps/wonderbeat/rules.mk diff --git a/keyboards/bastardkb/charybdis/4x6/keymaps/wonderbeat/keymap.c b/keyboards/bastardkb/charybdis/4x6/keymaps/wonderbeat/keymap.c new file mode 100644 index 000000000000..98edad47d9d2 --- /dev/null +++ b/keyboards/bastardkb/charybdis/4x6/keymaps/wonderbeat/keymap.c @@ -0,0 +1,75 @@ +/** + * Copyright 2021 Charly Delay (@0xcharly) + * + * 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 + +enum charybdis_keymap_layers { + LAYER_BASE = 0, + LAYER_LOWER, + LAYER_RAISE, +}; + +#define LOWER MO(LAYER_LOWER) +#define RAISE MO(LAYER_RAISE) + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [LAYER_BASE] = LAYOUT_charybdis_4x6( + // ╭──────────────────────────────────────────────────────╮ ╭──────────────────────────────────────────────────────╮ + 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LALT, + // ╰──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────╯ + KC_LGUI, KC_SPC, LOWER, RAISE, KC_ENT, + KC_LALT, KC_BSPC, KC_DEL + // ╰───────────────────────────╯ ╰──────────────────╯ + ), + + [LAYER_LOWER] = LAYOUT_charybdis_4x6( + // ╭──────────────────────────────────────────────────────╮ ╭──────────────────────────────────────────────────────╮ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UNDS, + // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ + RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LBRC, KC_P7, KC_P8, KC_P9, KC_RBRC, XXXXXXX, + // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ + RGB_TOG, KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_PPLS, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_PEQL, + // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ + RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, EE_CLR, QK_BOOT, KC_PAST, KC_P1, KC_P2, KC_P3, KC_PSLS, KC_PDOT, + // ╰──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────╯ + XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, + XXXXXXX, XXXXXXX, KC_P0 + // ╰───────────────────────────╯ ╰──────────────────╯ + ), + + [LAYER_RAISE] = LAYOUT_charybdis_4x6( + // ╭──────────────────────────────────────────────────────╮ ╭──────────────────────────────────────────────────────╮ + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ + KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU, + // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ + KC_MPLY, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_RSFT, KC_RCTL, KC_RALT, KC_RGUI, KC_MUTE, + // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ + KC_MPRV, KC_HOME, KC_PGUP, KC_PGDN, KC_END, XXXXXXX, QK_BOOT, EE_CLR, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLD, + // ╰──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────╯ + _______, _______, XXXXXXX, _______, XXXXXXX, + _______, _______, XXXXXXX + // ╰───────────────────────────╯ ╰──────────────────╯ + ), +}; +// clang-format on diff --git a/keyboards/bastardkb/charybdis/4x6/keymaps/wonderbeat/readme.md b/keyboards/bastardkb/charybdis/4x6/keymaps/wonderbeat/readme.md new file mode 100644 index 000000000000..23a85e54d517 --- /dev/null +++ b/keyboards/bastardkb/charybdis/4x6/keymaps/wonderbeat/readme.md @@ -0,0 +1,7 @@ +# Charybdis (4x6) default keymap + +> :bulb: Have a look at the [`via` keymap](../via) for a more feature-rich layout. + +The Charydbis (4x6) default keymap is inspired from the original [Dactyl Manuform](../../../../../handwired/dactyl_manuform) default keymap. + +This layout supports RGB matrix. However, due to space constraints on the MCU, only a limited number of effect can be enabled at once. Look at the `config.h` file and enable your favorite effect. diff --git a/keyboards/bastardkb/charybdis/4x6/keymaps/wonderbeat/rules.mk b/keyboards/bastardkb/charybdis/4x6/keymaps/wonderbeat/rules.mk new file mode 100644 index 000000000000..24ef9c674433 --- /dev/null +++ b/keyboards/bastardkb/charybdis/4x6/keymaps/wonderbeat/rules.mk @@ -0,0 +1,26 @@ +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +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 = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +AUDIO_SUPPORTED = no # Audio is not supported +RGB_MATRIX_SUPPORTED = no # RGB matrix is supported and enabled by default +RGBLIGHT_SUPPORTED = no # RGB underglow is supported, but not enabled by default +RGB_MATRIX_ENABLE = no # Enable keyboard RGB matrix functionality +RGB_MATRIX_DRIVER = WS2812 + +SPLIT_KEYBOARD = yes + +POINTING_DEVICE_ENABLE = yes # Enable trackball +POINTING_DEVICE_DRIVER = pmw3360 + +SERIAL_DRIVER = vendor +WS2812_DRIVER = vendor diff --git a/keyboards/bastardkb/charybdis/config.h b/keyboards/bastardkb/charybdis/config.h index ced39ef4a1fa..0cb2fb1ee7de 100644 --- a/keyboards/bastardkb/charybdis/config.h +++ b/keyboards/bastardkb/charybdis/config.h @@ -24,8 +24,8 @@ // Enable use of pointing device on slave split. #define SPLIT_POINTING_ENABLE -// Pointing device is on the right split. -#define POINTING_DEVICE_RIGHT +// Pointing device is on the left split. +#define POINTING_DEVICE_LEFT // Limits the frequency that the sensor is polled for motion. #define POINTING_DEVICE_TASK_THROTTLE_MS 1 From abe184e8ac6854f7fc34a7f399dec2fc420aaa8c Mon Sep 17 00:00:00 2001 From: denisg Date: Mon, 13 Mar 2023 16:49:29 +0300 Subject: [PATCH 08/11] home --- keyboards/sofle/keymaps/wonderbeat/config.h | 1 + keyboards/sofle/keymaps/wonderbeat/keymap.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/keyboards/sofle/keymaps/wonderbeat/config.h b/keyboards/sofle/keymaps/wonderbeat/config.h index a63093c97d1c..2d41ca56adb5 100644 --- a/keyboards/sofle/keymaps/wonderbeat/config.h +++ b/keyboards/sofle/keymaps/wonderbeat/config.h @@ -48,6 +48,7 @@ /* #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_RAINDROPS */ # define RGB_MATRIX_SPLIT \ { 37, 37 } + # define RGB_MATRIX_LED_COUNT DRIVER_LED_TOTAL #endif diff --git a/keyboards/sofle/keymaps/wonderbeat/keymap.c b/keyboards/sofle/keymaps/wonderbeat/keymap.c index 8e0f01a9dab2..f2cb9a2f560c 100644 --- a/keyboards/sofle/keymaps/wonderbeat/keymap.c +++ b/keyboards/sofle/keymaps/wonderbeat/keymap.c @@ -23,7 +23,7 @@ enum { TD_UNDS_PIPE = 0, TD_LCBR_LBRC, TD_RCBR_RBRC, TD_NEXT_PLAY, SLSH_BSLS }; // Tap Dance Definitions - qk_tap_dance_action_t tap_dance_actions[] = {[TD_UNDS_PIPE] = ACTION_TAP_DANCE_DOUBLE(KC_UNDS, KC_PIPE), [TD_LCBR_LBRC] = ACTION_TAP_DANCE_DOUBLE(KC_LCBR, KC_LBRC), [TD_RCBR_RBRC] = ACTION_TAP_DANCE_DOUBLE(KC_RCBR, KC_RBRC), [TD_NEXT_PLAY] = ACTION_TAP_DANCE_DOUBLE(KC_MNXT, KC_MPLY), [SLSH_BSLS] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_BSLS)}; + tap_dance_action_t tap_dance_actions[] = {[TD_UNDS_PIPE] = ACTION_TAP_DANCE_DOUBLE(KC_UNDS, KC_PIPE), [TD_LCBR_LBRC] = ACTION_TAP_DANCE_DOUBLE(KC_LCBR, KC_LBRC), [TD_RCBR_RBRC] = ACTION_TAP_DANCE_DOUBLE(KC_RCBR, KC_RBRC), [TD_NEXT_PLAY] = ACTION_TAP_DANCE_DOUBLE(KC_MNXT, KC_MPLY), [SLSH_BSLS] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_BSLS)}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* From 3ac5c195a10b28e9e0ae22ac498298d66ac1e602 Mon Sep 17 00:00:00 2001 From: denisg Date: Mon, 13 Mar 2023 17:00:51 +0300 Subject: [PATCH 09/11] Stage --- util/nix/sources.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/util/nix/sources.json b/util/nix/sources.json index 5e06c30d0702..8cdb9e499680 100644 --- a/util/nix/sources.json +++ b/util/nix/sources.json @@ -5,10 +5,10 @@ "homepage": "https://github.com/nmattia/niv", "owner": "nmattia", "repo": "niv", - "rev": "82e5cd1ad3c387863f0545d7591512e76ab0fc41", - "sha256": "090l219mzc0gi33i3psgph6s2pwsc8qy4lyrqjdj4qzkvmaj65a7", + "rev": "af958e8057f345ee1aca714c1247ef3ba1c15f5e", + "sha256": "1qjavxabbrsh73yck5dcq8jggvh3r2jkbr6b5nlz5d9yrqm9255n", "type": "tarball", - "url": "https://github.com/nmattia/niv/archive/82e5cd1ad3c387863f0545d7591512e76ab0fc41.tar.gz", + "url": "https://github.com/nmattia/niv/archive/af958e8057f345ee1aca714c1247ef3ba1c15f5e.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "nixpkgs": { @@ -17,10 +17,10 @@ "homepage": "", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3802c98cffe636d54dc8f2812d143e50b4b07bb0", - "sha256": "1037fc5b2gzir41snkfga88znpn4zbpwzzccy5cx082v8qdcvcdq", + "rev": "c0e881852006b132236cbf0301bd1939bb50867e", + "sha256": "0fy7z7yxk5n7yslsvx5cyc6h21qwi4bhxf3awhirniszlbvaazy2", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/3802c98cffe636d54dc8f2812d143e50b4b07bb0.tar.gz", + "url": "https://github.com/NixOS/nixpkgs/archive/c0e881852006b132236cbf0301bd1939bb50867e.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "poetry2nix": { From 7b66a9f6bcd0ecea94a41f505157c8ffcd436d21 Mon Sep 17 00:00:00 2001 From: dgolovachev Date: Wed, 15 Mar 2023 22:45:55 +0300 Subject: [PATCH 10/11] Lauouts unified --- .../charybdis/3x6/v2/splinky_3/config.h | 2 +- keyboards/bastardkb/charybdis/4x6/4x6.h | 8 ++-- .../charybdis/4x6/keymaps/wonderbeat/keymap.c | 40 ++++++++++++------- .../charybdis/4x6/keymaps/wonderbeat/rules.mk | 3 ++ keyboards/bastardkb/charybdis/config.h | 5 ++- keyboards/sofle/keymaps/wonderbeat/keymap.c | 34 +++++++++++++--- lib/chibios | 2 +- lib/chibios-contrib | 2 +- lib/lufa | 2 +- lib/printf | 2 +- lib/vusb | 2 +- 11 files changed, 69 insertions(+), 33 deletions(-) diff --git a/keyboards/bastardkb/charybdis/3x6/v2/splinky_3/config.h b/keyboards/bastardkb/charybdis/3x6/v2/splinky_3/config.h index e4afc5a866fb..a5ad0b3177b6 100644 --- a/keyboards/bastardkb/charybdis/3x6/v2/splinky_3/config.h +++ b/keyboards/bastardkb/charybdis/3x6/v2/splinky_3/config.h @@ -24,7 +24,7 @@ { GP27, GP28, GP21, GP6, GP7, GP8 } /* Handedness. */ -#define MASTER_RIGHT +#define MASTER_LEFT // To use the handedness pin, resistors need to be installed on the adapter PCB. // If so, uncomment the following code, and undefine MASTER_RIGHT above. diff --git a/keyboards/bastardkb/charybdis/4x6/4x6.h b/keyboards/bastardkb/charybdis/4x6/4x6.h index 0d8810266e9b..b7061ca63493 100644 --- a/keyboards/bastardkb/charybdis/4x6/4x6.h +++ b/keyboards/bastardkb/charybdis/4x6/4x6.h @@ -26,19 +26,19 @@ k10, k11, k12, k13, k14, k15, k65, k64, k63, k62, k61, k60, \ k20, k21, k22, k23, k24, k25, k75, k74, k73, k72, k71, k70, \ k30, k31, k32, k33, k34, k35, k85, k84, k83, k82, k81, k80, \ - k43, k44, k41, k91, k93, \ - k45, k42, k95 \ + k93, k91, k41, k44, k43, \ + k95, k42, k45 \ ) \ { \ { k00, k01, k02, k03, k04, k05 }, \ { k10, k11, k12, k13, k14, k15 }, \ { k20, k21, k22, k23, k24, k25 }, \ { k30, k31, k32, k33, k34, k35 }, \ - { KC_NO, k41, k42, k43, k44, k45 }, \ + { KC_NO, k91, KC_NO, k93, KC_NO, k95 }, \ { k50, k51, k52, k53, k54, k55 }, \ { k60, k61, k62, k63, k64, k65 }, \ { k70, k71, k72, k73, k74, k75 }, \ { k80, k81, k82, k83, k84, k85 }, \ - { KC_NO, k91, KC_NO, k93, KC_NO, k95 }, \ + { KC_NO, k41, k42, k43, k44, k45 }, \ } // clang-format on diff --git a/keyboards/bastardkb/charybdis/4x6/keymaps/wonderbeat/keymap.c b/keyboards/bastardkb/charybdis/4x6/keymaps/wonderbeat/keymap.c index 98edad47d9d2..dcec3e5ac469 100644 --- a/keyboards/bastardkb/charybdis/4x6/keymaps/wonderbeat/keymap.c +++ b/keyboards/bastardkb/charybdis/4x6/keymaps/wonderbeat/keymap.c @@ -25,35 +25,45 @@ enum charybdis_keymap_layers { #define LOWER MO(LAYER_LOWER) #define RAISE MO(LAYER_RAISE) +// Tap Dance Declarations +enum { TD_UNDS_PIPE = 0, TD_LCBR_LBRC, TD_RCBR_RBRC, TD_NEXT_PLAY, SLSH_BSLS }; + +// Home mod row (kinda) +// Home mod row (kinda) +tap_dance_action_t tap_dance_actions[] = {[TD_UNDS_PIPE] = ACTION_TAP_DANCE_DOUBLE(KC_UNDS, KC_PIPE), [TD_LCBR_LBRC] = ACTION_TAP_DANCE_DOUBLE(KC_LCBR, KC_LBRC), [TD_RCBR_RBRC] = ACTION_TAP_DANCE_DOUBLE(KC_RCBR, KC_RBRC), [TD_NEXT_PLAY] = ACTION_TAP_DANCE_DOUBLE(KC_MNXT, KC_MPLY), [SLSH_BSLS] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_BSLS)}; + // clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [LAYER_BASE] = LAYOUT_charybdis_4x6( // ╭──────────────────────────────────────────────────────╮ ╭──────────────────────────────────────────────────────╮ - 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ - KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_ESC,LSFT_T(KC_A),LCTL_T(KC_S),LALT_T(KC_D),KC_F,KC_G, KC_H,KC_J,LALT_T(KC_K), LCTL_T(KC_L), LSFT_T(KC_SCLN), KC_BSPC, // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ - KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LALT, + TD(SLSH_BSLS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, TD(TD_UNDS_PIPE), // ╰──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────╯ - KC_LGUI, KC_SPC, LOWER, RAISE, KC_ENT, - KC_LALT, KC_BSPC, KC_DEL - // ╰───────────────────────────╯ ╰──────────────────╯ + KC_RGUI, LOWER, RAISE, KC_RGUI, TD(TD_NEXT_PLAY), + KC_ENT, KC_SPC, KC_RALT +// ╰───────────────────────────╯ ╰──────────────────╯ + /* KC_LGUI, KC_SPC, LOWER, RAISE, KC_ENT, */ + /* KC_LALT, KC_BSPC, KC_DEL */ + /* // ╰───────────────────────────╯ ╰──────────────────╯ */ ), [LAYER_LOWER] = LAYOUT_charybdis_4x6( // ╭──────────────────────────────────────────────────────╮ ╭──────────────────────────────────────────────────────╮ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UNDS, // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ - RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LBRC, KC_P7, KC_P8, KC_P9, KC_RBRC, XXXXXXX, + RGB_MOD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_LBRC, KC_P7, KC_P8, KC_P9, KC_RBRC, XXXXXXX, // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ - RGB_TOG, KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_PPLS, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_PEQL, + RGB_TOG, KC_EQL, KC_MINS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PPLS, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_DEL, // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ - RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, EE_CLR, QK_BOOT, KC_PAST, KC_P1, KC_P2, KC_P3, KC_PSLS, KC_PDOT, + RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, EE_CLR, QK_BOOT, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, KC_PDOT, // ╰──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────╯ - XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, - XXXXXXX, XXXXXXX, KC_P0 + _______, XXXXXXX, _______, _______, _______, + _______, _______, KC_P0 // ╰───────────────────────────╯ ╰──────────────────╯ ), @@ -61,14 +71,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // ╭──────────────────────────────────────────────────────╮ ╭──────────────────────────────────────────────────────╮ KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ - KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU, + KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, KC_VOLU, // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ - KC_MPLY, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_RSFT, KC_RCTL, KC_RALT, KC_RGUI, KC_MUTE, + KC_MPLY, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, XXXXXXX, KC_PGDN, KC_LEFT, KC_DOWN, KC_RIGHT, KC_RGUI, KC_MUTE, // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ KC_MPRV, KC_HOME, KC_PGUP, KC_PGDN, KC_END, XXXXXXX, QK_BOOT, EE_CLR, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLD, // ╰──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────╯ - _______, _______, XXXXXXX, _______, XXXXXXX, - _______, _______, XXXXXXX + _______, _______, KC_BTN3, _______, _______, + _______, KC_BTN1, KC_BTN2 // ╰───────────────────────────╯ ╰──────────────────╯ ), }; diff --git a/keyboards/bastardkb/charybdis/4x6/keymaps/wonderbeat/rules.mk b/keyboards/bastardkb/charybdis/4x6/keymaps/wonderbeat/rules.mk index 24ef9c674433..c84dd34fbf24 100644 --- a/keyboards/bastardkb/charybdis/4x6/keymaps/wonderbeat/rules.mk +++ b/keyboards/bastardkb/charybdis/4x6/keymaps/wonderbeat/rules.mk @@ -24,3 +24,6 @@ POINTING_DEVICE_DRIVER = pmw3360 SERIAL_DRIVER = vendor WS2812_DRIVER = vendor + +TAP_DANCE_ENABLE = yes +CHARYBDIS_MINIMUM_DEFAULT_DPI = 800 diff --git a/keyboards/bastardkb/charybdis/config.h b/keyboards/bastardkb/charybdis/config.h index 0cb2fb1ee7de..232451acb5ea 100644 --- a/keyboards/bastardkb/charybdis/config.h +++ b/keyboards/bastardkb/charybdis/config.h @@ -18,7 +18,6 @@ #pragma once - /* Pointing device configuration. */ // Enable use of pointing device on slave split. @@ -31,7 +30,9 @@ #define POINTING_DEVICE_TASK_THROTTLE_MS 1 // Invert X axis on mouse reports. -#define POINTING_DEVICE_INVERT_X +//#define POINTING_DEVICE_INVERT_X + +#define POINTING_DEVICE_INVERT_Y /* RGB matrix support. */ #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/sofle/keymaps/wonderbeat/keymap.c b/keyboards/sofle/keymaps/wonderbeat/keymap.c index f2cb9a2f560c..dc02062fb100 100644 --- a/keyboards/sofle/keymaps/wonderbeat/keymap.c +++ b/keyboards/sofle/keymaps/wonderbeat/keymap.c @@ -22,8 +22,12 @@ // Tap Dance Declarations enum { TD_UNDS_PIPE = 0, TD_LCBR_LBRC, TD_RCBR_RBRC, TD_NEXT_PLAY, SLSH_BSLS }; - // Tap Dance Definitions - tap_dance_action_t tap_dance_actions[] = {[TD_UNDS_PIPE] = ACTION_TAP_DANCE_DOUBLE(KC_UNDS, KC_PIPE), [TD_LCBR_LBRC] = ACTION_TAP_DANCE_DOUBLE(KC_LCBR, KC_LBRC), [TD_RCBR_RBRC] = ACTION_TAP_DANCE_DOUBLE(KC_RCBR, KC_RBRC), [TD_NEXT_PLAY] = ACTION_TAP_DANCE_DOUBLE(KC_MNXT, KC_MPLY), [SLSH_BSLS] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_BSLS)}; + // Home mod row (kinda) + tap_dance_action_t tap_dance_actions[] = {[TD_UNDS_PIPE] = ACTION_TAP_DANCE_DOUBLE(KC_UNDS, KC_PIPE), + [TD_LCBR_LBRC] = ACTION_TAP_DANCE_DOUBLE(KC_LCBR, KC_LBRC), + [TD_RCBR_RBRC] = ACTION_TAP_DANCE_DOUBLE(KC_RCBR, KC_RBRC), + [TD_NEXT_PLAY] = ACTION_TAP_DANCE_DOUBLE(KC_MNXT, KC_MPLY), + [SLSH_BSLS] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_BSLS)}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* @@ -42,7 +46,12 @@ * `----------------------------------' '------''---------------------------' */ - [0] = LAYOUT(KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, /**/ KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, /**/ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, KC_ESC, LSFT_T(KC_A), LCTL_T(KC_S), LALT_T(KC_D), KC_F, KC_G, /**/ KC_H, KC_J, LALT_T(KC_K), LCTL_T(KC_L), LSFT_T(KC_SCLN), KC_BSPC, TD(SLSH_BSLS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, /**/ TG(1), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, TD(TD_UNDS_PIPE), TD(TD_LCBR_LBRC), TD(TD_RCBR_RBRC), MO(2), KC_LGUI, KC_ENT, /**/ KC_SPC, KC_RGUI, MO(3), KC_RALT, TD(TD_NEXT_PLAY)), +[0] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, /**/ KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, /**/ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, + KC_ESC, LSFT_T(KC_A), LCTL_T(KC_S), LALT_T(KC_D), KC_F, KC_G, /**/ KC_H, KC_J, LALT_T(KC_K), LCTL_T(KC_L), LSFT_T(KC_SCLN), KC_BSPC, + TD(SLSH_BSLS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, /**/ TG(1), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSHTD(TD_UNDS_PIPE), + TD(TD_LCBR_LBRC), TD(TD_RCBR_RBRC),MO(2), KC_LGUI, KC_ENT, /**/ KC_SPC, KC_RGUI, MO(3), KC_RALT, TD(TD_NEXT_PLAY)), /* * COLEMAK-DH * ,-----------------------------------------. ,-----------------------------------------. @@ -58,7 +67,12 @@ * | | | | |/ / \ \ | | | | | * `----------------------------------' '------''---------------------------' */ - [1] = LAYOUT(_______, KC_1, KC_2, KC_3, KC_4, KC_5, /**/ KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, KC_Q, KC_W, KC_F, KC_P, KC_B, /**/ KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______, _______, KC_A, LSFT_T(KC_R), LCTL_T(KC_S), LALT_T(KC_T), /**/ KC_G, KC_M, KC_N, LALT_T(KC_E), LCTL_T(KC_I), LSFT_T(KC_O), _______, _______, KC_Z, KC_X, KC_C, KC_D, KC_V, _______, /**/ _______, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, _______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______), + [1] = LAYOUT( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, /**/ KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, KC_Q, KC_W, KC_F, KC_P, KC_B, /**/ KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______, + _______, KC_A, LSFT_T(KC_R), LCTL_T(KC_S), LALT_T(KC_T), /**/ KC_G, KC_M, KC_N, LALT_T(KC_E), LCTL_T(KC_I), LSFT_T(KC_O), _______, + _______, KC_Z, KC_X, KC_C, KC_D, KC_V, _______, /**/ _______, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, _______, + _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______), /* LOWER * ,-----------------------------------------. ,-----------------------------------------. * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | @@ -73,7 +87,11 @@ * | | | | |/ / \ \ | | | | | * `----------------------------------' '------''---------------------------' */ - [2] = LAYOUT(_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F12, _______, KC_EQL, KC_MINS, KC_PLUS, KC_LCBR, KC_RCBR, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, _______, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + [2] = LAYOUT(_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, /**/ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, /**/ KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_UP, KC_MS_ACCEL2, KC_0, KC_F12, + _______, KC_EQL, KC_MINS, KC_PLUS, KC_LCBR, KC_RCBR, /**/ KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_LPRN, KC_RPRN, KC_DEL, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, _______, /**/ _______, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, + _______, _______, _______, _______, _______, /**/ KC_BTN1, KC_BTN2, KC_BTN3, KC_MS_WH_UP, KC_MS_WH_DOWN), /* RAISE * ,----------------------------------------. ,-----------------------------------------. * | | | | | | | | | | | | | | @@ -88,7 +106,11 @@ * | | | | |/ / \ \ | | | | | * `----------------------------------' '------''---------------------------' */ - [3] = LAYOUT(_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_PSCR, KC_APP, XXXXXXX, XXXXXXX, KC_PGUP, _______, KC_UP, _______, _______, KC_BSPC, _______, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_CAPS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_BSPC, _______, KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, XXXXXXX, _______, _______, XXXXXXX, _______, XXXXXXX, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______)}; + [3] = LAYOUT(_______, _______, _______, _______, _______, _______, /**/ _______, _______, _______, _______, _______, _______, + _______, KC_INS, KC_PSCR, KC_APP, XXXXXXX, XXXXXXX, /**/ KC_PGUP, _______, KC_UP, _______, _______, KC_BSPC, + _______, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_CAPS, /**/ KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_BSPC, + _______, KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, XXXXXXX, _______, /**/ _______, XXXXXXX, _______, XXXXXXX, _______, XXXXXXX, _______, + _______, _______, _______, _______, KC_LPAD, /**/ _______, _______, _______, _______, _______)}; #ifdef RGB_MATRIX_ENABLE // Physical Layout diff --git a/lib/chibios b/lib/chibios index 257302333c31..0062927e3058 160000 --- a/lib/chibios +++ b/lib/chibios @@ -1 +1 @@ -Subproject commit 257302333c31f1f710800c2b97acf3550de043e1 +Subproject commit 0062927e3058a8b5ef587234bbd98d42fb4e595e diff --git a/lib/chibios-contrib b/lib/chibios-contrib index 2a6b73ff51ba..a224be155ae1 160000 --- a/lib/chibios-contrib +++ b/lib/chibios-contrib @@ -1 +1 @@ -Subproject commit 2a6b73ff51baf89083a220b6692a04ca2cae8750 +Subproject commit a224be155ae18d38deccf33a6c1d259b9a5ad8d3 diff --git a/lib/lufa b/lib/lufa index 19a5d533f02a..549b97320d51 160000 --- a/lib/lufa +++ b/lib/lufa @@ -1 +1 @@ -Subproject commit 19a5d533f02a7b46eeadca99cc9699659cef7a60 +Subproject commit 549b97320d515bfca2f95c145a67bd13be968faa diff --git a/lib/printf b/lib/printf index d3b984684bb8..c2e3b4e10d28 160000 --- a/lib/printf +++ b/lib/printf @@ -1 +1 @@ -Subproject commit d3b984684bb8a8bdc48cc7a1abecb93ce59bbe3e +Subproject commit c2e3b4e10d281e7f0f694d3ecbd9f320977288cc diff --git a/lib/vusb b/lib/vusb index bdb53e4c043d..819dbc1e5d59 160000 --- a/lib/vusb +++ b/lib/vusb @@ -1 +1 @@ -Subproject commit bdb53e4c043d089279d9891b68bea77614cb97ee +Subproject commit 819dbc1e5d5926b17e27e00ca6d3d2988adae04e From e188bf5819e6bdd745c5033832ab01993a022df7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Apr 2023 07:01:22 +0000 Subject: [PATCH 11/11] Bump peter-evans/create-pull-request from 4 to 5 Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 4 to 5. - [Release notes](https://github.com/peter-evans/create-pull-request/releases) - [Commits](https://github.com/peter-evans/create-pull-request/compare/v4...v5) --- updated-dependencies: - dependency-name: peter-evans/create-pull-request dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/format_push.yml | 2 +- .github/workflows/regen_push.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/format_push.yml b/.github/workflows/format_push.yml index 26e9f4edfb02..0a34245ac0dd 100644 --- a/.github/workflows/format_push.yml +++ b/.github/workflows/format_push.yml @@ -47,7 +47,7 @@ jobs: git config user.email 'hello@qmk.fm' - name: Create Pull Request - uses: peter-evans/create-pull-request@v4 + uses: peter-evans/create-pull-request@v5 if: ${{ github.repository == 'qmk/qmk_firmware'}} with: token: ${{ secrets.QMK_BOT_TOKEN }} diff --git a/.github/workflows/regen_push.yml b/.github/workflows/regen_push.yml index c56bc48a690c..2d77f6fdf2da 100644 --- a/.github/workflows/regen_push.yml +++ b/.github/workflows/regen_push.yml @@ -34,7 +34,7 @@ jobs: git config user.email 'hello@qmk.fm' - name: Create Pull Request - uses: peter-evans/create-pull-request@v4 + uses: peter-evans/create-pull-request@v5 if: ${{ github.repository == 'qmk/qmk_firmware'}} with: token: ${{ secrets.QMK_BOT_TOKEN }}