diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 8ecdf82059d4..af4fe6abde89 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -35,7 +35,7 @@ jobs: - name: Get changed files id: file_changes - uses: tj-actions/changed-files@v35 + uses: tj-actions/changed-files@v36 - name: Run qmk formatters shell: 'bash {0}' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 91932b323a4d..2b77e29a2838 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -27,7 +27,7 @@ jobs: - name: Get changed files id: file_changes - uses: tj-actions/changed-files@v35 + uses: tj-actions/changed-files@v36 - name: Print info run: | diff --git a/docs/feature_unicode.md b/docs/feature_unicode.md index 455596dab5e1..312a0332570e 100644 --- a/docs/feature_unicode.md +++ b/docs/feature_unicode.md @@ -42,7 +42,7 @@ Add the following to your `rules.mk`: UNICODEMAP_ENABLE = yes ``` -Then add `X(i)` keycodes to your keymap, where _i_ is the desired character's index in the mapping table. This can be a numeric value, but it's recommended to keep the indices in an enum and access them by name. +Then add `UM(i)` keycodes to your keymap, where _i_ is the desired character's index in the mapping table. This can be a numeric value, but it's recommended to keep the indices in an enum and access them by name. ```c enum unicode_names { @@ -58,13 +58,13 @@ const uint32_t unicode_map[] PROGMEM = { }; ``` -Then you can use `X(BANG)`, `X(SNEK)` etc. in your keymap. +Then you can use `UM(BANG)`, `UM(SNEK)` etc. in your keymap. #### Lower and Upper Case -Characters often come in lower and upper case pairs, such as å and Å. To make inputting these characters easier, you can use `XP(i, j)` in your keymap, where _i_ and _j_ are the mapping table indices of the lower and upper case character, respectively. If you're holding down Shift or have Caps Lock turned on when you press the key, the second (upper case) character will be inserted; otherwise, the first (lower case) version will appear. +Characters often come in lower and upper case pairs, such as å and Å. To make inputting these characters easier, you can use `UP(i, j)` in your keymap, where _i_ and _j_ are the mapping table indices of the lower and upper case character, respectively. If you're holding down Shift or have Caps Lock turned on when you press the key, the second (upper case) character will be inserted; otherwise, the first (lower case) version will appear. -This is most useful when creating a keymap for an international layout with special characters. Instead of having to put the lower and upper case versions of a character on separate keys, you can have them both on the same key by using `XP()`. This helps blend Unicode keys in with regular alphas. +This is most useful when creating a keymap for an international layout with special characters. Instead of having to put the lower and upper case versions of a character on separate keys, you can have them both on the same key by using `UP()`. This helps blend Unicode keys in with regular alphas. Due to keycode size constraints, _i_ and _j_ can each only refer to one of the first 128 characters in your `unicode_map`. In other words, 0 ≤ _i_ ≤ 127 and 0 ≤ _j_ ≤ 127. This is enough for most use cases, but if you'd like to customize the index calculation, you can override the [`unicodemap_index()`](https://github.com/qmk/qmk_firmware/blob/71f640d47ee12c862c798e1f56392853c7b1c1a8/quantum/process_keycode/process_unicodemap.c#L36) function. This also allows you to, say, check Ctrl instead of Shift/Caps. diff --git a/docs/getting_started_make_guide.md b/docs/getting_started_make_guide.md index 1a7e276098a7..3d98e4602b48 100644 --- a/docs/getting_started_make_guide.md +++ b/docs/getting_started_make_guide.md @@ -109,7 +109,7 @@ This allows you to send Unicode characters using `UC()` in your keym `UNICODEMAP_ENABLE` -This allows you to send Unicode characters using `X()` in your keymap. You will need to maintain a mapping table in your keymap file. All possible code points (up to `0x10FFFF`) are supported. +This allows you to send Unicode characters using `UM()` in your keymap. You will need to maintain a mapping table in your keymap file. All possible code points (up to `0x10FFFF`) are supported. `UCIS_ENABLE` diff --git a/docs/keycodes.md b/docs/keycodes.md index e5b6246af794..65762234a448 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -848,8 +848,8 @@ See also: [Unicode Support](feature_unicode.md) |Key |Aliases |Description | |----------------------------|---------|----------------------------------------------------------------| |`UC(c)` | |Send Unicode code point `c`, up to `0x7FFF` | -|`X(i)` | |Send Unicode code point at index `i` in `unicode_map` | -|`XP(i, j)` | |Send Unicode code point at index `i`, or `j` if Shift/Caps is on| +|`UM(i)` | |Send Unicode code point at index `i` in `unicode_map` | +|`UP(i, j)` | |Send Unicode code point at index `i`, or `j` if Shift/Caps is on| |`QK_UNICODE_MODE_NEXT` |`UC_NEXT`|Cycle through selected input modes | |`QK_UNICODE_MODE_PREVIOUS` |`UC_PREV`|Cycle through selected input modes in reverse | |`QK_UNICODE_MODE_MACOS` |`UC_MAC` |Switch to macOS input | diff --git a/docs/tap_hold.md b/docs/tap_hold.md index cdc1cfeca79e..c50acdb84d86 100644 --- a/docs/tap_hold.md +++ b/docs/tap_hold.md @@ -296,7 +296,7 @@ However, this slightly different sequence will not be affected by the “permiss In the sequence above the dual-role key is released before the other key is released, and if that happens within the tapping term, the “permissive hold” mode will still choose the tap action for the dual-role key, and the sequence will be registered as `al` by the host. We could describe this as a “rolling press” (the two keys' key down and key up events behave as if you were rolling a ball across the two keys, first pressing each key down in sequence and then releasing them in the same order). -?> The `PERMISSIVE_HOLD` option is not noticeable if you also enable `HOLD_ON_OTHER_KEY_PRESS` because the latter option considers both the “nested tap” and “rolling press” sequences like shown above as a hold action, not the tap action. `HOLD_ON_OTHER_KEY_PRESS` makes the Tap-Or-Hold decision earlier in the chain of key events, thus taking a precedence over `PERMISSIVE_HOLD`. This remark also applies to default mod-taps. +?> The `PERMISSIVE_HOLD` option is not noticeable if you also enable `HOLD_ON_OTHER_KEY_PRESS` because the latter option considers both the “nested tap” and “rolling press” sequences like shown above as a hold action, not the tap action. `HOLD_ON_OTHER_KEY_PRESS` makes the Tap-Or-Hold decision earlier in the chain of key events, thus taking a precedence over `PERMISSIVE_HOLD`. For more granular control of this feature, you can add the following to your `config.h`: @@ -352,8 +352,6 @@ An example of a sequence that is affected by the “hold on other key press” m Normally, if you do all this within the `TAPPING_TERM` (default: 200ms), this will be registered as `al` by the firmware and host system. With the `HOLD_ON_OTHER_KEY_PRESS` option enabled, the Layer Tap key is considered as a layer switch if another key is pressed, and the above sequence would be registered as `KC_RGHT` (the mapping of `L` on layer 2). -?> The `HOLD_ON_OTHER_KEY_PRESS` option is essentially redundant with the default mod-tap behaviour. The only notable difference is that `HOLD_ON_OTHER_KEY_PRESS` reduces the delay before the key events are made visible to the host. - For more granular control of this feature, you can add the following to your `config.h`: ```c diff --git a/keyboards/a_dux/keymaps/daliusd/keymap.c b/keyboards/a_dux/keymaps/daliusd/keymap.c index 7dec77b01e45..dcc41a36ee2c 100644 --- a/keyboards/a_dux/keymaps/daliusd/keymap.c +++ b/keyboards/a_dux/keymaps/daliusd/keymap.c @@ -126,28 +126,28 @@ const uint32_t unicode_map[] PROGMEM = { [LT_CB] = 0x201c, // “ }; -#define K_SNEK X(SNEK) -#define K_EURO X(EURO) -#define K_LT_A XP(LT_S_A, LT_L_A) -#define K_LT_AU X(LT_L_A) -#define K_LT_C XP(LT_S_C, LT_L_C) -#define K_LT_CU X(LT_L_C) -#define K_LT_E1 XP(LT_S_E1, LT_L_E1) -#define K_LT_E1U X(LT_L_E1) -#define K_LT_E2 XP(LT_S_E2, LT_L_E2) -#define K_LT_E2U X(LT_L_E2) -#define K_LT_I XP(LT_S_I, LT_L_I) -#define K_LT_IU X(LT_L_I) -#define K_LT_S XP(LT_S_S, LT_L_S) -#define K_LT_SU X(LT_L_S) -#define K_LT_U1 XP(LT_S_U1, LT_L_U1) -#define K_LT_U1U X(LT_L_U1) -#define K_LT_U2 XP(LT_S_U2, LT_L_U2) -#define K_LT_U2U X(LT_L_U2) -#define K_LT_Z XP(LT_S_Z, LT_L_Z) -#define K_LT_ZU X(LT_L_Z) -#define K_LT_OB X(LT_OB) -#define K_LT_CB X(LT_CB) +#define K_SNEK UM(SNEK) +#define K_EURO UM(EURO) +#define K_LT_A UP(LT_S_A, LT_L_A) +#define K_LT_AU UM(LT_L_A) +#define K_LT_C UP(LT_S_C, LT_L_C) +#define K_LT_CU UM(LT_L_C) +#define K_LT_E1 UP(LT_S_E1, LT_L_E1) +#define K_LT_E1U UM(LT_L_E1) +#define K_LT_E2 UP(LT_S_E2, LT_L_E2) +#define K_LT_E2U UM(LT_L_E2) +#define K_LT_I UP(LT_S_I, LT_L_I) +#define K_LT_IU UM(LT_L_I) +#define K_LT_S UP(LT_S_S, LT_L_S) +#define K_LT_SU UM(LT_L_S) +#define K_LT_U1 UP(LT_S_U1, LT_L_U1) +#define K_LT_U1U UM(LT_L_U1) +#define K_LT_U2 UP(LT_S_U2, LT_L_U2) +#define K_LT_U2U UM(LT_L_U2) +#define K_LT_Z UP(LT_S_Z, LT_L_Z) +#define K_LT_ZU UM(LT_L_Z) +#define K_LT_OB UM(LT_OB) +#define K_LT_CB UM(LT_CB) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/abacus/keymaps/unicodemap/keymap.c b/keyboards/abacus/keymaps/unicodemap/keymap.c index 0e6ab0d6479b..46e2219f0bd1 100644 --- a/keyboards/abacus/keymaps/unicodemap/keymap.c +++ b/keyboards/abacus/keymaps/unicodemap/keymap.c @@ -76,7 +76,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LOWER] = LAYOUT( NICKURL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, KC_F11, KC_F12, RGB_MODE_PLAIN, RGB_MODE_BREATHE, RGB_MODE_RAINBOW, RGB_MODE_SWIRL, RGB_MODE_SNAKE, RGB_MODE_KNIGHT, RGB_MODE_GRADIENT, XXXXXXX, RGB_TOG, - _______, X(LOVEEYES), X(THINK), X(UPSIDEDOWN), X(NOMOUTH), X(PARTY), X(PEACH), X(HEART), X(EGGPLANT), X(EMOJI100), X(EMOJIB), RGB_HUI, + _______, UM(LOVEEYES), UM(THINK), UM(UPSIDEDOWN), UM(NOMOUTH), UM(PARTY), UM(PEACH), UM(HEART), UM(EGGPLANT), UM(EMOJI100), UM(EMOJIB), RGB_HUI, KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______ ) diff --git a/keyboards/adafruit/macropad/keymaps/drashna/config.h b/keyboards/adafruit/macropad/keymaps/drashna/config.h new file mode 100644 index 000000000000..4d85f039bea6 --- /dev/null +++ b/keyboards/adafruit/macropad/keymaps/drashna/config.h @@ -0,0 +1,7 @@ +// Copyright 2023 Christopher Courtney, aka Drashna Jael're (@drashna) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64 +#define TAPPING_TERM 499 diff --git a/keyboards/adafruit/macropad/keymaps/drashna/keymap.c b/keyboards/adafruit/macropad/keymaps/drashna/keymap.c new file mode 100644 index 000000000000..d87e4afd6671 --- /dev/null +++ b/keyboards/adafruit/macropad/keymaps/drashna/keymap.c @@ -0,0 +1,100 @@ +// Copyright 2023 Christopher Courtney, aka Drashna Jael're (@drashna) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "drashna.h" + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + LT(1,KC_MUTE), + KC_ENT, KC_0, KC_BSPC, + KC_7, KC_8, KC_9, + KC_4, KC_5, KC_6, + KC_1, KC_2, KC_3 + ), + [1] = LAYOUT( + _______, + CK_TOGG, AU_TOGG, _______, + _______, _______, _______, + _______, _______, _______, + _______, _______, _______ + ), +}; +// clang-format on + +#ifdef ENCODER_MAP_ENABLE +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [0] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)}, + [1] = {ENCODER_CCW_CW(RGB_RMOD, RGB_MOD)}, +}; +#endif + +void render_oled_title(bool side) { + oled_write_P(PSTR(" Macropad "), true); +} + +void render_rgb_mode(uint8_t col, uint8_t line); + +void l_render_keylock_status(led_t led_usb_state, uint8_t col, uint8_t line) { + oled_set_cursor(col, line); +#ifdef CAPS_WORD_ENABLE + led_usb_state.caps_lock |= is_caps_word_on(); +#endif + oled_write_P(PSTR(OLED_RENDER_LOCK_NUML), led_usb_state.num_lock); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR(OLED_RENDER_LOCK_CAPS), led_usb_state.caps_lock); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR(OLED_RENDER_LOCK_SCLK), led_usb_state.scroll_lock); +} + +bool oled_task_keymap(void) { + oled_write_raw_P(header_image, sizeof(header_image)); + oled_set_cursor(0, 1); + oled_write_raw_P(row_2_image, sizeof(row_2_image)); + oled_set_cursor(4, 0); + render_oled_title(false); + + render_kitty(0, 2); + render_matrix_scan_rate(1, 7, 2); + +#ifdef AUDIO_ENABLE + oled_set_cursor(7, 4); + bool l_is_audio_on = is_audio_on(); + + static const char PROGMEM audio_status[2][3] = {{0xE0, 0xE1, 0}, {0xE2, 0xE3, 0}}; + oled_write_P(audio_status[l_is_audio_on], false); + +# ifdef AUDIO_CLICKY + bool l_is_clicky_on = is_clicky_on(); + static const char PROGMEM audio_clicky_status[2][3] = {{0xF4, 0xF5, 0}, {0xF6, 0xF7, 0}}; + oled_write_P(audio_clicky_status[l_is_clicky_on && l_is_audio_on], false); +# endif +#endif + + static const char PROGMEM cat_mode[3] = {0xF8, 0xF9, 0}; + oled_write_P(cat_mode, get_keyboard_lock()); + +#ifdef RGB_MATIRX_ENABLE + static const char PROGMEM rgb_layer_status[2][3] = {{0xEE, 0xEF, 0}, {0xF0, 0xF1, 0}}; + oled_write_P(rgb_layer_status[rgb_matrix_is_enabled()], false); +#endif + +#ifdef HAPTIC_ENABLE + static const char PROGMEM nukem_good[2] = {0xFA, 0}; + oled_write_P(haptic_get_enable() ? nukem_good : PSTR(" "), false); +#endif + + l_render_keylock_status(host_keyboard_led_state(), 7, 5); + render_rgb_mode(1, 6); + + for (uint8_t i = 1; i < 7; i++) { + oled_set_cursor(0, i); + oled_write_raw_P(display_border, sizeof(display_border)); + oled_set_cursor(21, i); + oled_write_raw_P(display_border, sizeof(display_border)); + } + oled_set_cursor(0, 7); + oled_write_raw_P(footer_image, sizeof(footer_image)); + + return false; +} diff --git a/keyboards/adafruit/macropad/keymaps/drashna/rules.mk b/keyboards/adafruit/macropad/keymaps/drashna/rules.mk new file mode 100644 index 000000000000..ea090a575665 --- /dev/null +++ b/keyboards/adafruit/macropad/keymaps/drashna/rules.mk @@ -0,0 +1,3 @@ +ENCODER_MAP_ENABLE = yes +DEBUG_MATRIX_SCAN_RATE_ENABLE = api +WPM_ENABLE = yes diff --git a/keyboards/atreus/keymaps/ridingqwerty/keymap.c b/keyboards/atreus/keymaps/ridingqwerty/keymap.c index 1eeb17fd1751..9b0826402ec8 100644 --- a/keyboards/atreus/keymaps/ridingqwerty/keymap.c +++ b/keyboards/atreus/keymaps/ridingqwerty/keymap.c @@ -46,7 +46,7 @@ { K75, K74, K73, K72, K71, K70 } \ } -//#define ALPHA XP(UCM_LDEL, UCM_UDEL) +//#define ALPHA UP(UCM_LDEL, UCM_UDEL) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_atreus_wrapper( /* Qwerty */ diff --git a/keyboards/bastardkb/charybdis/3x5/keymaps/drashna/keymap.c b/keyboards/bastardkb/charybdis/3x5/keymaps/drashna/keymap.c index 02cb89fe6524..e458a8437334 100644 --- a/keyboards/bastardkb/charybdis/3x5/keymaps/drashna/keymap.c +++ b/keyboards/bastardkb/charybdis/3x5/keymaps/drashna/keymap.c @@ -82,29 +82,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { EE_CLR, KC_NUKE, _______, _______, QK_BOOT ), }; - -#if defined(KEYBOARD_bastardkb_charybdis_3x5_blackpill) -void keyboard_pre_init_keymap(void) { - setPinInputHigh(A0); -} - -void housekeeping_task_keymap(void) { - if (!readPin(A0)) { - reset_keyboard(); - } -} - -# ifdef USB_VBUS_PIN -bool usb_vbus_state(void) { - setPinInputLow(USB_VBUS_PIN); - wait_us(5); - return readPin(USB_VBUS_PIN); -} -# endif - -void matrix_output_unselect_delay(uint8_t line, bool key_pressed) { - for (int32_t i = 0; i < 40; i++) { - __asm__ volatile("nop" ::: "memory"); - } -} -#endif diff --git a/keyboards/bastardkb/charybdis/3x5/keymaps/drashna/rules.mk b/keyboards/bastardkb/charybdis/3x5/keymaps/drashna/rules.mk index ff4ede45cac6..029b4a498b30 100644 --- a/keyboards/bastardkb/charybdis/3x5/keymaps/drashna/rules.mk +++ b/keyboards/bastardkb/charybdis/3x5/keymaps/drashna/rules.mk @@ -40,6 +40,4 @@ ifeq ($(strip $(OVERLOAD_FEATURES)), yes) CUSTOM_UNICODE_ENABLE = yes CUSTOM_POINTING_DEVICE = yes CUSTOM_SPLIT_TRANSPORT_SYNC = yes - - DEBOUNCE_TYPE = asym_eager_defer_pk endif diff --git a/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/config.h b/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/config.h index 07c4bfc008e2..7fa982612550 100644 --- a/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/config.h +++ b/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/config.h @@ -65,3 +65,5 @@ #define BOOTMAGIC_LITE_EEPROM_COLUMN 0 #define BOOTMAGIC_LITE_EEPROM_ROW_RIGHT 1 #define BOOTMAGIC_LITE_EEPROM_COLUMN_RIGHT 0 + +#define DEBOUNCE 15 diff --git a/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/keymap.c b/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/keymap.c index 85bb2bc77fc5..31d1e92a7fb8 100644 --- a/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/keymap.c +++ b/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/keymap.c @@ -83,7 +83,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { SFT_T(KC_SPACE), ALT_T(KC_Q), _______ ), [_MOUSE] = LAYOUT_charybdis_4x6( - _______, _______, _______, _______, _______, _______, _______, DPI_RMOD,DPI_MOD, S_D_RMOD,S_D_MOD, _______, + _______, _______, _______, _______, _______, _______, _______, DPI_RMOD,DPI_MOD, S_D_RMOD,S_D_MOD, PD_JIGGLER, _______, _______, _______, _______, _______, _______, KC_WH_U, _______, _______, _______, _______, DRGSCRL, _______, _______, _______, _______, _______, _______, KC_WH_D, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN6, SNIPING, _______, _______, _______, _______, _______, _______, KC_BTN7, KC_BTN4, KC_BTN5, KC_BTN8, _______, _______, @@ -130,28 +130,6 @@ void keyboard_post_init_keymap(void) { void keyboard_pre_init_keymap(void) { setPinInputHigh(A0); } - -void housekeeping_task_keymap(void) { - if (!readPin(A0)) { - reset_keyboard(); - } -} -#endif - -#ifdef USB_VBUS_PIN -bool usb_vbus_state(void) { - setPinInputLow(USB_VBUS_PIN); - wait_us(5); - return readPin(USB_VBUS_PIN); -} -#endif - -#if defined(KEYBOARD_bastardkb_charybdis_4x6_blackpill) -void matrix_output_unselect_delay(uint8_t line, bool key_pressed) { - for (int32_t i = 0; i < 40; i++) { - __asm__ volatile("nop" ::: "memory"); - } -} #endif #ifdef SWAP_HANDS_ENABLE diff --git a/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/rules.mk b/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/rules.mk index 0b7759f1569b..ef6b7cd24b86 100644 --- a/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/rules.mk +++ b/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/rules.mk @@ -1,6 +1,7 @@ CUSTOM_UNICODE_ENABLE = no CUSTOM_POINTING_DEVICE = no CUSTOM_SPLIT_TRANSPORT_SYNC = no +PER_KEY_TAPPING = yes ifeq ($(strip $(KEYBOARD)), bastardkb/charybdis/4x6/blackpill) # MCU name @@ -16,16 +17,13 @@ ifeq ($(strip $(KEYBOARD)), bastardkb/charybdis/4x6/blackpill) OVERLOAD_FEATURES = yes endif -ifeq ($(strip $(KEYBOARD)), bastardkb/charybdis/4x6/v2/stemcell) - OVERLOAD_FEATURES = yes -endif -ifeq ($(strip $(KEYBOARD)), bastardkb/charybdis/4x6/v2/splinky) - OVERLOAD_FEATURES = yes -endif ifeq ($(strip $(MCU)), atmega32u4) LTO_ENABLE = yes BOOTLOADER = qmk-hid BOOTLOADER_SIZE = 512 + EXTRAKEY_ENABLE = no +else + OVERLOAD_FEATURES = yes endif ifeq ($(strip $(OVERLOAD_FEATURES)), yes) @@ -43,7 +41,6 @@ ifeq ($(strip $(OVERLOAD_FEATURES)), yes) CAPS_WORD_ENABLE = yes SWAP_HANDS_ENABLE = yes TAP_DANCE_ENABLE = yes - DEBOUNCE_TYPE = asym_eager_defer_pk WPM_ENABLE = yes LTO_ENABLE = no # OPT = 3 diff --git a/keyboards/bastardkb/dilemma/3x5_2/keymaps/drashna/config.h b/keyboards/bastardkb/dilemma/3x5_2/keymaps/drashna/config.h index d7b1351d89aa..7c46c833102f 100644 --- a/keyboards/bastardkb/dilemma/3x5_2/keymaps/drashna/config.h +++ b/keyboards/bastardkb/dilemma/3x5_2/keymaps/drashna/config.h @@ -6,3 +6,5 @@ #define CIRQUE_PINNACLE_TAP_ENABLE #define POINTING_DEVICE_GESTURES_CURSOR_GLIDE_ENABLE #define POINTING_DEVICE_GESTURES_SCROLL_ENABLE + +#define OLED_DISPLAY_128X128 diff --git a/keyboards/bastardkb/dilemma/3x5_2/keymaps/drashna/keymap.c b/keyboards/bastardkb/dilemma/3x5_2/keymaps/drashna/keymap.c index d80d00679662..bf75e97841b0 100644 --- a/keyboards/bastardkb/dilemma/3x5_2/keymaps/drashna/keymap.c +++ b/keyboards/bastardkb/dilemma/3x5_2/keymaps/drashna/keymap.c @@ -84,14 +84,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; - -void matrix_output_unselect_delay(uint8_t line, bool key_pressed) { - for (int32_t i = 0; i < 40; i++) { - __asm__ volatile("nop" ::: "memory"); - } -} - - #if defined(OLED_ENABLE) && defined(OLED_DISPLAY_128X128) # ifdef UNICODE_COMMON_ENABLE # include "process_unicode_common.h" @@ -100,8 +92,6 @@ void matrix_output_unselect_delay(uint8_t line, bool key_pressed) { extern const char PROGMEM display_border[3]; - -extern uint32_t oled_timer; extern bool is_oled_enabled; diff --git a/keyboards/bastardkb/dilemma/3x5_2/keymaps/drashna/rules.mk b/keyboards/bastardkb/dilemma/3x5_2/keymaps/drashna/rules.mk index 41d73bc49ae1..a1be9cb8fd14 100644 --- a/keyboards/bastardkb/dilemma/3x5_2/keymaps/drashna/rules.mk +++ b/keyboards/bastardkb/dilemma/3x5_2/keymaps/drashna/rules.mk @@ -5,4 +5,3 @@ CONSOLE_ENABLE = yes KEYLOGGER_ENABLE = no WPM_ENABLE = yes OLED_ENABLE = yes -OLED_DRIVER = custom diff --git a/keyboards/cablecardesigns/phoenix/info.json b/keyboards/cablecardesigns/phoenix/info.json new file mode 100755 index 000000000000..effa8836b9b8 --- /dev/null +++ b/keyboards/cablecardesigns/phoenix/info.json @@ -0,0 +1,497 @@ +{ + "keyboard_name": "Phoenix", + "manufacturer": "Yiancar-Designs", + "maintainer": "Yiancar-Designs", + "url": "https://yiancar-designs.com", + "processor": "STM32F072", + "bootloader": "stm32-dfu", + "diode_direction": "COL2ROW", + "matrix_pins": { + "cols": ["A1", "B9", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "B2", "B10", "B11", "B12", "B13", "B14", "B15", "A8"], + "rows": ["A2", "A14", "A15", "B3", "B4", "B5"] + }, + "usb": { + "vid": "0x8968", + "pid": "0x5048", + "device_version": "0.0.1" + }, + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "indicators": { + "caps_lock": "B6", + "on_state": 0 + }, + "community_layouts": ["tkl_f13_ansi_tsangan", "tkl_f13_ansi_tsangan_split_bs_rshift", "tkl_f13_iso_tsangan", "tkl_f13_iso_tsangan_split_bs_rshift"], + "layouts": { + "LAYOUT_all": { + "layout": [ + { "matrix": [0, 0], "x": 0, "y": 0 }, + { "matrix": [0, 1], "x": 1.25, "y": 0 }, + { "matrix": [0, 2], "x": 2.25, "y": 0 }, + { "matrix": [0, 3], "x": 3.25, "y": 0 }, + { "matrix": [0, 4], "x": 4.25, "y": 0 }, + { "matrix": [0, 5], "x": 5.5, "y": 0 }, + { "matrix": [0, 6], "x": 6.5, "y": 0 }, + { "matrix": [0, 7], "x": 7.5, "y": 0 }, + { "matrix": [0, 8], "x": 8.5, "y": 0 }, + { "matrix": [0, 9], "x": 9.75, "y": 0 }, + { "matrix": [0, 10], "x": 10.75, "y": 0 }, + { "matrix": [0, 11], "x": 11.75, "y": 0 }, + { "matrix": [0, 12], "x": 12.75, "y": 0 }, + { "matrix": [0, 13], "x": 14, "y": 0 }, + { "matrix": [0, 14], "x": 15.25, "y": 0 }, + { "matrix": [0, 15], "x": 16.25, "y": 0 }, + { "matrix": [0, 16], "x": 17.25, "y": 0 }, + { "matrix": [1, 0], "x": 0, "y": 1.25 }, + { "matrix": [1, 1], "x": 1, "y": 1.25 }, + { "matrix": [1, 2], "x": 2, "y": 1.25 }, + { "matrix": [1, 3], "x": 3, "y": 1.25 }, + { "matrix": [1, 4], "x": 4, "y": 1.25 }, + { "matrix": [1, 5], "x": 5, "y": 1.25 }, + { "matrix": [1, 6], "x": 6, "y": 1.25 }, + { "matrix": [1, 7], "x": 7, "y": 1.25 }, + { "matrix": [1, 8], "x": 8, "y": 1.25 }, + { "matrix": [1, 9], "x": 9, "y": 1.25 }, + { "matrix": [1, 10], "x": 10, "y": 1.25 }, + { "matrix": [1, 11], "x": 11, "y": 1.25 }, + { "matrix": [1, 12], "x": 12, "y": 1.25 }, + { "matrix": [1, 13], "x": 13, "y": 1.25 }, + { "matrix": [2, 13], "x": 14, "y": 1.25 }, + { "matrix": [1, 14], "x": 15.25, "y": 1.25 }, + { "matrix": [1, 15], "x": 16.25, "y": 1.25 }, + { "matrix": [1, 16], "x": 17.25, "y": 1.25 }, + { "matrix": [2, 0], "x": 0, "y": 2.25 }, + { "matrix": [2, 1], "x": 1.5, "y": 2.25 }, + { "matrix": [2, 2], "x": 2.5, "y": 2.25 }, + { "matrix": [2, 3], "x": 3.5, "y": 2.25 }, + { "matrix": [2, 4], "x": 4.5, "y": 2.25 }, + { "matrix": [2, 5], "x": 5.5, "y": 2.25 }, + { "matrix": [2, 6], "x": 6.5, "y": 2.25 }, + { "matrix": [2, 7], "x": 7.5, "y": 2.25 }, + { "matrix": [2, 8], "x": 8.5, "y": 2.25 }, + { "matrix": [2, 9], "x": 9.5, "y": 2.25 }, + { "matrix": [2, 10], "x": 10.5, "y": 2.25 }, + { "matrix": [2, 11], "x": 11.5, "y": 2.25 }, + { "matrix": [2, 12], "x": 12.5, "y": 2.25 }, + { "matrix": [3, 12], "x": 13.5, "y": 2.25 }, + { "matrix": [2, 14], "x": 15.25, "y": 2.25 }, + { "matrix": [2, 15], "x": 16.25, "y": 2.25 }, + { "matrix": [2, 16], "x": 17.25, "y": 2.25 }, + { "matrix": [3, 0], "x": 0, "y": 3.25 }, + { "matrix": [3, 1], "x": 1.75, "y": 3.25 }, + { "matrix": [3, 2], "x": 2.75, "y": 3.25 }, + { "matrix": [3, 3], "x": 3.75, "y": 3.25 }, + { "matrix": [3, 4], "x": 4.75, "y": 3.25 }, + { "matrix": [3, 5], "x": 5.75, "y": 3.25 }, + { "matrix": [3, 6], "x": 6.75, "y": 3.25 }, + { "matrix": [3, 7], "x": 7.75, "y": 3.25 }, + { "matrix": [3, 8], "x": 8.75, "y": 3.25 }, + { "matrix": [3, 9], "x": 9.75, "y": 3.25 }, + { "matrix": [3, 10], "x": 10.75, "y": 3.25 }, + { "matrix": [3, 11], "x": 11.75, "y": 3.25 }, + { "matrix": [3, 13], "x": 12.75, "y": 3.25 }, + { "matrix": [4, 0], "x": 0, "y": 4.25 }, + { "matrix": [4, 1], "x": 1.25, "y": 4.25 }, + { "matrix": [4, 2], "x": 2.25, "y": 4.25 }, + { "matrix": [4, 3], "x": 3.25, "y": 4.25 }, + { "matrix": [4, 4], "x": 4.25, "y": 4.25 }, + { "matrix": [4, 5], "x": 5.25, "y": 4.25 }, + { "matrix": [4, 6], "x": 6.25, "y": 4.25 }, + { "matrix": [4, 7], "x": 7.25, "y": 4.25 }, + { "matrix": [4, 8], "x": 8.25, "y": 4.25 }, + { "matrix": [4, 9], "x": 9.25, "y": 4.25 }, + { "matrix": [4, 10], "x": 10.25, "y": 4.25 }, + { "matrix": [4, 11], "x": 11.25, "y": 4.25 }, + { "matrix": [4, 12], "x": 12.25, "y": 4.25 }, + { "matrix": [4, 13], "x": 14, "y": 4.25 }, + { "matrix": [4, 15], "x": 16.25, "y": 4.25 }, + { "matrix": [5, 0], "x": 0, "y": 5.25 }, + { "matrix": [5, 1], "x": 1.5, "y": 5.25 }, + { "matrix": [5, 2], "x": 2.5, "y": 5.25 }, + { "matrix": [5, 6], "x": 4, "y": 5.25 }, + { "matrix": [5, 11], "x": 11, "y": 5.25 }, + { "matrix": [5, 12], "x": 12.5, "y": 5.25 }, + { "matrix": [5, 13], "x": 13.5, "y": 5.25 }, + { "matrix": [5, 14], "x": 15.25, "y": 5.25 }, + { "matrix": [5, 15], "x": 16.25, "y": 5.25 }, + { "matrix": [5, 16], "x": 17.25, "y": 5.25 } + ] + }, + "LAYOUT_tkl_f13_ansi_tsangan": { + "layout": [ + { "matrix": [0, 0], "x": 0, "y": 0 }, + { "matrix": [0, 1], "x": 1.25, "y": 0 }, + { "matrix": [0, 2], "x": 2.25, "y": 0 }, + { "matrix": [0, 3], "x": 3.25, "y": 0 }, + { "matrix": [0, 4], "x": 4.25, "y": 0 }, + { "matrix": [0, 5], "x": 5.5, "y": 0 }, + { "matrix": [0, 6], "x": 6.5, "y": 0 }, + { "matrix": [0, 7], "x": 7.5, "y": 0 }, + { "matrix": [0, 8], "x": 8.5, "y": 0 }, + { "matrix": [0, 9], "x": 9.75, "y": 0 }, + { "matrix": [0, 10], "x": 10.75, "y": 0 }, + { "matrix": [0, 11], "x": 11.75, "y": 0 }, + { "matrix": [0, 12], "x": 12.75, "y": 0 }, + { "matrix": [0, 13], "x": 14, "y": 0 }, + { "matrix": [0, 14], "x": 15.25, "y": 0 }, + { "matrix": [0, 15], "x": 16.25, "y": 0 }, + { "matrix": [0, 16], "x": 17.25, "y": 0 }, + { "matrix": [1, 0], "x": 0, "y": 1.25 }, + { "matrix": [1, 1], "x": 1, "y": 1.25 }, + { "matrix": [1, 2], "x": 2, "y": 1.25 }, + { "matrix": [1, 3], "x": 3, "y": 1.25 }, + { "matrix": [1, 4], "x": 4, "y": 1.25 }, + { "matrix": [1, 5], "x": 5, "y": 1.25 }, + { "matrix": [1, 6], "x": 6, "y": 1.25 }, + { "matrix": [1, 7], "x": 7, "y": 1.25 }, + { "matrix": [1, 8], "x": 8, "y": 1.25 }, + { "matrix": [1, 9], "x": 9, "y": 1.25 }, + { "matrix": [1, 10], "x": 10, "y": 1.25 }, + { "matrix": [1, 11], "x": 11, "y": 1.25 }, + { "matrix": [1, 12], "x": 12, "y": 1.25 }, + { "matrix": [1, 13], "x": 13, "y": 1.25 }, + { "matrix": [1, 14], "x": 15.25, "y": 1.25 }, + { "matrix": [1, 15], "x": 16.25, "y": 1.25 }, + { "matrix": [1, 16], "x": 17.25, "y": 1.25 }, + { "matrix": [2, 0], "x": 0, "y": 2.25 }, + { "matrix": [2, 1], "x": 1.5, "y": 2.25 }, + { "matrix": [2, 2], "x": 2.5, "y": 2.25 }, + { "matrix": [2, 3], "x": 3.5, "y": 2.25 }, + { "matrix": [2, 4], "x": 4.5, "y": 2.25 }, + { "matrix": [2, 5], "x": 5.5, "y": 2.25 }, + { "matrix": [2, 6], "x": 6.5, "y": 2.25 }, + { "matrix": [2, 7], "x": 7.5, "y": 2.25 }, + { "matrix": [2, 8], "x": 8.5, "y": 2.25 }, + { "matrix": [2, 9], "x": 9.5, "y": 2.25 }, + { "matrix": [2, 10], "x": 10.5, "y": 2.25 }, + { "matrix": [2, 11], "x": 11.5, "y": 2.25 }, + { "matrix": [2, 12], "x": 12.5, "y": 2.25 }, + { "matrix": [3, 12], "x": 13.5, "y": 2.25 }, + { "matrix": [2, 14], "x": 15.25, "y": 2.25 }, + { "matrix": [2, 15], "x": 16.25, "y": 2.25 }, + { "matrix": [2, 16], "x": 17.25, "y": 2.25 }, + { "matrix": [3, 0], "x": 0, "y": 3.25 }, + { "matrix": [3, 1], "x": 1.75, "y": 3.25 }, + { "matrix": [3, 2], "x": 2.75, "y": 3.25 }, + { "matrix": [3, 3], "x": 3.75, "y": 3.25 }, + { "matrix": [3, 4], "x": 4.75, "y": 3.25 }, + { "matrix": [3, 5], "x": 5.75, "y": 3.25 }, + { "matrix": [3, 6], "x": 6.75, "y": 3.25 }, + { "matrix": [3, 7], "x": 7.75, "y": 3.25 }, + { "matrix": [3, 8], "x": 8.75, "y": 3.25 }, + { "matrix": [3, 9], "x": 9.75, "y": 3.25 }, + { "matrix": [3, 10], "x": 10.75, "y": 3.25 }, + { "matrix": [3, 11], "x": 11.75, "y": 3.25 }, + { "matrix": [3, 13], "x": 12.75, "y": 3.25 }, + { "matrix": [4, 0], "x": 0, "y": 4.25 }, + { "matrix": [4, 2], "x": 2.25, "y": 4.25 }, + { "matrix": [4, 3], "x": 3.25, "y": 4.25 }, + { "matrix": [4, 4], "x": 4.25, "y": 4.25 }, + { "matrix": [4, 5], "x": 5.25, "y": 4.25 }, + { "matrix": [4, 6], "x": 6.25, "y": 4.25 }, + { "matrix": [4, 7], "x": 7.25, "y": 4.25 }, + { "matrix": [4, 8], "x": 8.25, "y": 4.25 }, + { "matrix": [4, 9], "x": 9.25, "y": 4.25 }, + { "matrix": [4, 10], "x": 10.25, "y": 4.25 }, + { "matrix": [4, 11], "x": 11.25, "y": 4.25 }, + { "matrix": [4, 12], "x": 12.25, "y": 4.25 }, + { "matrix": [4, 15], "x": 16.25, "y": 4.25 }, + { "matrix": [5, 0], "x": 0, "y": 5.25 }, + { "matrix": [5, 1], "x": 1.5, "y": 5.25 }, + { "matrix": [5, 2], "x": 2.5, "y": 5.25 }, + { "matrix": [5, 6], "x": 4, "y": 5.25 }, + { "matrix": [5, 11], "x": 11, "y": 5.25 }, + { "matrix": [5, 12], "x": 12.5, "y": 5.25 }, + { "matrix": [5, 13], "x": 13.5, "y": 5.25 }, + { "matrix": [5, 14], "x": 15.25, "y": 5.25 }, + { "matrix": [5, 15], "x": 16.25, "y": 5.25 }, + { "matrix": [5, 16], "x": 17.25, "y": 5.25 } + ] + }, + "LAYOUT_tkl_f13_ansi_tsangan_split_bs_rshift": { + "layout": [ + { "matrix": [0, 0], "x": 0, "y": 0 }, + { "matrix": [0, 1], "x": 1.25, "y": 0 }, + { "matrix": [0, 2], "x": 2.25, "y": 0 }, + { "matrix": [0, 3], "x": 3.25, "y": 0 }, + { "matrix": [0, 4], "x": 4.25, "y": 0 }, + { "matrix": [0, 5], "x": 5.5, "y": 0 }, + { "matrix": [0, 6], "x": 6.5, "y": 0 }, + { "matrix": [0, 7], "x": 7.5, "y": 0 }, + { "matrix": [0, 8], "x": 8.5, "y": 0 }, + { "matrix": [0, 9], "x": 9.75, "y": 0 }, + { "matrix": [0, 10], "x": 10.75, "y": 0 }, + { "matrix": [0, 11], "x": 11.75, "y": 0 }, + { "matrix": [0, 12], "x": 12.75, "y": 0 }, + { "matrix": [0, 13], "x": 14, "y": 0 }, + { "matrix": [0, 14], "x": 15.25, "y": 0 }, + { "matrix": [0, 15], "x": 16.25, "y": 0 }, + { "matrix": [0, 16], "x": 17.25, "y": 0 }, + { "matrix": [1, 0], "x": 0, "y": 1.25 }, + { "matrix": [1, 1], "x": 1, "y": 1.25 }, + { "matrix": [1, 2], "x": 2, "y": 1.25 }, + { "matrix": [1, 3], "x": 3, "y": 1.25 }, + { "matrix": [1, 4], "x": 4, "y": 1.25 }, + { "matrix": [1, 5], "x": 5, "y": 1.25 }, + { "matrix": [1, 6], "x": 6, "y": 1.25 }, + { "matrix": [1, 7], "x": 7, "y": 1.25 }, + { "matrix": [1, 8], "x": 8, "y": 1.25 }, + { "matrix": [1, 9], "x": 9, "y": 1.25 }, + { "matrix": [1, 10], "x": 10, "y": 1.25 }, + { "matrix": [1, 11], "x": 11, "y": 1.25 }, + { "matrix": [1, 12], "x": 12, "y": 1.25 }, + { "matrix": [1, 13], "x": 13, "y": 1.25 }, + { "matrix": [2, 13], "x": 14, "y": 1.25 }, + { "matrix": [1, 14], "x": 15.25, "y": 1.25 }, + { "matrix": [1, 15], "x": 16.25, "y": 1.25 }, + { "matrix": [1, 16], "x": 17.25, "y": 1.25 }, + { "matrix": [2, 0], "x": 0, "y": 2.25 }, + { "matrix": [2, 1], "x": 1.5, "y": 2.25 }, + { "matrix": [2, 2], "x": 2.5, "y": 2.25 }, + { "matrix": [2, 3], "x": 3.5, "y": 2.25 }, + { "matrix": [2, 4], "x": 4.5, "y": 2.25 }, + { "matrix": [2, 5], "x": 5.5, "y": 2.25 }, + { "matrix": [2, 6], "x": 6.5, "y": 2.25 }, + { "matrix": [2, 7], "x": 7.5, "y": 2.25 }, + { "matrix": [2, 8], "x": 8.5, "y": 2.25 }, + { "matrix": [2, 9], "x": 9.5, "y": 2.25 }, + { "matrix": [2, 10], "x": 10.5, "y": 2.25 }, + { "matrix": [2, 11], "x": 11.5, "y": 2.25 }, + { "matrix": [2, 12], "x": 12.5, "y": 2.25 }, + { "matrix": [3, 12], "x": 13.5, "y": 2.25 }, + { "matrix": [2, 14], "x": 15.25, "y": 2.25 }, + { "matrix": [2, 15], "x": 16.25, "y": 2.25 }, + { "matrix": [2, 16], "x": 17.25, "y": 2.25 }, + { "matrix": [3, 0], "x": 0, "y": 3.25 }, + { "matrix": [3, 1], "x": 1.75, "y": 3.25 }, + { "matrix": [3, 2], "x": 2.75, "y": 3.25 }, + { "matrix": [3, 3], "x": 3.75, "y": 3.25 }, + { "matrix": [3, 4], "x": 4.75, "y": 3.25 }, + { "matrix": [3, 5], "x": 5.75, "y": 3.25 }, + { "matrix": [3, 6], "x": 6.75, "y": 3.25 }, + { "matrix": [3, 7], "x": 7.75, "y": 3.25 }, + { "matrix": [3, 8], "x": 8.75, "y": 3.25 }, + { "matrix": [3, 9], "x": 9.75, "y": 3.25 }, + { "matrix": [3, 10], "x": 10.75, "y": 3.25 }, + { "matrix": [3, 11], "x": 11.75, "y": 3.25 }, + { "matrix": [3, 13], "x": 12.75, "y": 3.25 }, + { "matrix": [4, 0], "x": 0, "y": 4.25 }, + { "matrix": [4, 2], "x": 2.25, "y": 4.25 }, + { "matrix": [4, 3], "x": 3.25, "y": 4.25 }, + { "matrix": [4, 4], "x": 4.25, "y": 4.25 }, + { "matrix": [4, 5], "x": 5.25, "y": 4.25 }, + { "matrix": [4, 6], "x": 6.25, "y": 4.25 }, + { "matrix": [4, 7], "x": 7.25, "y": 4.25 }, + { "matrix": [4, 8], "x": 8.25, "y": 4.25 }, + { "matrix": [4, 9], "x": 9.25, "y": 4.25 }, + { "matrix": [4, 10], "x": 10.25, "y": 4.25 }, + { "matrix": [4, 11], "x": 11.25, "y": 4.25 }, + { "matrix": [4, 12], "x": 12.25, "y": 4.25 }, + { "matrix": [4, 13], "x": 14, "y": 4.25 }, + { "matrix": [4, 15], "x": 16.25, "y": 4.25 }, + { "matrix": [5, 0], "x": 0, "y": 5.25 }, + { "matrix": [5, 1], "x": 1.5, "y": 5.25 }, + { "matrix": [5, 2], "x": 2.5, "y": 5.25 }, + { "matrix": [5, 6], "x": 4, "y": 5.25 }, + { "matrix": [5, 11], "x": 11, "y": 5.25 }, + { "matrix": [5, 12], "x": 12.5, "y": 5.25 }, + { "matrix": [5, 13], "x": 13.5, "y": 5.25 }, + { "matrix": [5, 14], "x": 15.25, "y": 5.25 }, + { "matrix": [5, 15], "x": 16.25, "y": 5.25 }, + { "matrix": [5, 16], "x": 17.25, "y": 5.25 } + ] + }, + "LAYOUT_tkl_f13_iso_tsangan": { + "layout": [ + { "matrix": [0, 0], "x": 0, "y": 0 }, + { "matrix": [0, 1], "x": 1.25, "y": 0 }, + { "matrix": [0, 2], "x": 2.25, "y": 0 }, + { "matrix": [0, 3], "x": 3.25, "y": 0 }, + { "matrix": [0, 4], "x": 4.25, "y": 0 }, + { "matrix": [0, 5], "x": 5.5, "y": 0 }, + { "matrix": [0, 6], "x": 6.5, "y": 0 }, + { "matrix": [0, 7], "x": 7.5, "y": 0 }, + { "matrix": [0, 8], "x": 8.5, "y": 0 }, + { "matrix": [0, 9], "x": 9.75, "y": 0 }, + { "matrix": [0, 10], "x": 10.75, "y": 0 }, + { "matrix": [0, 11], "x": 11.75, "y": 0 }, + { "matrix": [0, 12], "x": 12.75, "y": 0 }, + { "matrix": [0, 13], "x": 14, "y": 0 }, + { "matrix": [0, 14], "x": 15.25, "y": 0 }, + { "matrix": [0, 15], "x": 16.25, "y": 0 }, + { "matrix": [0, 16], "x": 17.25, "y": 0 }, + { "matrix": [1, 0], "x": 0, "y": 1.25 }, + { "matrix": [1, 1], "x": 1, "y": 1.25 }, + { "matrix": [1, 2], "x": 2, "y": 1.25 }, + { "matrix": [1, 3], "x": 3, "y": 1.25 }, + { "matrix": [1, 4], "x": 4, "y": 1.25 }, + { "matrix": [1, 5], "x": 5, "y": 1.25 }, + { "matrix": [1, 6], "x": 6, "y": 1.25 }, + { "matrix": [1, 7], "x": 7, "y": 1.25 }, + { "matrix": [1, 8], "x": 8, "y": 1.25 }, + { "matrix": [1, 9], "x": 9, "y": 1.25 }, + { "matrix": [1, 10], "x": 10, "y": 1.25 }, + { "matrix": [1, 11], "x": 11, "y": 1.25 }, + { "matrix": [1, 12], "x": 12, "y": 1.25 }, + { "matrix": [1, 13], "x": 13, "y": 1.25 }, + { "matrix": [1, 14], "x": 15.25, "y": 1.25 }, + { "matrix": [1, 15], "x": 16.25, "y": 1.25 }, + { "matrix": [1, 16], "x": 17.25, "y": 1.25 }, + { "matrix": [2, 0], "x": 0, "y": 2.25 }, + { "matrix": [2, 1], "x": 1.5, "y": 2.25 }, + { "matrix": [2, 2], "x": 2.5, "y": 2.25 }, + { "matrix": [2, 3], "x": 3.5, "y": 2.25 }, + { "matrix": [2, 4], "x": 4.5, "y": 2.25 }, + { "matrix": [2, 5], "x": 5.5, "y": 2.25 }, + { "matrix": [2, 6], "x": 6.5, "y": 2.25 }, + { "matrix": [2, 7], "x": 7.5, "y": 2.25 }, + { "matrix": [2, 8], "x": 8.5, "y": 2.25 }, + { "matrix": [2, 9], "x": 9.5, "y": 2.25 }, + { "matrix": [2, 10], "x": 10.5, "y": 2.25 }, + { "matrix": [2, 11], "x": 11.5, "y": 2.25 }, + { "matrix": [2, 12], "x": 12.5, "y": 2.25 }, + { "matrix": [2, 14], "x": 13.75, "y": 2.25 }, + { "matrix": [2, 15], "x": 15.25, "y": 2.25 }, + { "matrix": [2, 16], "x": 16.25, "y": 2.25 }, + { "matrix": [3, 0], "x": 17.25, "y": 2.25 }, + { "matrix": [3, 1], "x": 0, "y": 3.25 }, + { "matrix": [3, 2], "x": 1.75, "y": 3.25 }, + { "matrix": [3, 3], "x": 2.75, "y": 3.25 }, + { "matrix": [3, 4], "x": 3.75, "y": 3.25 }, + { "matrix": [3, 5], "x": 4.75, "y": 3.25 }, + { "matrix": [3, 6], "x": 5.75, "y": 3.25 }, + { "matrix": [3, 7], "x": 6.75, "y": 3.25 }, + { "matrix": [3, 8], "x": 7.75, "y": 3.25 }, + { "matrix": [3, 9], "x": 8.75, "y": 3.25 }, + { "matrix": [3, 10], "x": 9.75, "y": 3.25 }, + { "matrix": [3, 11], "x": 10.75, "y": 3.25 }, + { "matrix": [3, 12], "x": 11.75, "y": 3.25 }, + { "matrix": [3, 13], "x": 12.75, "y": 3.25 }, + { "matrix": [4, 0], "x": 0, "y": 4.25 }, + { "matrix": [4, 1], "x": 1.25, "y": 4.25 }, + { "matrix": [4, 2], "x": 2.25, "y": 4.25 }, + { "matrix": [4, 3], "x": 3.25, "y": 4.25 }, + { "matrix": [4, 4], "x": 4.25, "y": 4.25 }, + { "matrix": [4, 5], "x": 5.25, "y": 4.25 }, + { "matrix": [4, 6], "x": 6.25, "y": 4.25 }, + { "matrix": [4, 7], "x": 7.25, "y": 4.25 }, + { "matrix": [4, 8], "x": 8.25, "y": 4.25 }, + { "matrix": [4, 9], "x": 9.25, "y": 4.25 }, + { "matrix": [4, 10], "x": 10.25, "y": 4.25 }, + { "matrix": [4, 11], "x": 11.25, "y": 4.25 }, + { "matrix": [4, 12], "x": 12.25, "y": 4.25 }, + { "matrix": [4, 15], "x": 16.25, "y": 4.25 }, + { "matrix": [5, 0], "x": 0, "y": 5.25 }, + { "matrix": [5, 1], "x": 1.5, "y": 5.25 }, + { "matrix": [5, 2], "x": 2.5, "y": 5.25 }, + { "matrix": [5, 6], "x": 4, "y": 5.25 }, + { "matrix": [5, 11], "x": 11, "y": 5.25 }, + { "matrix": [5, 12], "x": 12.5, "y": 5.25 }, + { "matrix": [5, 13], "x": 13.5, "y": 5.25 }, + { "matrix": [5, 14], "x": 15.25, "y": 5.25 }, + { "matrix": [5, 15], "x": 16.25, "y": 5.25 }, + { "matrix": [5, 16], "x": 17.25, "y": 5.25 } + ] + }, + "LAYOUT_tkl_f13_iso_tsangan_split_bs_rshift": { + "layout": [ + { "matrix": [0, 0], "x": 0, "y": 0 }, + { "matrix": [0, 1], "x": 1.25, "y": 0 }, + { "matrix": [0, 2], "x": 2.25, "y": 0 }, + { "matrix": [0, 3], "x": 3.25, "y": 0 }, + { "matrix": [0, 4], "x": 4.25, "y": 0 }, + { "matrix": [0, 5], "x": 5.5, "y": 0 }, + { "matrix": [0, 6], "x": 6.5, "y": 0 }, + { "matrix": [0, 7], "x": 7.5, "y": 0 }, + { "matrix": [0, 8], "x": 8.5, "y": 0 }, + { "matrix": [0, 9], "x": 9.75, "y": 0 }, + { "matrix": [0, 10], "x": 10.75, "y": 0 }, + { "matrix": [0, 11], "x": 11.75, "y": 0 }, + { "matrix": [0, 12], "x": 12.75, "y": 0 }, + { "matrix": [0, 13], "x": 14, "y": 0 }, + { "matrix": [0, 14], "x": 15.25, "y": 0 }, + { "matrix": [0, 15], "x": 16.25, "y": 0 }, + { "matrix": [0, 16], "x": 17.25, "y": 0 }, + { "matrix": [1, 0], "x": 0, "y": 1.25 }, + { "matrix": [1, 1], "x": 1, "y": 1.25 }, + { "matrix": [1, 2], "x": 2, "y": 1.25 }, + { "matrix": [1, 3], "x": 3, "y": 1.25 }, + { "matrix": [1, 4], "x": 4, "y": 1.25 }, + { "matrix": [1, 5], "x": 5, "y": 1.25 }, + { "matrix": [1, 6], "x": 6, "y": 1.25 }, + { "matrix": [1, 7], "x": 7, "y": 1.25 }, + { "matrix": [1, 8], "x": 8, "y": 1.25 }, + { "matrix": [1, 9], "x": 9, "y": 1.25 }, + { "matrix": [1, 10], "x": 10, "y": 1.25 }, + { "matrix": [1, 11], "x": 11, "y": 1.25 }, + { "matrix": [1, 12], "x": 12, "y": 1.25 }, + { "matrix": [1, 13], "x": 13, "y": 1.25 }, + { "matrix": [2, 13], "x": 14, "y": 1.25 }, + { "matrix": [1, 14], "x": 15.25, "y": 1.25 }, + { "matrix": [1, 15], "x": 16.25, "y": 1.25 }, + { "matrix": [1, 16], "x": 17.25, "y": 1.25 }, + { "matrix": [2, 0], "x": 0, "y": 2.25 }, + { "matrix": [2, 1], "x": 1.5, "y": 2.25 }, + { "matrix": [2, 2], "x": 2.5, "y": 2.25 }, + { "matrix": [2, 3], "x": 3.5, "y": 2.25 }, + { "matrix": [2, 4], "x": 4.5, "y": 2.25 }, + { "matrix": [2, 5], "x": 5.5, "y": 2.25 }, + { "matrix": [2, 6], "x": 6.5, "y": 2.25 }, + { "matrix": [2, 7], "x": 7.5, "y": 2.25 }, + { "matrix": [2, 8], "x": 8.5, "y": 2.25 }, + { "matrix": [2, 9], "x": 9.5, "y": 2.25 }, + { "matrix": [2, 10], "x": 10.5, "y": 2.25 }, + { "matrix": [2, 11], "x": 11.5, "y": 2.25 }, + { "matrix": [2, 12], "x": 12.5, "y": 2.25 }, + { "matrix": [2, 14], "x": 13.75, "y": 2.25 }, + { "matrix": [2, 15], "x": 15.25, "y": 2.25 }, + { "matrix": [2, 16], "x": 16.25, "y": 2.25 }, + { "matrix": [3, 0], "x": 17.25, "y": 2.25 }, + { "matrix": [3, 1], "x": 0, "y": 3.25 }, + { "matrix": [3, 2], "x": 1.75, "y": 3.25 }, + { "matrix": [3, 3], "x": 2.75, "y": 3.25 }, + { "matrix": [3, 4], "x": 3.75, "y": 3.25 }, + { "matrix": [3, 5], "x": 4.75, "y": 3.25 }, + { "matrix": [3, 6], "x": 5.75, "y": 3.25 }, + { "matrix": [3, 7], "x": 6.75, "y": 3.25 }, + { "matrix": [3, 8], "x": 7.75, "y": 3.25 }, + { "matrix": [3, 9], "x": 8.75, "y": 3.25 }, + { "matrix": [3, 10], "x": 9.75, "y": 3.25 }, + { "matrix": [3, 11], "x": 10.75, "y": 3.25 }, + { "matrix": [3, 12], "x": 11.75, "y": 3.25 }, + { "matrix": [3, 13], "x": 12.75, "y": 3.25 }, + { "matrix": [4, 0], "x": 0, "y": 4.25 }, + { "matrix": [4, 1], "x": 1.25, "y": 4.25 }, + { "matrix": [4, 2], "x": 2.25, "y": 4.25 }, + { "matrix": [4, 3], "x": 3.25, "y": 4.25 }, + { "matrix": [4, 4], "x": 4.25, "y": 4.25 }, + { "matrix": [4, 5], "x": 5.25, "y": 4.25 }, + { "matrix": [4, 6], "x": 6.25, "y": 4.25 }, + { "matrix": [4, 7], "x": 7.25, "y": 4.25 }, + { "matrix": [4, 8], "x": 8.25, "y": 4.25 }, + { "matrix": [4, 9], "x": 9.25, "y": 4.25 }, + { "matrix": [4, 10], "x": 10.25, "y": 4.25 }, + { "matrix": [4, 11], "x": 11.25, "y": 4.25 }, + { "matrix": [4, 12], "x": 12.25, "y": 4.25 }, + { "matrix": [4, 13], "x": 14, "y": 4.25 }, + { "matrix": [4, 15], "x": 16.25, "y": 4.25 }, + { "matrix": [5, 0], "x": 0, "y": 5.25 }, + { "matrix": [5, 1], "x": 1.5, "y": 5.25 }, + { "matrix": [5, 2], "x": 2.5, "y": 5.25 }, + { "matrix": [5, 6], "x": 4, "y": 5.25 }, + { "matrix": [5, 11], "x": 11, "y": 5.25 }, + { "matrix": [5, 12], "x": 12.5, "y": 5.25 }, + { "matrix": [5, 13], "x": 13.5, "y": 5.25 }, + { "matrix": [5, 14], "x": 15.25, "y": 5.25 }, + { "matrix": [5, 15], "x": 16.25, "y": 5.25 }, + { "matrix": [5, 16], "x": 17.25, "y": 5.25 } + ] + } + } +} diff --git a/keyboards/cablecardesigns/phoenix/keymaps/default/keymap.c b/keyboards/cablecardesigns/phoenix/keymaps/default/keymap.c new file mode 100644 index 000000000000..e008bee3b1d6 --- /dev/null +++ b/keyboards/cablecardesigns/phoenix/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +/* Copyright 2023 Yiancar-Designs + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_all( /* Base */ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_PSCR, KC_SCRL, KC_PAUS, + + 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_EQL, KC_BSPC, KC_DEL, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT) +}; diff --git a/keyboards/cablecardesigns/phoenix/keymaps/via/keymap.c b/keyboards/cablecardesigns/phoenix/keymaps/via/keymap.c new file mode 100644 index 000000000000..e008bee3b1d6 --- /dev/null +++ b/keyboards/cablecardesigns/phoenix/keymaps/via/keymap.c @@ -0,0 +1,27 @@ +/* Copyright 2023 Yiancar-Designs + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_all( /* Base */ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_PSCR, KC_SCRL, KC_PAUS, + + 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_EQL, KC_BSPC, KC_DEL, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT) +}; diff --git a/keyboards/cablecardesigns/phoenix/keymaps/via/rules.mk b/keyboards/cablecardesigns/phoenix/keymaps/via/rules.mk new file mode 100755 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/cablecardesigns/phoenix/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/cablecardesigns/phoenix/phoenix.c b/keyboards/cablecardesigns/phoenix/phoenix.c new file mode 100755 index 000000000000..251f79a953d9 --- /dev/null +++ b/keyboards/cablecardesigns/phoenix/phoenix.c @@ -0,0 +1,22 @@ +/* Copyright 2023 Yiancar-Designs + * + * 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 "quantum.h" + +void led_init_ports(void) { + // Set our LED pins as open drain outputs + palSetLineMode(LED_CAPS_LOCK_PIN, PAL_MODE_OUTPUT_OPENDRAIN); +} diff --git a/keyboards/cablecardesigns/phoenix/readme.md b/keyboards/cablecardesigns/phoenix/readme.md new file mode 100755 index 000000000000..0574da435174 --- /dev/null +++ b/keyboards/cablecardesigns/phoenix/readme.md @@ -0,0 +1,32 @@ +# Phoenix + +This is a standard TKL F13 layout PCB. It supports VIA. + +* Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [GitHub](https://github.com/yiancar) +* Hardware Supported: A TKL keyboard with STM32F072CB +* Hardware Availability: https://cablecardesigns.co + +## Instructions + +### Build + +Make example for this keyboard (after setting up your build environment): + + make cablecardesigns/phoenix:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +### Reset + +- Unplug +- Hold Escape +- Plug In +- Unplug +- Release Escape + +### Flash + +- Unplug +- Hold Escape +- Plug In +- Flash using QMK Toolbox or CLI (`make cablecardesigns/phoenix::flash`) diff --git a/keyboards/cablecardesigns/phoenix/rules.mk b/keyboards/cablecardesigns/phoenix/rules.mk new file mode 100755 index 000000000000..7ce6edcba902 --- /dev/null +++ b/keyboards/cablecardesigns/phoenix/rules.mk @@ -0,0 +1,7 @@ +# Wildcard to allow APM32 MCU +DFU_SUFFIX_ARGS = -v FFFF -p FFFF + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/contra/keymaps/bramver/README.md b/keyboards/contra/keymaps/bramver/README.md index 3c7028a933f2..c5a887ce2c13 100644 --- a/keyboards/contra/keymaps/bramver/README.md +++ b/keyboards/contra/keymaps/bramver/README.md @@ -22,9 +22,9 @@ LOWER layer { _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ }, EMOJI layer - { _______ , X(CLAP) , X(CUM) , X(BNIS) , X(BUTT) , X(CAR) , X(FIRE) , X(REDB) , X(MONY) , X(HNDR) , X(SOS) , _______ }, - { _______ , X(CELE) , X(PRAY) , X(NAIL) , X(OK) , X(THNK) , X(UNAM) , X(HEYE) , X(COOL) , X(EYES) , X(SMIR) , _______ }, - { _______ , X(TRIU) , X(SCRM) , X(VOMI) , X(DTIV) , X(EXPL) , X(HAIR) , X(DANC) , X(STRN) , X(LEFT) , X(RGHT) , _______ }, + { _______ , UM(CLAP) , UM(CUM) , UM(BNIS) , UM(BUTT) , UM(CAR) , UM(FIRE) , UM(REDB) , UM(MONY) , UM(HNDR) , UM(SOS) , _______ }, + { _______ , UM(CELE) , UM(PRAY) , UM(NAIL) , UM(OK) , UM(THNK) , UM(UNAM) , UM(HEYE) , UM(COOL) , UM(EYES) , UM(SMIR) , _______ }, + { _______ , UM(TRIU) , UM(SCRM) , UM(VOMI) , UM(DTIV) , UM(EXPL) , UM(HAIR) , UM(DANC) , UM(STRN) , UM(LEFT) , UM(RGHT) , _______ }, { _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ }, MOUSE layer diff --git a/keyboards/contra/keymaps/bramver/keymap.c b/keyboards/contra/keymaps/bramver/keymap.c index 3816ee629e2c..08f25119c272 100644 --- a/keyboards/contra/keymaps/bramver/keymap.c +++ b/keyboards/contra/keymaps/bramver/keymap.c @@ -106,9 +106,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_EMOJI] = LAYOUT_ortho_4x12( - _______ , X(CLAP) , X(CUM) , X(BNIS) , X(BUTT) , X(CAR) , X(FIRE) , X(REDB) , X(MONY) , X(HNDR) , X(SOS) , _______ , - _______ , X(CELE) , X(PRAY) , X(NAIL) , X(OK) , X(THNK) , X(UNAM) , X(HEYE) , X(COOL) , X(EYES) , X(SMIR) , _______ , - _______ , X(TRIU) , X(SCRM) , X(VOMI) , X(DTIV) , X(EXPL) , X(HAIR) , X(DANC) , X(STRN) , X(LEFT) , X(RGHT) , _______ , + _______ , UM(CLAP) , UM(CUM) , UM(BNIS) , UM(BUTT) , UM(CAR) , UM(FIRE) , UM(REDB) , UM(MONY) , UM(HNDR) , UM(SOS) , _______ , + _______ , UM(CELE) , UM(PRAY) , UM(NAIL) , UM(OK) , UM(THNK) , UM(UNAM) , UM(HEYE) , UM(COOL) , UM(EYES) , UM(SMIR) , _______ , + _______ , UM(TRIU) , UM(SCRM) , UM(VOMI) , UM(DTIV) , UM(EXPL) , UM(HAIR) , UM(DANC) , UM(STRN) , UM(LEFT) , UM(RGHT) , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ ), diff --git a/keyboards/converter/ibm_terminal/keymaps/priyadi/keymap.c b/keyboards/converter/ibm_terminal/keymaps/priyadi/keymap.c index 0e11fa677975..3645dd7da723 100644 --- a/keyboards/converter/ibm_terminal/keymaps/priyadi/keymap.c +++ b/keyboards/converter/ibm_terminal/keymaps/priyadi/keymap.c @@ -226,9 +226,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, X(CRY2),X(WEARY),X(EYERT),X(SMIRK), X(TJOY), X(RECYC),X(UNAMU),X(MUSIC),X(OKHND),X(PENSV),XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, X(PRAY),X(SMILE),X(SMIL2),X(FLUSH), X(GRIN), X(HEART),X(BYE), X(KISS), X(CELEB),X(COOL), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,X(SLEEP),X(CLAP), X(CRY), X(VIC), X(BHART),X(SUN), X(SMEYE),X(WINK), X(MOON), X(CONFU), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, UM(CRY2),UM(WEARY),UM(EYERT),UM(SMIRK), UM(TJOY), UM(RECYC),UM(UNAMU),UM(MUSIC),UM(OKHND),UM(PENSV),XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, UM(PRAY),UM(SMILE),UM(SMIL2),UM(FLUSH), UM(GRIN), UM(HEART),UM(BYE), UM(KISS), UM(CELEB),UM(COOL), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,UM(SLEEP),UM(CLAP), UM(CRY), UM(VIC), UM(BHART),UM(SUN), UM(SMEYE),UM(WINK), UM(MOON), UM(CONFU), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), diff --git a/keyboards/durgod/k320/keymaps/kuenhlee/keymap.c b/keyboards/durgod/k320/keymaps/kuenhlee/keymap.c index 7f49352de45f..4092126d7fa6 100644 --- a/keyboards/durgod/k320/keymaps/kuenhlee/keymap.c +++ b/keyboards/durgod/k320/keymaps/kuenhlee/keymap.c @@ -132,11 +132,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_UL] = LAYOUT_tkl_ansi( /* Unicode Layer */ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - X(APPR), X(NEQU), X(POW2), X(POW3), XXXXXXX, XXXXXXX, X(BSQR), X(WSQR), X(INFI), X(BDOT), X(WDOT), XXXXXXX, X(PONE), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, X(SUM), XXXXXXX, X(MYU), X(SAME), XXXXXXX, X(OHM), X(DLAR), X(DRAR), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, X(SQRT), X(DELT), XXXXXXX, XXXXXXX, X(THFR), XXXXXXX, XXXXXXX, XXXXXXX, X(THET), X(DEGR), XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, X(COPY), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, X(LTOE), X(MTOE), X(DIV), XXXXXXX, X(UARR), - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_TRNS, KC_TRNS, XXXXXXX, X(LARR), X(DARR), X(RARR) + UM(APPR), UM(NEQU), UM(POW2), UM(POW3), XXXXXXX, XXXXXXX, UM(BSQR), UM(WSQR), UM(INFI), UM(BDOT), UM(WDOT), XXXXXXX, UM(PONE), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, UM(SUM), XXXXXXX, UM(MYU), UM(SAME), XXXXXXX, UM(OHM), UM(DLAR), UM(DRAR), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, UM(SQRT), UM(DELT), XXXXXXX, XXXXXXX, UM(THFR), XXXXXXX, XXXXXXX, XXXXXXX, UM(THET), UM(DEGR), XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, UM(COPY), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, UM(LTOE), UM(MTOE), UM(DIV), XXXXXXX, UM(UARR), + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_TRNS, KC_TRNS, XXXXXXX, UM(LARR), UM(DARR), UM(RARR) ) }; diff --git a/keyboards/dztech/dz65rgb/keymaps/catrielmuller/keymap.c b/keyboards/dztech/dz65rgb/keymaps/catrielmuller/keymap.c index d4e1851f68cb..7b4e9ab72884 100644 --- a/keyboards/dztech/dz65rgb/keymaps/catrielmuller/keymap.c +++ b/keyboards/dztech/dz65rgb/keymaps/catrielmuller/keymap.c @@ -166,10 +166,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TO(_INDEX), KC_NO, KC_MPRV, KC_VOLD, KC_MNXT ), [_EMOJI] = LAYOUT_65_ansi( - TO(_MAIN), X(UC_GRINNING_FACE), X(UC_BEAMING_FACE), X(UC_GRINNING_FACE_WITH_SWEAT), X(UC_ROLLING_LAUGHING), X(UC_FACE_TEARS_JOY), X(UC_WINKING_FACE), X(UC_SMILING_FACE_HALO), X(UC_SMILING_FACE_HEARTS), X(UC_SMILING_FACE_HEART_EYES), X(UC_FACE_BLOWING_KISS), X(UC_FACE_SAVORING_FOOD), X(UC_ZANY_FACE), KC_BSPC, KC_HOME, - KC_TAB, X(UC_HUGGING_FACE), X(UC_SHUSHING_FACE), X(UC_THINKING_FACE), X(UC_FACE_RAISED_EYEBROW), X(UC_NEUTRAL_FACE), X(UC_SMIRKING_FACE), X(UC_FACE_ROLLING_EYES), X(UC_PENSIVE_FACE), X(UC_FACE_VOMITING), X(UC_WOOZY_FACE), X(UC_PLEADING_FACE), X(UC_LOUDLY_CRYING_FACE), X(UC_THUMBSUP), KC_END, - KC_APP, X(UC_DISAPPOINTED_FACE), X(UC_FACE_SYMBOLS_MOUTH), X(UC_SMILING_FACE_HORNS), X(UC_SKULL), X(UC_PILE_POO), X(UC_GHOST), X(UC_ALIEN_MONSTER), X(UC_RED_HEART), X(UC_BOMB), X(UC_WAVING_HAND), X(UC_OK_HAND), KC_ENT, KC_PGUP, - KC_LSFT, X(UC_CLAPPING_HANDS), X(UC_EYES), X(UC_MAN_FACEPALMING), X(UC_TURTLE), X(UC_SNAKE), X(UC_SPOUTING_WHALE), X(UC_DRAGON), X(UC_TREX), X(UC_ARGENTINA_A), X(UC_ARGENTINA_R), X(UC_THUMBSDOWN), KC_UP, KC_PGDN, + TO(_MAIN), UM(UC_GRINNING_FACE), UM(UC_BEAMING_FACE), UM(UC_GRINNING_FACE_WITH_SWEAT), UM(UC_ROLLING_LAUGHING), UM(UC_FACE_TEARS_JOY), UM(UC_WINKING_FACE), UM(UC_SMILING_FACE_HALO), UM(UC_SMILING_FACE_HEARTS), UM(UC_SMILING_FACE_HEART_EYES), UM(UC_FACE_BLOWING_KISS), UM(UC_FACE_SAVORING_FOOD), UM(UC_ZANY_FACE), KC_BSPC, KC_HOME, + KC_TAB, UM(UC_HUGGING_FACE), UM(UC_SHUSHING_FACE), UM(UC_THINKING_FACE), UM(UC_FACE_RAISED_EYEBROW), UM(UC_NEUTRAL_FACE), UM(UC_SMIRKING_FACE), UM(UC_FACE_ROLLING_EYES), UM(UC_PENSIVE_FACE), UM(UC_FACE_VOMITING), UM(UC_WOOZY_FACE), UM(UC_PLEADING_FACE), UM(UC_LOUDLY_CRYING_FACE), UM(UC_THUMBSUP), KC_END, + KC_APP, UM(UC_DISAPPOINTED_FACE), UM(UC_FACE_SYMBOLS_MOUTH), UM(UC_SMILING_FACE_HORNS), UM(UC_SKULL), UM(UC_PILE_POO), UM(UC_GHOST), UM(UC_ALIEN_MONSTER), UM(UC_RED_HEART), UM(UC_BOMB), UM(UC_WAVING_HAND), UM(UC_OK_HAND), KC_ENT, KC_PGUP, + KC_LSFT, UM(UC_CLAPPING_HANDS), UM(UC_EYES), UM(UC_MAN_FACEPALMING), UM(UC_TURTLE), UM(UC_SNAKE), UM(UC_SPOUTING_WHALE), UM(UC_DRAGON), UM(UC_TREX), UM(UC_ARGENTINA_A), UM(UC_ARGENTINA_R), UM(UC_THUMBSDOWN), KC_UP, KC_PGDN, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, QK_LEAD, TO(_INDEX), TO(_MAIN), KC_LEFT, KC_DOWN, KC_RGHT ), [_EXT1] = LAYOUT_65_ansi( diff --git a/keyboards/gh60/satan/keymaps/addcninblue/rules.mk b/keyboards/gh60/satan/keymaps/addcninblue/rules.mk index b8c05a5984ca..fe07e497f9c2 100644 --- a/keyboards/gh60/satan/keymaps/addcninblue/rules.mk +++ b/keyboards/gh60/satan/keymaps/addcninblue/rules.mk @@ -12,7 +12,7 @@ NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: htt BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 -UNICODEMAP_ENABLE = no # This allows sending unicode symbols using X() in your keymap. +UNICODEMAP_ENABLE = no UNICODE_ENABLE = no # Unicode UCIS_ENABLE = no # Keep in mind that not all will work (See WinCompose for details on Windows). BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/giabalanai/keymaps/2firmware/keymap.c b/keyboards/giabalanai/keymaps/2firmware/keymap.c index 8e95b89a91d7..338d5d8e0ff2 100644 --- a/keyboards/giabalanai/keymaps/2firmware/keymap.c +++ b/keyboards/giabalanai/keymaps/2firmware/keymap.c @@ -332,9 +332,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - MI_OCN2, MI_OCN1, MI_OC0, MI_OC1, MI_OC2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, VERSION, EE_CLR, _______, + MI_OCN2, MI_OCN1, MI_OC0, MI_OC1, MI_OC2, XXXXXXX, XXXXXXX, MI_OCTD, MI_OCTU, XXXXXXX, VERSION, EE_CLR, _______, CSYSTEM, BSYSTEM, CNTBASC, CSYSALL, CHRTONE, CFLIP2B, XXXXXXX, XXXXXXX, XXXXXXX, MI_VELD, MI_VELU, XXXXXXX, RGB_TOG, - XXXXXXX, TGLBASS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TGLUVEL, MELDYAL, MELODYS, MELDYAH + XXXXXXX, TGLBASS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MI_TRSD, MI_TRSU, TGLUVEL, MELDYAL, MELODYS, MELDYAH ) }; diff --git a/keyboards/giabalanai/keymaps/3araht/keymap.c b/keyboards/giabalanai/keymaps/3araht/keymap.c index daa31ffa7b0d..fb68c02c7087 100644 --- a/keyboards/giabalanai/keymaps/3araht/keymap.c +++ b/keyboards/giabalanai/keymaps/3araht/keymap.c @@ -363,9 +363,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - MI_OCN2, MI_OCN1, MI_OC0, MI_OC1, MI_OC2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, VERSION, EE_CLR, _______, + MI_OCN2, MI_OCN1, MI_OC0, MI_OC1, MI_OC2, XXXXXXX, XXXXXXX, MI_OCTD, MI_OCTU, XXXXXXX, VERSION, EE_CLR, _______, CSYSTEM, BSYSTEM, CNTBASC, CSYSALL, CHRTONE, CFLIP2B, CSYSFBS, CNTBASB, XXXXXXX, MI_VELD, MI_VELU, XXXXXXX, RGB_TOG, - XXXXXXX, TGLBASS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TGLUVEL, MELDYAL, MELODYS, MELDYAH + XXXXXXX, TGLBASS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MI_TRSD, MI_TRSU, TGLUVEL, MELDYAL, MELODYS, MELDYAH ) }; diff --git a/keyboards/giabalanai/keymaps/party/keymap.c b/keyboards/giabalanai/keymaps/party/keymap.c index ea3000c0103c..e4ff33693059 100644 --- a/keyboards/giabalanai/keymaps/party/keymap.c +++ b/keyboards/giabalanai/keymaps/party/keymap.c @@ -363,9 +363,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - MI_OCN2, MI_OCN1, MI_OC0, MI_OC1, MI_OC2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, VERSION, EE_CLR, _______, + MI_OCN2, MI_OCN1, MI_OC0, MI_OC1, MI_OC2, XXXXXXX, XXXXXXX, MI_OCTD, MI_OCTU, XXXXXXX, VERSION, EE_CLR, _______, CSYSTEM, BSYSTEM, CNTBASC, CSYSALL, CHRTONE, CFLIP2B, CSYSFBS, CNTBASB, XXXXXXX, MI_VELD, MI_VELU, RGB_MOD, RGB_TOG, - XXXXXXX, TGLBASS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TGLUVEL, MELDYAL, MELODYS, MELDYAH + XXXXXXX, TGLBASS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MI_TRSD, MI_TRSU, TGLUVEL, MELDYAL, MELODYS, MELDYAH ) }; diff --git a/keyboards/handwired/minorca/keymaps/ridingqwerty/keymap.c b/keyboards/handwired/minorca/keymaps/ridingqwerty/keymap.c index 7d541270fba6..26e6fc630ceb 100644 --- a/keyboards/handwired/minorca/keymaps/ridingqwerty/keymap.c +++ b/keyboards/handwired/minorca/keymaps/ridingqwerty/keymap.c @@ -59,9 +59,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }, #ifdef UNICODE_H [_RUNE] = { - {KC_ESC, X(INGWZ), X(WUNJO), X(EHWAZ), X(RAIDO), X(TIWAZ), X(IWAZ), X(UR), X(ISAZ), X(ETHEL), X(PERTH), SC(BSPC) }, - {ED(TAB), X(ANSUZ), X(SOWIL), X(DAGAZ), X(FE), X(GEBO), X(HAGLZ), X(JERAN), X(KAUNA), X(LAUKZ), XXXXXXX, NM(SCLN) }, - {MT_QUOT, XXXXXXX, X(ALGIZ), X(THURS), X(KAUNA), X(WUNJO), X(BEORC), X(NAUDZ), X(MANNZ), KC_COMM, FK(DOT), RS(SLSH) }, + {KC_ESC, UM(INGWZ), UM(WUNJO), UM(EHWAZ), UM(RAIDO), UM(TIWAZ), UM(IWAZ), UM(UR), UM(ISAZ), UM(ETHEL), UM(PERTH), SC(BSPC) }, + {ED(TAB), UM(ANSUZ), UM(SOWIL), UM(DAGAZ), UM(FE), UM(GEBO), UM(HAGLZ), UM(JERAN), UM(KAUNA), UM(LAUKZ), XXXXXXX, NM(SCLN) }, + {MT_QUOT, XXXXXXX, UM(ALGIZ), UM(THURS), UM(KAUNA), UM(WUNJO), UM(BEORC), UM(NAUDZ), UM(MANNZ), KC_COMM, FK(DOT), RS(SLSH) }, {LC(ESC), XXXXXXX, LG(LBRC), LA(RBRC), NM(BSPC), XXXXXXX, XXXXXXX, SM(SPC), XXXXXXX, RA(MINS), RG(EQL), RC(ENT) } }, #endif diff --git a/keyboards/handwired/promethium/keymaps/default/keymap.c b/keyboards/handwired/promethium/keymaps/default/keymap.c index 100db976781e..42819245c7af 100644 --- a/keyboards/handwired/promethium/keymaps/default/keymap.c +++ b/keyboards/handwired/promethium/keymaps/default/keymap.c @@ -779,9 +779,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_PUNC] = LAYOUT( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, X(LTEQ), X(GTEQ), _______, - KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, X(NOTEQ),KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, _______, - KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, X(PLMIN),KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, UM(LTEQ), UM(GTEQ), _______, + KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, UM(NOTEQ),KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, _______, + KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, UM(PLMIN),KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_COLN, _______, _______, _______, _______ ), @@ -836,9 +836,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_GREEKU] = LAYOUT( - _______, XXXXXXX, XXXXXXX,X(UEPSI), X(URHO), X(UTAU),X(UUPSI),X(UTHET),X(UIOTA),X(UOMIC), X(UPI), _______, - _______,X(UALPH),X(USIGM),X(UDELT), X(UPHI),X(UGAMM), X(UETA), X(UXI),X(UKAPP),X(ULAMB), KC_QUOT, _______, - _______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), KC_COMM, KC_DOT, KC_SLSH, _______, + _______, XXXXXXX, XXXXXXX,UM(UEPSI), UM(URHO), UM(UTAU),UM(UUPSI),UM(UTHET),UM(UIOTA),UM(UOMIC), UM(UPI), _______, + _______,UM(UALPH),UM(USIGM),UM(UDELT), UM(UPHI),UM(UGAMM), UM(UETA), UM(UXI),UM(UKAPP),UM(ULAMB), KC_QUOT, _______, + _______,UM(UZETA), UM(UCHI), UM(UPSI),UM(UOMEG),UM(UBETA), UM(UNU), UM(UMU), KC_COMM, KC_DOT, KC_SLSH, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), @@ -855,9 +855,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_GREEKL] = LAYOUT( - _______, XXXXXXX,X(FSIGM),X(LEPSI), X(LRHO), X(LTAU),X(LUPSI),X(LTHET),X(LIOTA),X(LOMIC), X(LPI), _______, - _______,X(LALPH),X(LSIGM),X(LDELT), X(LPHI),X(LGAMM), X(LETA), X(LXI),X(LKAPP),X(LLAMB), KC_QUOT, _______, - _______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), KC_COMM, KC_DOT, KC_SLSH, _______, + _______, XXXXXXX,UM(FSIGM),UM(LEPSI), UM(LRHO), UM(LTAU),UM(LUPSI),UM(LTHET),UM(LIOTA),UM(LOMIC), UM(LPI), _______, + _______,UM(LALPH),UM(LSIGM),UM(LDELT), UM(LPHI),UM(LGAMM), UM(LETA), UM(LXI),UM(LKAPP),UM(LLAMB), KC_QUOT, _______, + _______,UM(LZETA), UM(LCHI), UM(LPSI),UM(LOMEG),UM(LBETA), UM(LNU), UM(LMU), KC_COMM, KC_DOT, KC_SLSH, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), @@ -893,10 +893,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_EMOJI] = LAYOUT( - X(HART2), X(CRY2),X(WEARY),X(EYERT),X(SMIRK), X(TJOY),X(RECYC),X(UNAMU),X(MUSIC),X(OKHND),X(PENSV), X(PHEW), - X(THMUP), X(PRAY),X(SMILE),X(SMIL2),X(FLUSH), X(GRIN),X(HEART), X(BYE), X(KISS),X(CELEB), X(COOL),X(NOEVS), - X(THMDN),X(SLEEP), X(CLAP), X(CRY), X(VIC),X(BHART), X(SUN),X(SMEYE), X(WINK), X(MOON),X(CONFU),X(NOEVH), - X(POO), X(EYES), X(HUNRD),_______, X(SKULL),X(HORNS), X(HALO), X(FEAR),_______,X(YUMMY),X(DISAP),X(NOEVK), + UM(HART2), UM(CRY2),UM(WEARY),UM(EYERT),UM(SMIRK), UM(TJOY),UM(RECYC),UM(UNAMU),UM(MUSIC),UM(OKHND),UM(PENSV), UM(PHEW), + UM(THMUP), UM(PRAY),UM(SMILE),UM(SMIL2),UM(FLUSH), UM(GRIN),UM(HEART), UM(BYE), UM(KISS),UM(CELEB), UM(COOL),UM(NOEVS), + UM(THMDN),UM(SLEEP), UM(CLAP), UM(CRY), UM(VIC),UM(BHART), UM(SUN),UM(SMEYE), UM(WINK), UM(MOON),UM(CONFU),UM(NOEVH), + UM(POO), UM(EYES), UM(HUNRD),_______, UM(SKULL),UM(HORNS), UM(HALO), UM(FEAR),_______,UM(YUMMY),UM(DISAP),UM(NOEVK), _______, _______, _______ ), diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 1d299c229932..203a0eda22a1 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -782,9 +782,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_PUNC] = LAYOUT( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, X(LTEQ), X(GTEQ), _______, - KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, X(NOTEQ),KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, _______, - KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, X(PLMIN),KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, UM(LTEQ), UM(GTEQ), _______, + KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, UM(NOTEQ),KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, _______, + KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, UM(PLMIN),KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_COLN, _______, _______, _______, _______ ), @@ -839,9 +839,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_GREEKU] = LAYOUT( - _______, XXXXXXX, XXXXXXX,X(UEPSI), X(URHO), X(UTAU),X(UUPSI),X(UTHET),X(UIOTA),X(UOMIC), X(UPI), _______, - _______,X(UALPH),X(USIGM),X(UDELT), X(UPHI),X(UGAMM), X(UETA), X(UXI),X(UKAPP),X(ULAMB), KC_QUOT, _______, - _______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), KC_COMM, KC_DOT, KC_SLSH, _______, + _______, XXXXXXX, XXXXXXX,UM(UEPSI), UM(URHO), UM(UTAU),UM(UUPSI),UM(UTHET),UM(UIOTA),UM(UOMIC), UM(UPI), _______, + _______,UM(UALPH),UM(USIGM),UM(UDELT), UM(UPHI),UM(UGAMM), UM(UETA), UM(UXI),UM(UKAPP),UM(ULAMB), KC_QUOT, _______, + _______,UM(UZETA), UM(UCHI), UM(UPSI),UM(UOMEG),UM(UBETA), UM(UNU), UM(UMU), KC_COMM, KC_DOT, KC_SLSH, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), @@ -858,9 +858,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_GREEKL] = LAYOUT( - _______, XXXXXXX,X(FSIGM),X(LEPSI), X(LRHO), X(LTAU),X(LUPSI),X(LTHET),X(LIOTA),X(LOMIC), X(LPI), _______, - _______,X(LALPH),X(LSIGM),X(LDELT), X(LPHI),X(LGAMM), X(LETA), X(LXI),X(LKAPP),X(LLAMB), KC_QUOT, _______, - _______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), KC_COMM, KC_DOT, KC_SLSH, _______, + _______, XXXXXXX,UM(FSIGM),UM(LEPSI), UM(LRHO), UM(LTAU),UM(LUPSI),UM(LTHET),UM(LIOTA),UM(LOMIC), UM(LPI), _______, + _______,UM(LALPH),UM(LSIGM),UM(LDELT), UM(LPHI),UM(LGAMM), UM(LETA), UM(LXI),UM(LKAPP),UM(LLAMB), KC_QUOT, _______, + _______,UM(LZETA), UM(LCHI), UM(LPSI),UM(LOMEG),UM(LBETA), UM(LNU), UM(LMU), KC_COMM, KC_DOT, KC_SLSH, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), @@ -896,10 +896,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_EMOJI] = LAYOUT( - X(HART2), X(CRY2),X(WEARY),X(EYERT),X(SMIRK), X(TJOY),X(RECYC),X(UNAMU),X(MUSIC),X(OKHND),X(PENSV), X(PHEW), - X(THMUP), X(PRAY),X(SMILE),X(SMIL2),X(FLUSH), X(GRIN),X(HEART), X(BYE), X(KISS),X(CELEB), X(COOL),X(NOEVS), - X(THMDN),X(SLEEP), X(CLAP), X(CRY), X(VIC),X(BHART), X(SUN),X(SMEYE), X(WINK), X(MOON),X(CONFU),X(NOEVH), - X(POO), X(EYES), X(HUNRD),_______, X(SKULL),X(HORNS), X(HALO), X(FEAR),_______,X(YUMMY),X(DISAP),X(NOEVK), + UM(HART2), UM(CRY2),UM(WEARY),UM(EYERT),UM(SMIRK), UM(TJOY),UM(RECYC),UM(UNAMU),UM(MUSIC),UM(OKHND),UM(PENSV), UM(PHEW), + UM(THMUP), UM(PRAY),UM(SMILE),UM(SMIL2),UM(FLUSH), UM(GRIN),UM(HEART), UM(BYE), UM(KISS),UM(CELEB), UM(COOL),UM(NOEVS), + UM(THMDN),UM(SLEEP), UM(CLAP), UM(CRY), UM(VIC),UM(BHART), UM(SUN),UM(SMEYE), UM(WINK), UM(MOON),UM(CONFU),UM(NOEVH), + UM(POO), UM(EYES), UM(HUNRD),_______, UM(SKULL),UM(HORNS), UM(HALO), UM(FEAR),_______,UM(YUMMY),UM(DISAP),UM(NOEVK), _______, _______, _______ ), diff --git a/keyboards/handwired/t111/keymaps/oleg/keymap.c b/keyboards/handwired/t111/keymaps/oleg/keymap.c index dd0c0971970d..b372de027bfd 100644 --- a/keyboards/handwired/t111/keymaps/oleg/keymap.c +++ b/keyboards/handwired/t111/keymaps/oleg/keymap.c @@ -117,10 +117,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [1] = LAYOUT( VRSN, KC_SLEP, _______, UC_NEXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, X(UAT), X(UHSH), X(UDLR), X(USCT), X(UCFX), X(UAMP), X(UAST), _______, _______, _______, _______, _______, _______, _______, _______, KC_CALC, _______, _______, _______, - _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_BTN3, _______, _______, _______, KC_SYRQ, KC_SCRL, KC_PAUS, XP(ULSB, ULCB), XP(URSB, URCB), _______, _______, _______, _______, _______, _______, _______, - _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN5, _______, _______, _______, _______, _______, XP(USCO, UCLN), XP(UAPO, UQOT), _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, KC_BTN4, _______, _______, _______, _______, XP(UCOM, ULTH), XP(UDOT, UGTH), XP(USLS, UQUE), KC_APP, _______, _______, _______, _______, _______, _______, _______, + _______, _______, UM(UAT), UM(UHSH), UM(UDLR), UM(USCT), UM(UCFX), UM(UAMP), UM(UAST), _______, _______, _______, _______, _______, _______, _______, _______, KC_CALC, _______, _______, _______, + _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_BTN3, _______, _______, _______, KC_SYRQ, KC_SCRL, KC_PAUS, UP(ULSB, ULCB), UP(URSB, URCB), _______, _______, _______, _______, _______, _______, _______, + _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN5, _______, _______, _______, _______, _______, UP(USCO, UCLN), UP(UAPO, UQOT), _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_BTN4, _______, _______, _______, _______, UP(UCOM, ULTH), UP(UDOT, UGTH), UP(USLS, UQUE), KC_APP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; diff --git a/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/rules.mk b/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/rules.mk index 7fef013a388c..d2d2a9b874d7 100644 --- a/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/rules.mk +++ b/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/rules.mk @@ -6,4 +6,3 @@ TAP_DANCE_ENABLE = yes UNICODE_ENABLE = yes OLED_ENABLE = yes WPM_ENABLE = yes -# DEBOUNCE_TYPE = sym_eager_pk diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h index 2ab49de9faf3..73ea40fb764c 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h +++ b/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h @@ -32,10 +32,10 @@ along with this program. If not, see . #define WS2812_PWM_TARGET_PERIOD 800000 -#define RGBLED_NUM 52 +#define RGBLED_NUM 57 #define RGBLIGHT_SPLIT #define RGBLED_SPLIT \ - { 26, 26 } + { 26, 31 } #define DEBUG_LED_PIN C13 diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f411/post_config.h b/keyboards/handwired/tractyl_manuform/5x6_right/f411/post_config.h deleted file mode 100644 index 0e33129e1a9e..000000000000 --- a/keyboards/handwired/tractyl_manuform/5x6_right/f411/post_config.h +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#ifndef RGBLIGHT_LIMIT_VAL -# if defined(OLED_ENABLE) -# define RGBLIGHT_LIMIT_VAL 100 -# else -# define RGBLIGHT_LIMIT_VAL 150 -# endif -#endif - -#ifndef OLED_BRIGHTNESS -# ifdef RGBLIGHT_ENABLE -# define OLED_BRIGHTNESS 80 -# else -# define OLED_BRIGHTNESS 150 -# endif -#endif diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/config.h index f159a69174e8..a449a126d6ac 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/config.h +++ b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/config.h @@ -16,21 +16,21 @@ #pragma once -#define DEBOUNCE 45 - -#ifdef OLED_DRIVER_SH1107 -# undef OLED_DISPLAY_128X64 -#endif +#undef OLED_DISPLAY_128X64 +#define OLED_DISPLAY_128X128 +#define OLED_BRIGHTNESS 200 #define CHARYBDIS_MINIMUM_DEFAULT_DPI 1200 #define CHARYBDIS_DEFAULT_DPI_CONFIG_STEP 200 #define CHARYBDIS_MINIMUM_SNIPING_DPI 400 #define CHARYBDIS_SNIPING_DPI_CONFIG_STEP 200 -#define ENCODER_DEFAULT_POS 0x3 - - #define BOOTMAGIC_LITE_EEPROM_ROW 1 #define BOOTMAGIC_LITE_EEPROM_COLUMN 0 #define BOOTMAGIC_LITE_EEPROM_ROW_RIGHT 7 #define BOOTMAGIC_LITE_EEPROM_COLUMN_RIGHT 5 + + +#define FB_ERM_LRA 0 +#define DRV_GREETING alert_750ms +#define DRV_MODE_DEFAULT buzz diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c index 93d3529edbcf..380e17fb09f3 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c +++ b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c @@ -90,8 +90,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_V, _______, _______ ), [_MOUSE] = LAYOUT_5x6_right( - _______, _______, _______, _______, _______, _______, DRGSCRL, DPI_RMOD,DPI_MOD, S_D_RMOD,S_D_MOD, SNP_TOG, - _______, _______, _______, _______, _______, _______, KC_WH_U, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, DPI_RMOD,DPI_MOD, S_D_RMOD,S_D_MOD, PD_JIGGLER, + _______, _______, _______, _______, _______, _______, KC_WH_U, _______, _______, _______, _______, DRGSCRL, _______, _______, _______, _______, _______, _______, KC_WH_D, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN6, SNIPING, _______, _______, _______, _______, _______, _______, KC_BTN7, KC_BTN4, KC_BTN5, KC_BTN8, _______, _______, _______, _______, _______, _______, @@ -115,7 +115,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS, _______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, _______, _______, _______, _______, _______, - _______, _______, _______, + OL_LOCK, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), @@ -126,96 +126,35 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { UC_NEXT, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, KC_MPLY, TG(_DIABLOII), AUTO_CTN, TG_GAME, TG_DBLO, _______, QK_RBT, KC_NUKE, - _______, _______, _______, + HF_TOGG, _______, _______, _______, _______, KC_NUKE, _______ ), }; // clang-format on -#ifdef ENCODER_ENABLE -# ifdef ENCODER_MAP_ENABLE +#ifdef ENCODER_MAP_ENABLE // clang-format off const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { - [_DEFAULT_LAYER_1] = { ENCODER_CCW_CW( KC_VOLD, KC_VOLU ), ENCODER_CCW_CW( KC_WH_D, KC_WH_U ) }, + [_DEFAULT_LAYER_1] = { ENCODER_CCW_CW( KC_VOLU, KC_VOLD ), ENCODER_CCW_CW( KC_WH_U, KC_WH_D ) }, [_DEFAULT_LAYER_2] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) }, [_DEFAULT_LAYER_3] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) }, [_DEFAULT_LAYER_4] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) }, [_GAMEPAD] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) }, [_DIABLO] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) }, - [_MOUSE] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( KC_WH_D, KC_WH_U ) }, + [_MOUSE] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) }, [_MEDIA] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) }, - [_RAISE] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( KC_PGDN, KC_PGUP ) }, - [_LOWER] = { ENCODER_CCW_CW( RGB_MOD, RGB_RMOD), ENCODER_CCW_CW( RGB_HUD, RGB_HUI ) }, - [_ADJUST] = { ENCODER_CCW_CW( CK_DOWN, CK_UP ), ENCODER_CCW_CW( _______, _______ ) }, + [_RAISE] = { ENCODER_CCW_CW( OL_BINC, OL_BDEC ), ENCODER_CCW_CW( KC_PGDN, KC_PGUP ) }, + [_LOWER] = { ENCODER_CCW_CW( RGB_MOD, RGB_RMOD), ENCODER_CCW_CW( RGB_HUI, RGB_HUD ) }, + [_ADJUST] = { ENCODER_CCW_CW( CK_UP, CK_DOWN ), ENCODER_CCW_CW( _______, _______ ) }, }; // clang-format on -# else - -deferred_token encoder_token = INVALID_DEFERRED_TOKEN; -static int8_t last_direction = -1; - -static uint32_t encoder_callback(uint32_t trigger_time, void *cb_arg) { - unregister_code(last_direction ? KC_WH_D : KC_WH_U); - last_direction = -1; - return 0; -} - -bool encoder_update_user(uint8_t index, bool clockwise) { -# ifdef SWAP_HANDS_ENABLE - if (swap_hands) { - index ^= 1; - } -# endif - if (index == 0) { - tap_code_delay(clockwise ? KC_VOLD : KC_VOLU, 5); - } else if (index == 1) { - if (last_direction != clockwise || encoder_token == INVALID_DEFERRED_TOKEN) { - uint8_t keycode = clockwise ? KC_WH_D : KC_WH_U; - last_direction = clockwise; - if (encoder_token != INVALID_DEFERRED_TOKEN) { - if (cancel_deferred_exec(encoder_token)) { - encoder_token = INVALID_DEFERRED_TOKEN; - } - unregister_code(clockwise ? KC_WH_U : KC_WH_D); - } - register_code(keycode); - encoder_token = defer_exec(MOUSEKEY_WHEEL_DELAY + MOUSEKEY_WHEEL_INTERVAL, encoder_callback, NULL); - } else { - extend_deferred_exec(encoder_token, MOUSEKEY_WHEEL_INTERVAL); - } - } - return false; -} -# endif #endif #ifdef OLED_ENABLE -# include "keyrecords/unicode.h" - oled_rotation_t oled_init_keymap(oled_rotation_t rotation) { return OLED_ROTATION_180; } -void oled_render_large_display(bool side) { - if (side) { - render_wpm_graph(56, 64); - } else { - oled_advance_page(true); - oled_advance_page(true); - - // clang-format off - static const char PROGMEM 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, 0x00 - }; - // clang-format on - oled_write_P(logo, false); - - render_unicode_mode(1, 14); - } -} - void render_oled_title(bool side) { oled_write_P(side ? PSTR(" Tractyl ") : PSTR(" Manuform "), true); } diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/rules.mk b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/rules.mk index acec28fa6e23..9f5341e973dc 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/rules.mk +++ b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/rules.mk @@ -5,7 +5,6 @@ CUSTOM_BOOTMAGIC_ENABLE = no CUSTOM_UNICODE_ENABLE = no HAPTIC_ENABLE = no OLED_ENABLE = no -OLED_DRIVER = custom RGBLIGHT_ENABLE = no SWAP_HANDS_ENABLE = no TAP_DANCE_ENABLE = no @@ -16,12 +15,14 @@ ifeq ($(strip $(KEYBOARD)), handwired/tractyl_manuform/5x6_right/elite_c) BOOTLOADER_SIZE = 512 CUSTOM_SPLIT_TRANSPORT_SYNC = no LTO_ENABLE = yes + MOUSEKEY_ENABLE = no endif ifeq ($(strip $(KEYBOARD)), handwired/tractyl_manuform/5x6_right/arduinomicro) BOOTLOADER = qmk-hid BOOTLOADER_SIZE = 512 CUSTOM_SPLIT_TRANSPORT_SYNC = no LTO_ENABLE = yes + MOUSEKEY_ENABLE = no endif ifeq ($(strip $(KEYBOARD)), handwired/tractyl_manuform/5x6_right/teensy2pp) AUTOCORRECT_ENABLE = no @@ -33,8 +34,9 @@ ifeq ($(strip $(KEYBOARD)), handwired/tractyl_manuform/5x6_right/f411) AUTOCORRECT_ENABLE = yes LTO_SUPPORTED = no OVERLOAD_FEATURES = yes + HAPTIC_ENABLE = yes + HAPTIC_DRIVER = DRV2605L endif -# DEBOUNCE_TYPE = sym_eager_pk ifeq ($(strip $(OVERLOAD_FEATURES)), yes) AUDIO_ENABLE = yes diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/config.h index dd5da75821a6..ce8e65e92486 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/config.h +++ b/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/config.h @@ -23,7 +23,7 @@ along with this program. If not, see . #define RGBLIGHT_SPLIT #define RGBLED_SPLIT \ { 10, 10 } -#define OLED_BRIGHTNESS 50 +#define RGBLIGHT_LIMIT_VAL 80 #define DEBUG_LED_PIN D6 diff --git a/keyboards/handwired/tractyl_manuform/post_config.h b/keyboards/handwired/tractyl_manuform/post_config.h index c48518ddd300..b5d67132b260 100644 --- a/keyboards/handwired/tractyl_manuform/post_config.h +++ b/keyboards/handwired/tractyl_manuform/post_config.h @@ -94,3 +94,19 @@ along with this program. If not, see . #ifndef DEBOUNCE # define DEBOUNCE 5 #endif + +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_LIMIT_VAL) +# if defined(OLED_ENABLE) +# define RGBLIGHT_LIMIT_VAL 100 +# else +# define RGBLIGHT_LIMIT_VAL 150 +# endif +#endif + +#if !defined(OLED_BRIGHTNESS) +# if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) +# define OLED_BRIGHTNESS 80 +# else +# define OLED_BRIGHTNESS 150 +# endif +#endif diff --git a/keyboards/handwired/wulkan/keymaps/default/keymap.c b/keyboards/handwired/wulkan/keymaps/default/keymap.c index b73592760e2b..3a333198a44b 100644 --- a/keyboards/handwired/wulkan/keymaps/default/keymap.c +++ b/keyboards/handwired/wulkan/keymaps/default/keymap.c @@ -95,8 +95,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT_ortho_4x12( - _______, QK_BOOT, _______, _______, KC_WH_U, _______, _______, KC_MS_U, _______, _______, XP(SE_ARNG_LOW, SE_ARNG_HIGH), KC_DEL, - _______, _______, _______, _______, KC_WH_D, _______, KC_MS_L, KC_MS_D, KC_MS_R, XP(SE_ODIA_LOW, SE_ODIA_HIGH), XP(SE_ADIA_LOW, SE_ADIA_HIGH), _______, + _______, QK_BOOT, _______, _______, KC_WH_U, _______, _______, KC_MS_U, _______, _______, UP(SE_ARNG_LOW, SE_ARNG_HIGH), KC_DEL, + _______, _______, _______, _______, KC_WH_D, _______, KC_MS_L, KC_MS_D, KC_MS_R, UP(SE_ODIA_LOW, SE_ODIA_HIGH), UP(SE_ADIA_LOW, SE_ADIA_HIGH), _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, KC_BTN1, _______, KC_BTN2, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) diff --git a/keyboards/hidtech/bastyl/keymaps/nstickney/keymap.c b/keyboards/hidtech/bastyl/keymaps/nstickney/keymap.c index 8dbb31130913..e068f81a73f5 100644 --- a/keyboards/hidtech/bastyl/keymaps/nstickney/keymap.c +++ b/keyboards/hidtech/bastyl/keymaps/nstickney/keymap.c @@ -33,15 +33,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //-------------------------------// KC_LBRC, TD(LOCKS), TD(LAYERS), KC_RBRC), - [SYMB] = LAYOUT(_______, XP(IEX, SS1), X(SS2), X(SS3), XP(CUR, GBP), X(EUR), X(V14), X(V12), X(V34), XP(LSQ, LDQ), XP(RSQ, RDQ), _______, + [SYMB] = LAYOUT(_______, UP(IEX, SS1), UM(SS2), UM(SS3), UP(CUR, GBP), UM(EUR), UM(V14), UM(V12), UM(V34), UP(LSQ, LDQ), UP(RSQ, RDQ), _______, //-------------------------------// - _______, XP(A_D, AXD), XP(A_R, ACR), XP(E_A, ECA), XP(REG, CPL), X(THR), XP(U_D, UCD), XP(U_A, UCA), XP(I_A, ICA), XP(O_A, OCA), XP(O_D, OCD), _______, + _______, UP(A_D, AXD), UP(A_R, ACR), UP(E_A, ECA), UP(REG, CPL), UM(THR), UP(U_D, UCD), UP(U_A, UCA), UP(I_A, ICA), UP(O_A, OCA), UP(O_D, OCD), _______, //-------------------------------// - _______, XP(A_A, ACA), XP(S_S, SEC), XP(ETH, ETC), X(EMD), _______, _______, _______, _______, XP(O_S, OCS), XP(PLC, DEG), XP(ACT, DIS), + _______, UP(A_A, ACA), UP(S_S, SEC), UP(ETH, ETC), UM(EMD), _______, _______, _______, _______, UP(O_S, OCS), UP(PLC, DEG), UP(ACT, DIS), //-------------------------------// - _______, XP(AEL, AEC), _______, XP(CPR, CNT), _______, _______, _______, _______, XP(N_T, NCT), X(MCR), XP(C_C, CCC), _______, + _______, UP(AEL, AEC), _______, UP(CPR, CNT), _______, _______, _______, _______, UP(N_T, NCT), UM(MCR), UP(C_C, CCC), _______, //-------------------------------// - X(IQM), XP(NOT, BKB), _______, _______, X(YEN), XP(MLT, DIV), + UM(IQM), UP(NOT, BKB), _______, _______, UM(YEN), UP(MLT, DIV), //-------------------------------// _______, _______, _______, _______), diff --git a/keyboards/holyswitch/lightweight65/info.json b/keyboards/holyswitch/lightweight65/info.json new file mode 100644 index 000000000000..438fb5fe8975 --- /dev/null +++ b/keyboards/holyswitch/lightweight65/info.json @@ -0,0 +1,99 @@ +{ + "keyboard_name": "Lightweight65", + "manufacturer": "HolySwitch", + "url": "", + "maintainer": "DeskDaily", + "usb": { + "vid": "0x484F", + "pid": "0x0651", + "device_version": "1.0.0" + }, + "processor": "atmega32u4", + "bootloader": "atmel-dfu", + "matrix_pins": { + "rows": ["F4", "F1", "D5", "C6", "F6"], + "cols": ["F0", "B6", "B5", "B4", "D7", "D6", "B1", "B2", "B3", "B7", "D4", "D2", "D1", "D0", "D3"] + }, + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "mousekey": true, + "extrakey": true, + "console": false, + "command": false, + "nkro": true, + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 1], "x": 1, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, + {"matrix": [0, 6], "x": 6, "y": 0}, + {"matrix": [0, 7], "x": 7, "y": 0}, + {"matrix": [0, 8], "x": 8, "y": 0}, + {"matrix": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 13], "x": 13, "y": 0, "w": 2}, + {"matrix": [0, 14], "x": 15, "y": 0}, + {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [1, 1], "x": 1.5, "y": 1}, + {"matrix": [1, 2], "x": 2.5, "y": 1}, + {"matrix": [1, 3], "x": 3.5, "y": 1}, + {"matrix": [1, 4], "x": 4.5, "y": 1}, + {"matrix": [1, 5], "x": 5.5, "y": 1}, + {"matrix": [1, 6], "x": 6.5, "y": 1}, + {"matrix": [1, 7], "x": 7.5, "y": 1}, + {"matrix": [1, 8], "x": 8.5, "y": 1}, + {"matrix": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, + {"matrix": [1, 14], "x": 15, "y": 1}, + {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [2, 1], "x": 1.75, "y": 2}, + {"matrix": [2, 2], "x": 2.75, "y": 2}, + {"matrix": [2, 3], "x": 3.75, "y": 2}, + {"matrix": [2, 4], "x": 4.75, "y": 2}, + {"matrix": [2, 5], "x": 5.75, "y": 2}, + {"matrix": [2, 6], "x": 6.75, "y": 2}, + {"matrix": [2, 7], "x": 7.75, "y": 2}, + {"matrix": [2, 8], "x": 8.75, "y": 2}, + {"matrix": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [2, 14], "x": 15, "y": 2}, + {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [3, 2], "x": 2.25, "y": 3}, + {"matrix": [3, 3], "x": 3.25, "y": 3}, + {"matrix": [3, 4], "x": 4.25, "y": 3}, + {"matrix": [3, 5], "x": 5.25, "y": 3}, + {"matrix": [3, 6], "x": 6.25, "y": 3}, + {"matrix": [3, 7], "x": 7.25, "y": 3}, + {"matrix": [3, 8], "x": 8.25, "y": 3}, + {"matrix": [3, 9], "x": 9.25, "y": 3}, + {"matrix": [3, 10], "x": 10.25, "y": 3}, + {"matrix": [3, 11], "x": 11.25, "y": 3}, + {"matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [3, 13], "x": 14, "y": 3}, + {"matrix": [3, 14], "x": 15, "y": 3}, + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25}, + {"matrix": [4, 2], "x": 1.25, "y": 4, "w": 1.25}, + {"matrix": [4, 3], "x": 2.5, "y": 4, "w": 1.25}, + {"matrix": [4, 7], "x": 3.75, "y": 4, "w": 6.25}, + {"matrix": [4, 10], "x": 10, "y": 4, "w": 1.25}, + {"matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25}, + {"matrix": [4, 12], "x": 13, "y": 4}, + {"matrix": [4, 13], "x": 14, "y": 4}, + {"matrix": [4, 14], "x": 15, "y": 4} + ] + } + } +} diff --git a/keyboards/holyswitch/lightweight65/keymaps/default/keymap.c b/keyboards/holyswitch/lightweight65/keymaps/default/keymap.c new file mode 100644 index 000000000000..bac1c8d4bcac --- /dev/null +++ b/keyboards/holyswitch/lightweight65/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2023 DeskDaily + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT( + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; \ No newline at end of file diff --git a/keyboards/holyswitch/lightweight65/keymaps/via/keymap.c b/keyboards/holyswitch/lightweight65/keymaps/via/keymap.c new file mode 100644 index 000000000000..bac1c8d4bcac --- /dev/null +++ b/keyboards/holyswitch/lightweight65/keymaps/via/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2023 DeskDaily + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT( + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; \ No newline at end of file diff --git a/keyboards/holyswitch/lightweight65/keymaps/via/rules.mk b/keyboards/holyswitch/lightweight65/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/holyswitch/lightweight65/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/holyswitch/lightweight65/readme.md b/keyboards/holyswitch/lightweight65/readme.md new file mode 100644 index 000000000000..8e5bb83e3310 --- /dev/null +++ b/keyboards/holyswitch/lightweight65/readme.md @@ -0,0 +1,22 @@ +# Lightweight65 + +* Keyboard Maintainer: [DeskDaily](https://github.com/DeskDaily) +* Hardware Supported: Atmega32u4 + +Make example for this keyboard (after setting up your build environment): + + make holyswitch/lightweight65:default + +Flashing example for this keyboard: + + make holyswitch/lightweight65:default:flash + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the upper left key/esc) and plug in the keyboard +* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/holyswitch/lightweight65/rules.mk b/keyboards/holyswitch/lightweight65/rules.mk new file mode 100644 index 000000000000..6e7633bfe015 --- /dev/null +++ b/keyboards/holyswitch/lightweight65/rules.mk @@ -0,0 +1 @@ +# This file intentionally left blank diff --git a/keyboards/keebio/iris/keymaps/nstickney/keymap.c b/keyboards/keebio/iris/keymaps/nstickney/keymap.c index cc4c5bf37539..cf53ffd93485 100644 --- a/keyboards/keebio/iris/keymaps/nstickney/keymap.c +++ b/keyboards/keebio/iris/keymaps/nstickney/keymap.c @@ -27,11 +27,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [SYMB] = LAYOUT( - _______, XP(IEX, SS1), X(SS2), X(SS3), XP(CUR, GBP), X(EUR), X(V14), X(V12), X(V34), XP(LSQ, LDQ), XP(RSQ, RDQ), _______, - _______, XP(A_D, AXD), XP(A_R, ACR), XP(E_A, ECA), XP(REG, CPL), X(THR), XP(U_D, UCD), XP(U_A, UCA), XP(I_A, ICA), XP(O_A, OCA), XP(O_D, OCD), _______, - _______, XP(A_A, ACA), XP(S_S, SEC), XP(ETH, ETC), X(EMD), _______, _______, _______, _______, XP(O_S, OCS), XP(PLC, DEG), XP(ACT, DIS), - _______, XP(AEL, AEC), _______, XP(CPR, CNT), _______, _______, _______, _______, XP(N_T, NCT), X(MCR), XP(C_C, CCC), _______, _______, _______, - X(IQM), XP(NOT, BKB), _______, _______, X(YEN), XP(MLT, DIV) + _______, UP(IEX, SS1), UM(SS2), UM(SS3), UP(CUR, GBP), UM(EUR), UM(V14), UM(V12), UM(V34), UP(LSQ, LDQ), UP(RSQ, RDQ), _______, + _______, UP(A_D, AXD), UP(A_R, ACR), UP(E_A, ECA), UP(REG, CPL), UM(THR), UP(U_D, UCD), UP(U_A, UCA), UP(I_A, ICA), UP(O_A, OCA), UP(O_D, OCD), _______, + _______, UP(A_A, ACA), UP(S_S, SEC), UP(ETH, ETC), UM(EMD), _______, _______, _______, _______, UP(O_S, OCS), UP(PLC, DEG), UP(ACT, DIS), + _______, UP(AEL, AEC), _______, UP(CPR, CNT), _______, _______, _______, _______, UP(N_T, NCT), UM(MCR), UP(C_C, CCC), _______, _______, _______, + UM(IQM), UP(NOT, BKB), _______, _______, UM(YEN), UP(MLT, DIV) ), [NUMP] = LAYOUT( diff --git a/keyboards/keebio/nyquist/keymaps/bramver/keymap.c b/keyboards/keebio/nyquist/keymaps/bramver/keymap.c index 04433c41cde8..4518cb326d88 100644 --- a/keyboards/keebio/nyquist/keymaps/bramver/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/bramver/keymap.c @@ -232,9 +232,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_EMOJI] = LAYOUT( TO(0) , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , /**/ QK_BOOT , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , _______ , - _______ , X(CLAP) , X(CUM) , X(BNIS) , X(BUTT) , X(CAR) , /**/ X(FIRE) , X(REDB) , X(MONY) , X(HNDR) , X(SOS) , _______ , - XXXXXXX , X(CELE) , X(PRAY) , X(NAIL) , X(OK) , X(THNK) , /**/ X(UNAM) , X(HEYE) , X(COOL) , X(EYES) , X(SMIR) , KC_DEL , - _______ , X(TRIU) , X(SCRM) , X(VOMI) , X(DTIV) , X(EXPL) , /**/ X(HAIR) , X(DANC) , X(STRN) , X(LEFT) , X(RGHT) , _______ , + _______ , UM(CLAP) , UM(CUM) , UM(BNIS) , UM(BUTT) , UM(CAR) , /**/ UM(FIRE) , UM(REDB) , UM(MONY) , UM(HNDR) , UM(SOS) , _______ , + XXXXXXX , UM(CELE) , UM(PRAY) , UM(NAIL) , UM(OK) , UM(THNK) , /**/ UM(UNAM) , UM(HEYE) , UM(COOL) , UM(EYES) , UM(SMIR) , KC_DEL , + _______ , UM(TRIU) , UM(SCRM) , UM(VOMI) , UM(DTIV) , UM(EXPL) , /**/ UM(HAIR) , UM(DANC) , UM(STRN) , UM(LEFT) , UM(RGHT) , _______ , _______ , _______ , _______ , _______ , _______ , XXXXXXX , /**/ XXXXXXX , _______ , _______ , _______ , XXXXXXX , _______ ), diff --git a/keyboards/keebio/quefrency/keymaps/bramver/README.md b/keyboards/keebio/quefrency/keymaps/bramver/README.md index 547e2686f88b..1665e4fd3eb9 100644 --- a/keyboards/keebio/quefrency/keymaps/bramver/README.md +++ b/keyboards/keebio/quefrency/keymaps/bramver/README.md @@ -51,9 +51,9 @@ Mostly based off of my other XD75 and Nyquist layouts. /* EMOJ * * _______ , _______ , _______ , _______ , _______ , _______ , _______ , /**/ _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , - * _______ , X(CLAP) , X(CUM) , X(BNIS) , X(BUTT) , X(CAR) , /**/ X(FIRE) , X(REDB) , X(MONY) , X(HNDR) , X(SOS) , _______ , _______ , _______ , - * _______ , X(CELE) , X(PRAY) , X(NAIL) , X(OK) , X(THNK) , /**/ X(UNAM) , X(HEYE) , X(COOL) , X(EYES) , X(SMIR) , _______ , _______ , - * _______ , X(TRIU) , X(SCRM) , X(VOMI) , X(DTIV) , X(EXPL) , /**/ X(HAIR) , X(DANC) , X(STRN) , X(LEFT) , X(RGHT) , _______ , _______ , + * _______ , UM(CLAP) , UM(CUM) , UM(BNIS) , UM(BUTT) , UM(CAR) , /**/ UM(FIRE) , UM(REDB) , UM(MONY) , UM(HNDR) , UM(SOS) , _______ , _______ , _______ , + * _______ , UM(CELE) , UM(PRAY) , UM(NAIL) , UM(OK) , UM(THNK) , /**/ UM(UNAM) , UM(HEYE) , UM(COOL) , UM(EYES) , UM(SMIR) , _______ , _______ , + * _______ , UM(TRIU) , UM(SCRM) , UM(VOMI) , UM(DTIV) , UM(EXPL) , /**/ UM(HAIR) , UM(DANC) , UM(STRN) , UM(LEFT) , UM(RGHT) , _______ , _______ , * _______ , _______ , _______ , _______ , _______ , /**/ _______ , _______ , _______ , _______ , _______ , _______ , _______ * */ diff --git a/keyboards/keebio/quefrency/keymaps/bramver/keymap.c b/keyboards/keebio/quefrency/keymaps/bramver/keymap.c index f855425ec018..9c6729e91e2f 100644 --- a/keyboards/keebio/quefrency/keymaps/bramver/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/bramver/keymap.c @@ -118,9 +118,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_EMOJ] = LAYOUT( _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , - _______ , X(CLAP) , X(CUM) , X(BNIS) , X(BUTT) , X(CAR) , X(FIRE) , X(REDB) , X(MONY) , X(HNDR) , X(SOS) , _______ , _______ , _______ , - _______ , X(CELE) , X(PRAY) , X(NAIL) , X(OK) , X(THNK) , X(UNAM) , X(HEYE) , X(COOL) , X(EYES) , X(SMIR) , _______ , _______ , - _______ , X(TRIU) , X(SCRM) , X(VOMI) , X(DTIV) , X(EXPL) , X(HAIR) , X(DANC) , X(STRN) , X(LEFT) , X(RGHT) , _______ , _______ , + _______ , UM(CLAP) , UM(CUM) , UM(BNIS) , UM(BUTT) , UM(CAR) , UM(FIRE) , UM(REDB) , UM(MONY) , UM(HNDR) , UM(SOS) , _______ , _______ , _______ , + _______ , UM(CELE) , UM(PRAY) , UM(NAIL) , UM(OK) , UM(THNK) , UM(UNAM) , UM(HEYE) , UM(COOL) , UM(EYES) , UM(SMIR) , _______ , _______ , + _______ , UM(TRIU) , UM(SCRM) , UM(VOMI) , UM(DTIV) , UM(EXPL) , UM(HAIR) , UM(DANC) , UM(STRN) , UM(LEFT) , UM(RGHT) , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ ), diff --git a/keyboards/keyboardio/atreus/keymaps/kkokdae/keymap.c b/keyboards/keyboardio/atreus/keymaps/kkokdae/keymap.c index 5ff5c87dac94..de8491d2463c 100644 --- a/keyboards/keyboardio/atreus/keymaps/kkokdae/keymap.c +++ b/keyboards/keyboardio/atreus/keymaps/kkokdae/keymap.c @@ -58,14 +58,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_MRWD, KC_VOLU, KC_VOLD, KC_MFFD, KC_MPLY, KC_INS, KC_F7, KC_F8, KC_F9, KC_CAPS, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, KC_BRIU, KC_F12, KC_F4, KC_F5, KC_F6, TD(TdL), KC_HOME, KC_PGUP, KC_PGDN, KC_END, KC_BRID, _______, _______, KC_F10, KC_F1, KC_F2, KC_F3, KC_F11, - _______, _______, _______, AS_TOGG, _______, _______, _______, DNUMPAD, _______, _______, _______, _______ + _______, _______, _______, CW_TOGG, _______, _______, _______, DNUMPAD, _______, _______, _______, _______ ), [_NUMPAD] = LAYOUT( _______, _______, _______, _______, _______, S(KC_E), KC_7, KC_8, KC_9, S(KC_F), TD(TdL), KC_EQL, KC_ASTR, KC_PLUS, _______, S(KC_C), KC_4, KC_5, KC_6, S(KC_D), TD(TdH), KC_DOT, KC_SLSH, KC_MINS, _______, _______, _______, S(KC_A), KC_1, KC_2, KC_3, S(KC_B), - _______, _______, _______, AS_TOGG, _______, _______, _______, _______, KC_0, _______, _______, _______ + _______, _______, _______, CW_TOGG, _______, _______, _______, _______, KC_0, _______, _______, _______ ), [_SYMBOL] = LAYOUT( @@ -76,22 +76,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -bool get_custom_auto_shifted_key(uint16_t keycode, keyrecord_t *record) { - switch(keycode) { - case KC_MINS: - case KC_UNDS: - case KC_BSPC: - return false; - } - - switch(keycode & 0xFF) { - case KC_1 ... KC_UP: - autoshift_disable(); - default: - return false; - } -} - void dance_hex(tap_dance_state_t *state, void *user_data) { switch(state->count) { case 1: @@ -120,7 +104,6 @@ void dance_lang(tap_dance_state_t *state, void *user_data) { } } - tap_dance_action_t tap_dance_actions[] = { [TdH] = ACTION_TAP_DANCE_FN(dance_hex), [TdL] = ACTION_TAP_DANCE_FN(dance_lang) diff --git a/keyboards/keyboardio/atreus/keymaps/kkokdae/readme.md b/keyboards/keyboardio/atreus/keymaps/kkokdae/readme.md index b67e31c49f43..f7f85f70a6a7 100644 --- a/keyboards/keyboardio/atreus/keymaps/kkokdae/readme.md +++ b/keyboards/keyboardio/atreus/keymaps/kkokdae/readme.md @@ -3,5 +3,3 @@ This is the keymap available for keyboardio/atreus keyboards. The default layout used [Colemak Mod-DH](https://colemakmods.github.io/mod-dh/). The prefix keys for vim/tmux users. The symbol is designed for ease of use by programmers. - -It used the idea of [Caps Work Behavior](https://zmk.dev/docs/behaviors/caps-word) by ZMK Firmware. I want to officially add this feature to QMK in the future diff --git a/keyboards/keyboardio/atreus/keymaps/kkokdae/rules.mk b/keyboards/keyboardio/atreus/keymaps/kkokdae/rules.mk index d24c14122aba..75ebcd912b76 100644 --- a/keyboards/keyboardio/atreus/keymaps/kkokdae/rules.mk +++ b/keyboards/keyboardio/atreus/keymaps/kkokdae/rules.mk @@ -1,3 +1,4 @@ MOUSEKEY_ENABLE = no +COMMAND_ENABLE = no TAP_DANCE_ENABLE = yes -AUTO_SHIFT_ENABLE = yes +CAPS_WORD_ENABLE = yes diff --git a/keyboards/keychron/q1/iso/keymaps/victorsavu3/keymap.c b/keyboards/keychron/q1/iso/keymaps/victorsavu3/keymap.c index b97e6bfb9224..5256c97dca7b 100644 --- a/keyboards/keychron/q1/iso/keymaps/victorsavu3/keymap.c +++ b/keyboards/keychron/q1/iso/keymaps/victorsavu3/keymap.c @@ -55,8 +55,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), [WIN_BASE] = LAYOUT_iso_83( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, X(SAD), - 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_EQL, KC_BSPC, X(GRIN), + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, UM(SAD), + 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_EQL, KC_BSPC, UM(GRIN), KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_PGUP, QK_LEAD, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGDN, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/coffee/config.h b/keyboards/kprepublic/bm40hsrgb/keymaps/coffee/config.h index b5c19a31b83b..e8f6fac1201d 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/coffee/config.h +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/coffee/config.h @@ -52,14 +52,6 @@ # undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif -// If RGBLight is enabled -#ifdef RGBLIGHT_ENABLE -# define RGBLED_NUM RGB_MATRIX_LED_COUNT - -# define RGBLIGHT_EFFECT_SNAKE -# define RGBLIGHT_EFFECT_STATIC_GRADIENT -#endif - // Feature disable #ifndef NO_PRINT # define NO_PRINT diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/coffee/keymap.c b/keyboards/kprepublic/bm40hsrgb/keymaps/coffee/keymap.c index a41020446dc9..ef7cfab5fe20 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/coffee/keymap.c +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/coffee/keymap.c @@ -4,16 +4,11 @@ #include QMK_KEYBOARD_H enum custom_keycodes { - NULLKEY = SAFE_RANGE, // An empty key to start (and maybe end) the enum - #ifdef DYNAMIC_MACRO_ENABLE - MCR_PLY, // Macro play - MCR_REC, // Macro record - MCR_SWT, // Swap active macro - #endif - #ifdef MOUSEKEY_ENABLE - MS_ACL_U, - MS_ACL_D, - #endif + MCR_PLY = QK_USER, // Macro play + MCR_REC, // Macro record + MCR_SWT, // Swap active macro + MS_ACL_U, // Mouse speed up + MS_ACL_D, // Mouse speed down }; enum layout_names { @@ -35,25 +30,25 @@ static int current_accel = 0; #endif // MOUSEKEY_ENABLE #ifdef DYNAMIC_MACRO_ENABLE - // Macro 1 is = 1, Macro 2 = -1, No macro = 0 - static bool MACRO1 = true; - static bool RECORDING = false; - - static uint16_t REC = DM_REC1; - static uint16_t PLY = DM_PLY1; +// Macro 1 is = 1, Macro 2 = -1, No macro = 0 +static bool MACRO1 = true; // Determines whether or not we're using 1 or 2 +static bool RECORDING = false; +static uint16_t REC = DM_REC1; // Record either macro 1 or 2. Or stop recording +static uint16_t PLY = DM_PLY1; // Play either macro 1 or macro 2 + +void dynamic_macro_record_start_user(int8_t direction) { + REC = DM_RSTP; + RECORDING = true; +} - void dynamic_macro_record_start_user(int8_t direction) { - REC = DM_RSTP; - RECORDING = true; - } - void dynamic_macro_record_end_user(int8_t direction) { - RECORDING = false; - } +void dynamic_macro_record_end_user(int8_t direction) { + RECORDING = false; +} #else - #define MCR_PLY KC_NO - #define MCR_REC KC_NO - #define MCR_SWT KC_NO -#endif +#define MCR_PLY KC_NO +#define MCR_REC KC_NO +#define MCR_SWT KC_NO +#endif // DYNAMIC_MACRO_ENABLE const uint16_t PROGMEM keymaps[_END][MATRIX_ROWS][MATRIX_COLS] = { [_MAIN] = LAYOUT_planck_mit( @@ -84,73 +79,62 @@ const uint16_t PROGMEM keymaps[_END][MATRIX_ROWS][MATRIX_COLS] = { #endif // MOUSEKEY_ENABLE }; -#define LAYER (get_highest_layer(layer_state)) -#define LAYER_SIZE (MATRIX_ROWS * MATRIX_COLS) -#define CHECK_LED() \ - if ((i >= RGB_MATRIX_LED_COUNT) \ - || ((g_led_config.flags[pos] == LED_FLAG_NONE) || (g_led_config.flags[pos] == LED_FLAG_UNDERGLOW))) \ - continue - #ifdef RGB_MATRIX_ENABLE - #ifdef UNDERGLOW_DISABLE - void keyboard_pre_init_user(void) { +#define LAYER (get_highest_layer(layer_state)) +#define LAYER_SIZE (MATRIX_ROWS * MATRIX_COLS) +#define BRIGHTNESS rgb_matrix_get_val() - for (int key_id = 0; key_id < RGB_MATRIX_LED_COUNT; key_id++ ) { - if (g_led_config.flags[key_id] == LED_FLAG_UNDERGLOW) { - g_led_config.flags[key_id] = LED_FLAG_NONE; - } +#ifdef UNDERGLOW_DISABLE +void keyboard_pre_init_user(void) { + for (int key_id = 0; key_id < RGB_MATRIX_LED_COUNT; key_id++ ) { + if (g_led_config.flags[key_id] == LED_FLAG_UNDERGLOW) { + g_led_config.flags[key_id] = LED_FLAG_NONE; } } - #endif - - bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { - if (LAYER != _MAIN) { - - int DimmedMax = UINT8_MAX - (UINT8_MAX - rgb_matrix_config.hsv.v); - - for (uint8_t i = led_min; i <= led_max; i++) { +} +#endif // UNDERGLOW_DISABLE - uint8_t pos = ((uint8_t*)g_led_config.matrix_co)[i]; +bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + if (LAYER == _MAIN) {return false;} - CHECK_LED(); // Check LED before moving on - uint16_t KC = pgm_read_word(&((uint16_t*)keymaps)[(LAYER_SIZE * LAYER) + i]); + for (uint8_t i = led_min; i <= led_max; i++) { + uint8_t pos = ((uint8_t*)g_led_config.matrix_co)[i]; + if (!HAS_ANY_FLAGS(g_led_config.flags[pos], (LED_FLAG_MODIFIER | LED_FLAG_KEYLIGHT))) {continue;} + uint16_t KC = pgm_read_word(&((uint16_t*)keymaps)[(LAYER_SIZE * LAYER) + i]); - if (KC == KC_NO) { - RGB_MATRIX_INDICATOR_SET_COLOR(pos, 0, 0, 0 ); - } + switch (KC) { + case KC_NO: + RGB_MATRIX_INDICATOR_SET_COLOR(pos, 0, 0, 0 ); + break; - #ifdef DYNAMIC_MACRO_ENABLE - else if (KC == MCR_SWT) { - if (!MACRO1) { - RGB_MATRIX_INDICATOR_SET_COLOR(pos, 0, DimmedMax, DimmedMax); - } - } else if (KC == MCR_REC) { - if (RECORDING) { - RGB_MATRIX_INDICATOR_SET_COLOR(pos, DimmedMax, 0, 0); - } - } - #endif + #ifdef DYNAMIC_MACRO_ENABLE + case MCR_SWT: + if (!MACRO1) { RGB_MATRIX_INDICATOR_SET_COLOR(pos, 0, BRIGHTNESS, BRIGHTNESS); } + break; - } + case MCR_REC: + if (RECORDING) { RGB_MATRIX_INDICATOR_SET_COLOR(pos, BRIGHTNESS, 0, 0); } + break; + #endif // DYNAMIC_MACRO_ENABLE } - return false; } + return false; +} #endif bool process_record_user(uint16_t keycode, keyrecord_t *record) { - #ifdef DYNAMIC_MACRO_ENABLE - if (keycode == MCR_REC) keycode = REC; - if (keycode == MCR_PLY) keycode = PLY; - if (!process_dynamic_macro(keycode, record)) { - REC = (MACRO1 ? DM_REC1 : DM_REC2); - return false; - } - #endif + if (keycode == MCR_REC) {keycode = REC;} + if (keycode == MCR_PLY) {keycode = PLY;} + if (!process_dynamic_macro(keycode, record)) { + REC = (MACRO1 ? DM_REC1 : DM_REC2); + return false; + } + #endif // DYNAMIC_MACRO_ENABLE #ifdef MOUSEKEY_ENABLE - if (keycode == MS_ACL_U || keycode == MS_ACL_D) { + if ((keycode == MS_ACL_U) || (keycode == MS_ACL_D)) { if (record->event.pressed) { if ( (keycode == MS_ACL_U) && (current_accel < 2) ) { current_accel += 1; } if ( (keycode == MS_ACL_D) && (current_accel > 0) ) { current_accel -= 1; } @@ -159,41 +143,24 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { action_t mousekey_action = action_for_keycode(keycode); process_action(record, mousekey_action); } - #endif + #endif // MOUSEKEY_ENABLE switch (keycode) { #ifdef DYNAMIC_MACRO_ENABLE - case MCR_SWT: - if (!RECORDING && record->event.pressed) { - // if the button is pressed and we're not recording - MACRO1 = !MACRO1; - if (MACRO1) { - REC = DM_REC1; - PLY = DM_PLY1; - } else { - REC = DM_REC2; - PLY = DM_PLY2; - } - } - return false; - #endif - - #if defined(RGB_MATRIX_ENABLE) && defined(RGBLIGHT_ENABLE) // this only needs to be defined if both are enabled - case RGB_TOG: // We can intercept this keycode ig? Cool :) - if (record->event.pressed) { - if (rgb_matrix_is_enabled()) { - rgb_matrix_disable/*_noeeprom*/(); - rgblight_enable/*_noeeprom*/(); - } else if (rgblight_is_enabled()) { - rgb_matrix_disable/*_noeeprom*/(); - rgblight_disable/*_noeeprom*/(); - } else { - rgb_matrix_enable/*_noeeprom*/(); - rgblight_disable/*_noeeprom*/(); - } + case MCR_SWT: + if (!RECORDING && record->event.pressed) { + // if the button is pressed and we're not recording + MACRO1 = !MACRO1; + if (MACRO1) { + REC = DM_REC1; + PLY = DM_PLY1; + } else { + REC = DM_REC2; + PLY = DM_PLY2; } - return false; - #endif + } + return false; + #endif // DYNAMIC_MACRO_ENABLE default: return true; //Process all other keycodes normally diff --git a/keyboards/ktec/ergodone/keymaps/vega/keymap.c b/keyboards/ktec/ergodone/keymaps/vega/keymap.c index 8e460d7b4c39..d668f9b41eaa 100644 --- a/keyboards/ktec/ergodone/keymaps/vega/keymap.c +++ b/keyboards/ktec/ergodone/keymaps/vega/keymap.c @@ -686,112 +686,112 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [MATH] = LAYOUT_ergodox( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRV, - KC_TAB, X(Mc), X(Munion), X(arwl), X(or), X(exists), KC_BSLS, - X(arwr), X(root), X(and), X(imply), X(nexists), X(forall), - SC_LSPO, KC_SCLN, X(intgrl), X(Mn), X(Mz), X(member), X(arwl), + KC_TAB, UM(Mc), UM(Munion), UM(arwl), UM(or), UM(exists), KC_BSLS, + UM(arwr), UM(root), UM(and), UM(imply), UM(nexists), UM(forall), + SC_LSPO, KC_SCLN, UM(intgrl), UM(Mn), UM(Mz), UM(member), UM(arwl), KC_MS_L, TO(BASE), TO(BASE), KC_INS, KC_DEL, KC_LBRC, KC_HOME, KC_UP, KC_SPC, KC_LGUI, KC_DOWN, TT(FNLR), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - KC_PGUP, X(plsminus), X(infin), X(neleof), X(equiv), X(Mq), KC_EQL, - X(sum), X(emtyset), X(porp), X(suprsetof), X(not), X(neq), - KC_PGDN, X(subsetof), X(intersection), X(angl), X(nmember), X(eleof), SC_RSPC, + KC_PGUP, UM(plsminus), UM(infin), UM(neleof), UM(equiv), UM(Mq), KC_EQL, + UM(sum), UM(emtyset), UM(porp), UM(suprsetof), UM(not), UM(neq), + KC_PGDN, UM(subsetof), UM(intersection), UM(angl), UM(nmember), UM(eleof), SC_RSPC, KC_RCTL, KC_RALT, KC_APP, TO(BASE), TO(BASE), KC_END, KC_RBRC, KC_LEFT, KC_RGHT, KC_ENT, KC_SPC ), [SYMB] = LAYOUT_ergodox( - X(Os), X(Oa), X(Ob), X(Oc), X(Od), X(Oe), X(mdot), - X(boxemp), X(bbstr), X(bbrtr), X(bbrtl), X(bbstl), X(degree), X(brkdn), - X(boxchk), X(bbmbl), X(bbml), X(bbmr), X(bbmbr), X(neteen), - X(boxX), X(bbsbr), X(bbrbr), X(bbrbl), X(bbsbl), X(uxclm), X(brkup), - X(floppy), TO(BASE), TO(BASE), X(arwu), X(arwd), - X(fire), X(lshade), X(mshade), KC_SPC, X(OS), X(dshade), - - X(Ox), X(Of), X(Og), X(Oh), X(Oi), X(OA), X(OB), - X(numero), X(trade), X(copy), X(cleft), X(cent), X(OED), X(OC), - X(Agrave), X(gnd), X(sqr), X(sine), X(opt), X(OD), - X(sect), X(Aacute), X(Acircm), X(Adiaer), X(Abreve), X(Atilde), X(OE), - X(arwl), X(arwr), X(geq), X(leq), X(OF), - X(rang), X(water), X(perup), X(perdn), X(baster), KC_ENT + UM(Os), UM(Oa), UM(Ob), UM(Oc), UM(Od), UM(Oe), UM(mdot), + UM(boxemp), UM(bbstr), UM(bbrtr), UM(bbrtl), UM(bbstl), UM(degree), UM(brkdn), + UM(boxchk), UM(bbmbl), UM(bbml), UM(bbmr), UM(bbmbr), UM(neteen), + UM(boxX), UM(bbsbr), UM(bbrbr), UM(bbrbl), UM(bbsbl), UM(uxclm), UM(brkup), + UM(floppy), TO(BASE), TO(BASE), UM(arwu), UM(arwd), + UM(fire), UM(lshade), UM(mshade), KC_SPC, UM(OS), UM(dshade), + + UM(Ox), UM(Of), UM(Og), UM(Oh), UM(Oi), UM(OA), UM(OB), + UM(numero), UM(trade), UM(copy), UM(cleft), UM(cent), UM(OED), UM(OC), + UM(Agrave), UM(gnd), UM(sqr), UM(sine), UM(opt), UM(OD), + UM(sect), UM(Aacute), UM(Acircm), UM(Adiaer), UM(Abreve), UM(Atilde), UM(OE), + UM(arwl), UM(arwr), UM(geq), UM(leq), UM(OF), + UM(rang), UM(water), UM(perup), UM(perdn), UM(baster), KC_ENT ), [GREL] = LAYOUT_ergodox( - KC_ESC, X(Rone), X(Rtwo), X(Rthree), X(Rfour), X(Rfive), KC_GRV, - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, X(gp), X(gy), KC_SLSH, - KC_SLSH, X(ga), X(go), X(ge), X(gu), X(gi), - MO(GREU), KC_SCLN, X(gq), X(gj), X(gk), X(gx), KC_AMPR, + KC_ESC, UM(Rone), UM(Rtwo), UM(Rthree), UM(Rfour), UM(Rfive), KC_GRV, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, UM(gp), UM(gy), KC_SLSH, + KC_SLSH, UM(ga), UM(go), UM(ge), UM(gu), UM(gi), + MO(GREU), KC_SCLN, UM(gq), UM(gj), UM(gk), UM(gx), KC_AMPR, KC_MS_L, TO(BASE), TO(BASE), KC_INS, KC_DEL, KC_LBRC, KC_HOME, KC_UP, KC_SPC, KC_LGUI, KC_DOWN, - TO(BASE), X(Rsix), X(Rseven), X(Reight), X(Rnine), X(Rten), KC_BSPC, - KC_PGUP, X(gf), X(gg), X(gc), X(gr), X(gl), KC_EQL, - X(gd), X(gh), X(gt), X(gn), X(gs), KC_MINS, - KC_PGDN, X(gb), X(gm), X(gw), X(gv), X(gz), MO(GREU), + TO(BASE), UM(Rsix), UM(Rseven), UM(Reight), UM(Rnine), UM(Rten), KC_BSPC, + KC_PGUP, UM(gf), UM(gg), UM(gc), UM(gr), UM(gl), KC_EQL, + UM(gd), UM(gh), UM(gt), UM(gn), UM(gs), KC_MINS, + KC_PGDN, UM(gb), UM(gm), UM(gw), UM(gv), UM(gz), MO(GREU), KC_RCTL, KC_RALT, KC_APP, TO(BASE), TO(BASE), KC_END, KC_RBRC, KC_LEFT, KC_RGHT, KC_ENT, KC_SPC ), [GREU] = LAYOUT_ergodox( - KC_ESC, X(Rone), X(Rtwo), X(Rthree), X(Rfour), X(Rfive), KC_GRV, - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, X(Gp), X(Gy), KC_SLSH, - KC_SLSH, X(Ga), X(Go), X(Ge), X(Gu), X(Gi), - KC_TRNS, KC_SCLN, X(Gq), X(Gj), X(Gk), X(Gx), KC_AMPR, + KC_ESC, UM(Rone), UM(Rtwo), UM(Rthree), UM(Rfour), UM(Rfive), KC_GRV, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, UM(Gp), UM(Gy), KC_SLSH, + KC_SLSH, UM(Ga), UM(Go), UM(Ge), UM(Gu), UM(Gi), + KC_TRNS, KC_SCLN, UM(Gq), UM(Gj), UM(Gk), UM(Gx), KC_AMPR, KC_MS_L, TO(BASE), TO(BASE), KC_INS, KC_DEL, KC_LBRC, KC_HOME, KC_UP, KC_SPC, KC_LGUI, KC_DOWN, - TO(BASE), X(Rsix), X(Rseven), X(Reight), X(Rnine), X(Rten), KC_BSPC, - KC_PGUP, X(Gf), X(Gg), X(Gc), X(Gr), X(Gl), KC_EQL, - X(Gd), X(Gh), X(Gt), X(Gn), X(Gs), KC_MINS, - KC_PGDN, X(Gb), X(Gm), X(Gw), X(Gv), X(Gz), KC_TRNS, + TO(BASE), UM(Rsix), UM(Rseven), UM(Reight), UM(Rnine), UM(Rten), KC_BSPC, + KC_PGUP, UM(Gf), UM(Gg), UM(Gc), UM(Gr), UM(Gl), KC_EQL, + UM(Gd), UM(Gh), UM(Gt), UM(Gn), UM(Gs), KC_MINS, + KC_PGDN, UM(Gb), UM(Gm), UM(Gw), UM(Gv), UM(Gz), KC_TRNS, KC_RCTL, KC_RALT, KC_APP, TO(BASE), TO(BASE), KC_END, KC_RBRC, KC_LEFT, KC_RGHT, KC_ENT, KC_SPC ), [TINY] = LAYOUT_ergodox( - KC_ESC, X(tone), X(ttwo), X(tthree), X(tfour), X(tfive), KC_GRV, - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, X(tp), X(ty), KC_SLSH, - KC_SLSH, X(ta), X(to), X(te), X(tu), X(ti), - KC_TRNS, KC_SCLN, X(tq), X(tj), X(tk), X(tx), KC_AMPR, + KC_ESC, UM(tone), UM(ttwo), UM(tthree), UM(tfour), UM(tfive), KC_GRV, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, UM(tp), UM(ty), KC_SLSH, + KC_SLSH, UM(ta), UM(to), UM(te), UM(tu), UM(ti), + KC_TRNS, KC_SCLN, UM(tq), UM(tj), UM(tk), UM(tx), KC_AMPR, KC_MS_L, TO(BASE), TO(BASE), KC_INS, KC_DEL, KC_LBRC, KC_HOME, KC_UP, KC_SPC, KC_LGUI, KC_DOWN, - TO(BASE), X(tsix), X(tseven), X(teight), X(tnine), X(tzero), KC_BSPC, - KC_PGUP, X(tf), X(tg), X(tc), X(tr), X(tl), KC_EQL, - X(td), X(th), X(tt), X(tn), X(ts), KC_MINS, - KC_PGDN, X(tb), X(tm), X(tw), X(tv), X(tz), KC_TRNS, + TO(BASE), UM(tsix), UM(tseven), UM(teight), UM(tnine), UM(tzero), KC_BSPC, + KC_PGUP, UM(tf), UM(tg), UM(tc), UM(tr), UM(tl), KC_EQL, + UM(td), UM(th), UM(tt), UM(tn), UM(ts), KC_MINS, + KC_PGDN, UM(tb), UM(tm), UM(tw), UM(tv), UM(tz), KC_TRNS, KC_RCTL, KC_RALT, KC_APP, TO(BASE), TO(BASE), KC_END, KC_RBRC, KC_LEFT, KC_RGHT, KC_ENT, KC_SPC ), [FULL] = LAYOUT_ergodox( - KC_ESC, X(fwone), X(fwtwo), X(fwthree), X(fwfour), X(fwfive), KC_GRV, - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, X(fwp), X(fwy), KC_SLSH, - KC_SLSH, X(fwa), X(fwo), X(fwe), X(fwu), X(fwi), - MO(FULU), KC_SCLN, X(fwq), X(fwj), X(fwk), X(fwx), KC_AMPR, + KC_ESC, UM(fwone), UM(fwtwo), UM(fwthree), UM(fwfour), UM(fwfive), KC_GRV, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, UM(fwp), UM(fwy), KC_SLSH, + KC_SLSH, UM(fwa), UM(fwo), UM(fwe), UM(fwu), UM(fwi), + MO(FULU), KC_SCLN, UM(fwq), UM(fwj), UM(fwk), UM(fwx), KC_AMPR, KC_MS_L, TO(BASE), TO(BASE), KC_INS, KC_DEL, KC_LBRC, KC_HOME, KC_UP, KC_SPC, KC_LGUI, KC_DOWN, - TO(BASE), X(fwsix), X(fwseven), X(fweight), X(fwnine), X(fwzero), KC_BSPC, - KC_PGUP, X(fwf), X(fwg), X(fwc), X(fwr), X(fwl), KC_EQL, - X(fwd), X(fwh), X(fwt), X(fwn), X(fws), KC_MINS, - KC_PGDN, X(fwb), X(fwm), X(fww), X(fwv), X(fwz), MO(FULU), + TO(BASE), UM(fwsix), UM(fwseven), UM(fweight), UM(fwnine), UM(fwzero), KC_BSPC, + KC_PGUP, UM(fwf), UM(fwg), UM(fwc), UM(fwr), UM(fwl), KC_EQL, + UM(fwd), UM(fwh), UM(fwt), UM(fwn), UM(fws), KC_MINS, + KC_PGDN, UM(fwb), UM(fwm), UM(fww), UM(fwv), UM(fwz), MO(FULU), KC_RCTL, KC_RALT, KC_APP, TO(BASE), TO(BASE), KC_END, KC_RBRC, KC_LEFT, KC_RGHT, KC_ENT, KC_SPC ), [FULU] = LAYOUT_ergodox( - KC_ESC, X(Fwone), X(Fwtwo), X(Fwthree), X(Fwfour), X(Fwfive), KC_GRV, - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, X(Fwp), X(Fwy), KC_SLSH, - KC_SLSH, X(Fwa), X(Fwo), X(Fwe), X(Fwu), X(Fwi), - KC_TRNS, KC_SCLN, X(Fwq), X(Fwj), X(Fwk), X(Fwx), KC_AMPR, + KC_ESC, UM(Fwone), UM(Fwtwo), UM(Fwthree), UM(Fwfour), UM(Fwfive), KC_GRV, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, UM(Fwp), UM(Fwy), KC_SLSH, + KC_SLSH, UM(Fwa), UM(Fwo), UM(Fwe), UM(Fwu), UM(Fwi), + KC_TRNS, KC_SCLN, UM(Fwq), UM(Fwj), UM(Fwk), UM(Fwx), KC_AMPR, KC_MS_L, TO(BASE), TO(BASE), KC_INS, KC_DEL, KC_LBRC, KC_HOME, KC_UP, KC_SPC, KC_LGUI, KC_DOWN, - TO(BASE), X(Fwsix), X(Fwseven), X(Fweight), X(Fwnine), X(Fwzero), KC_BSPC, - KC_PGUP, X(Fwf), X(Fwg), X(Fwc), X(Fwr), X(Fwl), KC_EQL, - X(Fwd), X(Fwh), X(Fwt), X(Fwn), X(Fws), KC_MINS, - KC_PGDN, X(Fwb), X(Fwm), X(Fww), X(Fwv), X(Fwz), KC_TRNS, + TO(BASE), UM(Fwsix), UM(Fwseven), UM(Fweight), UM(Fwnine), UM(Fwzero), KC_BSPC, + KC_PGUP, UM(Fwf), UM(Fwg), UM(Fwc), UM(Fwr), UM(Fwl), KC_EQL, + UM(Fwd), UM(Fwh), UM(Fwt), UM(Fwn), UM(Fws), KC_MINS, + KC_PGDN, UM(Fwb), UM(Fwm), UM(Fww), UM(Fwv), UM(Fwz), KC_TRNS, KC_RCTL, KC_RALT, KC_APP, TO(BASE), TO(BASE), KC_END, KC_RBRC, KC_LEFT, KC_RGHT, KC_ENT, KC_SPC ), diff --git a/keyboards/maple_computing/c39/keymaps/drashna/keymap.c b/keyboards/maple_computing/c39/keymaps/drashna/keymap.c deleted file mode 100755 index 0c923983eb02..000000000000 --- a/keyboards/maple_computing/c39/keymaps/drashna/keymap.c +++ /dev/null @@ -1,83 +0,0 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) - * - * 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 "drashna.h" - -/* - * The `LAYOUT_base` macro is a template to allow the use of identical - * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so - * that there is no need to set them up for each layout, and modify all of - * them if I want to change them. This helps to keep consistency and ease - * of use. K## is a placeholder to pass through the individual keycodes - */ -// clang-format off -#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) -#define LAYOUT_base( \ - K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ - K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ - K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ - ) \ - LAYOUT_wrapper( \ - KC_ESC, K01, K02, K03, K04, K05, KC_NO, K06, K07, K08, K09, K0A, KC_DEL, \ - ALT_T(KC_TAB), K11, K12, K13, K14, K15, KC_BSPC, K16, K17, K18, K19, K1A, RALT_T(K1B), \ - KC_MLSF, CTL_T(K21), K22, K23, K24, LT(_LOWER,K25), KC_SPC, LT(_RAISE,K26), K27, K28, K29, RCTL_T(K2A), KC_ENT \ - ) -#define LAYOUT_base_wrapper(...) LAYOUT_base(__VA_ARGS__) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_DEFAULT_LAYER_1] = LAYOUT_base_wrapper( - _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, - _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, - _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ - ), - - [_DEFAULT_LAYER_2] = LAYOUT_base_wrapper( - ______________COLEMAK_MOD_DH_L1____________, ______________COLEMAK_MOD_DH_R1____________, - ______________COLEMAK_MOD_DH_L2____________, ______________COLEMAK_MOD_DH_R2____________, - ______________COLEMAK_MOD_DH_L3____________, ______________COLEMAK_MOD_DH_R3____________ - ), - [_DEFAULT_LAYER_3] = LAYOUT_base_wrapper( - _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, - _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, - _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ - ), - - [_DEFAULT_LAYER_4] = LAYOUT_base_wrapper( - _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, - _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, - _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ - ), - - [_LOWER] = LAYOUT_wrapper( - KC_TILD, _________________LOWER_L1__________________, _______, _________________LOWER_R1__________________, KC_BSPC, - KC_DEL, _________________LOWER_L2__________________, _______, _________________LOWER_R2__________________, KC_PIPE, - _______, _________________LOWER_L3__________________, _______, _________________LOWER_R3__________________, _______ - ), - - [_RAISE] = LAYOUT_wrapper( - KC_GRV, _________________RAISE_L1__________________, _______, _________________RAISE_R1__________________, KC_BSPC, - KC_DEL, _________________RAISE_L2__________________, _______, _________________RAISE_R2__________________, KC_BSLS, - _______, _________________RAISE_L3__________________, _______, _________________RAISE_R3__________________, _______ - ), - - [_ADJUST] = LAYOUT_wrapper( - QK_MAKE, _________________ADJUST_L1_________________, KC_NUKE, _________________ADJUST_R1_________________, QK_BOOT, - VRSN, _________________ADJUST_L2_________________, MG_NKRO, _________________ADJUST_R2_________________, EE_CLR, - TG_MODS, _________________ADJUST_L3_________________, KC_RGB_T,_________________ADJUST_R3_________________, RGB_IDL - ) -}; -// clang-format on diff --git a/keyboards/maple_computing/c39/keymaps/drashna/readme.md b/keyboards/maple_computing/c39/keymaps/drashna/readme.md deleted file mode 100755 index a8efbaa5fe5a..000000000000 --- a/keyboards/maple_computing/c39/keymaps/drashna/readme.md +++ /dev/null @@ -1,3 +0,0 @@ -# @drashna's keymap for the C39 - -HERE BE DRAGONS diff --git a/keyboards/maple_computing/c39/keymaps/drashna/rules.mk b/keyboards/maple_computing/c39/keymaps/drashna/rules.mk deleted file mode 100644 index a6575bbd93b0..000000000000 --- a/keyboards/maple_computing/c39/keymaps/drashna/rules.mk +++ /dev/null @@ -1,19 +0,0 @@ -# MCU name -MCU = STM32F303 -BOARD = QMK_PROTON_C - -# Bootloader selection -BOOTLOADER = stm32-dfu - -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes -EXTRAKEY_ENABLE = yes -CONSOLE_ENABLE = yes -COMMAND_ENABLE = yes -NKRO_ENABLE = yes -AUDIO_ENABLE = yes -UNICODE_ENABLE = yes -HAPTIC_ENABLE = yes -HAPTIC_DRIVER = SOLENOID - -RGBLIGHT_STARTUP_ANIMATION = yes diff --git a/keyboards/massdrop/alt/keymaps/charlesrocket/keymap.c b/keyboards/massdrop/alt/keymaps/charlesrocket/keymap.c index edd906deb513..8df4376806b8 100644 --- a/keyboards/massdrop/alt/keymaps/charlesrocket/keymap.c +++ b/keyboards/massdrop/alt/keymaps/charlesrocket/keymap.c @@ -65,10 +65,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, LAG_SWP, LAG_NRM, _______, _______, TG(3), _______, _______, _______ ), [3] = LAYOUT( - XP(0,1), XP(2,3), XP(4,5), XP(6,7), XP(8,9), XP(10,11), XP(12,13), XP(14,15), XP(16,17), XP(18,19), XP(20,21), XP(22,23), XP(24,25), _______, _______, - _______, KC_QUES, XP(27,28), XP(29,31), X(32), XP(33,34), X(35), X(36), XP(37,38), XP(39,40), XP(41,42), XP(43,44), XP(45,46), _______, _______, - _______, XP(47,48), X(49), X(50), KC_UNDS, XP(52,5), XP(53,54), XP(55,56), KC_QUOT, XP(59,60), XP(61,62), XP(63,64), _______, _______, - _______, XP(65,66), X(67), XP(68,69), X(70), X(71), X(72), X(73), KC_PIPE, XP(75,76), X(77), XP(78,79), _______, _______, + UP(0,1), UP(2,3), UP(4,5), UP(6,7), UP(8,9), UP(10,11), UP(12,13), UP(14,15), UP(16,17), UP(18,19), UP(20,21), UP(22,23), UP(24,25), _______, _______, + _______, KC_QUES, UP(27,28), UP(29,31), UM(32), UP(33,34), UM(35), UM(36), UP(37,38), UP(39,40), UP(41,42), UP(43,44), UP(45,46), _______, _______, + _______, UP(47,48), UM(49), UM(50), KC_UNDS, UP(52,5), UP(53,54), UP(55,56), KC_QUOT, UP(59,60), UP(61,62), UP(63,64), _______, _______, + _______, UP(65,66), UM(67), UP(68,69), UM(70), UM(71), UM(72), UM(73), KC_PIPE, UP(75,76), UM(77), UP(78,79), _______, _______, _______, _______, _______, _______, _______, TG(3), _______, _______, _______ ), }; diff --git a/keyboards/mlego/m65/keymaps/uk/keymap.c b/keyboards/mlego/m65/keymaps/uk/keymap.c index 8a711234b52c..ee4887243316 100644 --- a/keyboards/mlego/m65/keymaps/uk/keymap.c +++ b/keyboards/mlego/m65/keymaps/uk/keymap.c @@ -190,9 +190,9 @@ MS - mouse directions */ [_LWR] = LAYOUT_ortho_5x13( KC_GRV , KC_MUTE, KC_VOLU, KC_VOLD, KC_MPRV, KC_MPLY, KC_MNXT, G(KC_P), KC_SLEP, KC_WAKE, KC_PSCR, KC_DEL, UK_EQL, - KC_BTN3,XP(lq,lQ),XP(lw,lW),XP(le,lE),XP(lr,lR),XP(lt,lT),XP(ly,lY),XP(lu,lU),XP(li,lI), XP(lo,lO), XP(lp,lP), _______, _______, - KC_BTN2,XP(la,lA),XP(ls,lS),XP(ld,lD),XP(lf,lF),XP(lg,lG),XP(lh,lH),XP(lj,lJ),XP(lk,lK), XP(ll,lL),XP(ll1,lL1), XP(lk1,lK1), _______, - _______, KC_BTN1,XP(lz,lZ),XP(lx,lX),XP(lc,lC),XP(lv,lV),XP(lb,lB),XP(ln,lN),XP(lm,lM),XP(lc1,lC1),XP(lp1,lP1), KC_MS_U, XP(lq1,lQ1), + KC_BTN3,UP(lq,lQ),UP(lw,lW),UP(le,lE),UP(lr,lR),UP(lt,lT),UP(ly,lY),UP(lu,lU),UP(li,lI), UP(lo,lO), UP(lp,lP), _______, _______, + KC_BTN2,UP(la,lA),UP(ls,lS),UP(ld,lD),UP(lf,lF),UP(lg,lG),UP(lh,lH),UP(lj,lJ),UP(lk,lK), UP(ll,lL),UP(ll1,lL1), UP(lk1,lK1), _______, + _______, KC_BTN1,UP(lz,lZ),UP(lx,lX),UP(lc,lC),UP(lv,lV),UP(lb,lB),UP(ln,lN),UP(lm,lM),UP(lc1,lC1),UP(lp1,lP1), KC_MS_U, UP(lq1,lQ1), _______, KC_BTN4, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R), /* @@ -224,9 +224,9 @@ raise layer shifted */ [_RSE] = LAYOUT_ortho_5x13( KC_ESC , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , - _______,XP(ra1,rA1), _______, _______, _______,XP(rt,rT), _______, _______,XP(ri,rI), _______, _______, _______, _______ , - KC_CAPS, XP(ra,rA), XP(rs,rS), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , - _______, KC_F20 , _______, _______,XP(rc,rC), _______, _______, _______, _______, _______, _______, KC_WH_U, _______ , + _______,UP(ra1,rA1), _______, _______, _______,UP(rt,rT), _______, _______,UP(ri,rI), _______, _______, _______, _______ , + KC_CAPS, UP(ra,rA), UP(rs,rS), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , + _______, KC_F20 , _______, _______,UP(rc,rC), _______, _______, _______, _______, _______, _______, KC_WH_U, _______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WH_L, KC_WH_D, KC_WH_R), /* adj layer diff --git a/keyboards/moonlander/keymaps/drashna/keymap.c b/keyboards/moonlander/keymaps/drashna/keymap.c index 2f38ac790c3c..491283c37a04 100644 --- a/keyboards/moonlander/keymaps/drashna/keymap.c +++ b/keyboards/moonlander/keymaps/drashna/keymap.c @@ -156,7 +156,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { case KC_SWAP_NUM: if (record->event.pressed) { userspace_config.swapped_numbers ^= 1; - eeconfig_update_user(userspace_config.raw); + eeconfig_update_user_config(&userspace_config.raw); unregister_code(KC_1); unregister_code(KC_2); } diff --git a/keyboards/moonlander/keymaps/drashna/rules.mk b/keyboards/moonlander/keymaps/drashna/rules.mk index 927d956e9dfe..45113afc712d 100644 --- a/keyboards/moonlander/keymaps/drashna/rules.mk +++ b/keyboards/moonlander/keymaps/drashna/rules.mk @@ -4,3 +4,5 @@ UNICODE_ENABLE = yes UNICODEMAP_ENABLE = no AUTOCORRECT_ENABLE = yes CAPS_WORD_ENABLE = yes + +BOOTLOADER = tinyuf2 diff --git a/keyboards/planck/keymaps/mwpeterson/keymap.c b/keyboards/planck/keymaps/mwpeterson/keymap.c index 5871fe4bfe35..065750434f4c 100644 --- a/keyboards/planck/keymaps/mwpeterson/keymap.c +++ b/keyboards/planck/keymaps/mwpeterson/keymap.c @@ -102,7 +102,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [LOWER_LAYER] = LAYOUT_planck_grid( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, S(KC_3), _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, - _______, KC_MINS, KC_PLUS, KC_GRV, SFT_INS, KC_COLN, KC_PIPE, X(IBANG), KC_COMM, KC_DOT, KC_BSLS, _______, + _______, KC_MINS, KC_PLUS, KC_GRV, SFT_INS, KC_COLN, KC_PIPE, UM(IBANG), KC_COMM, KC_DOT, KC_BSLS, _______, _______, _______, _______, _______, _______, KC_BSPC, KC_BSPC, _______, _______, _______, _______, _______ ), diff --git a/keyboards/planck/keymaps/zach/zach_common_functions.c b/keyboards/planck/keymaps/zach/zach_common_functions.c index 6ad1c7bed337..ae5f44e71363 100644 --- a/keyboards/planck/keymaps/zach/zach_common_functions.c +++ b/keyboards/planck/keymaps/zach/zach_common_functions.c @@ -141,31 +141,31 @@ tap_dance_action_t tap_dance_actions[] = { //#ifdef UNICODE_ENABLE // Unicode shortcuts -#define IBANG X(0x203D) -#define RAROW X(0x2192) -#define LAROW X(0x2190) -#define DEGREE X(0x00B0) -#define OMEGA X(0x03A9) -#define WOMEGA X(0x03C9) -#define MICRO X(0x00B5) -#define PLUMIN X(0x00B1) -#define SUPA2 X(0x00B2) -#define ROMAN1 X(0x2160) -#define ROMAN2 X(0x2161) -#define ROMAN3 X(0x2162) -#define ROMAN4 X(0x2163) -#define ROMAN5 X(0x2164) -#define ROMAN6 X(0x2165) -#define ROMAN7 X(0x2166) -#define roman1 X(0x2170) -#define roman2 X(0x2171) -#define roman3 X(0x2172) -#define roman4 X(0x2173) -#define roman5 X(0x2174) -#define roman6 X(0x2175) -#define roman7 X(0x2176) +#define IBANG UM(0x203D) +#define RAROW UM(0x2192) +#define LAROW UM(0x2190) +#define DEGREE UM(0x00B0) +#define OMEGA UM(0x03A9) +#define WOMEGA UM(0x03C9) +#define MICRO UM(0x00B5) +#define PLUMIN UM(0x00B1) +#define SUPA2 UM(0x00B2) +#define ROMAN1 UM(0x2160) +#define ROMAN2 UM(0x2161) +#define ROMAN3 UM(0x2162) +#define ROMAN4 UM(0x2163) +#define ROMAN5 UM(0x2164) +#define ROMAN6 UM(0x2165) +#define ROMAN7 UM(0x2166) +#define roman1 UM(0x2170) +#define roman2 UM(0x2171) +#define roman3 UM(0x2172) +#define roman4 UM(0x2173) +#define roman5 UM(0x2174) +#define roman6 UM(0x2175) +#define roman7 UM(0x2176) -#ifdef UNICODEMAP_ENABLE // For Unicode characters larger than 0x8000. Send with X() +#ifdef UNICODEMAP_ENABLE enum Ext_Unicode{ PENGUIN = 0, BOAR, @@ -182,12 +182,12 @@ const uint32_t unicode_map[] PROGMEM = { [CHICK] = 0x1F425, [TUMBLER] = 0x1F943 }; -#define PENGY X(PENGUIN) -#define BOARY X(BOAR) -#define MNKY X(MONKEY) -#define DRGN X(DRAGON) -#define DUCK X(CHICK) -#define TMBL X(TUMBLER) +#define PENGY UM(PENGUIN) +#define BOARY UM(BOAR) +#define MNKY UM(MONKEY) +#define DRGN UM(DRAGON) +#define DUCK UM(CHICK) +#define TMBL UM(TUMBLER) #endif //#endif diff --git a/keyboards/preonic/keymaps/zach/zach_common_functions.c b/keyboards/preonic/keymaps/zach/zach_common_functions.c index 6ad1c7bed337..ae5f44e71363 100644 --- a/keyboards/preonic/keymaps/zach/zach_common_functions.c +++ b/keyboards/preonic/keymaps/zach/zach_common_functions.c @@ -141,31 +141,31 @@ tap_dance_action_t tap_dance_actions[] = { //#ifdef UNICODE_ENABLE // Unicode shortcuts -#define IBANG X(0x203D) -#define RAROW X(0x2192) -#define LAROW X(0x2190) -#define DEGREE X(0x00B0) -#define OMEGA X(0x03A9) -#define WOMEGA X(0x03C9) -#define MICRO X(0x00B5) -#define PLUMIN X(0x00B1) -#define SUPA2 X(0x00B2) -#define ROMAN1 X(0x2160) -#define ROMAN2 X(0x2161) -#define ROMAN3 X(0x2162) -#define ROMAN4 X(0x2163) -#define ROMAN5 X(0x2164) -#define ROMAN6 X(0x2165) -#define ROMAN7 X(0x2166) -#define roman1 X(0x2170) -#define roman2 X(0x2171) -#define roman3 X(0x2172) -#define roman4 X(0x2173) -#define roman5 X(0x2174) -#define roman6 X(0x2175) -#define roman7 X(0x2176) +#define IBANG UM(0x203D) +#define RAROW UM(0x2192) +#define LAROW UM(0x2190) +#define DEGREE UM(0x00B0) +#define OMEGA UM(0x03A9) +#define WOMEGA UM(0x03C9) +#define MICRO UM(0x00B5) +#define PLUMIN UM(0x00B1) +#define SUPA2 UM(0x00B2) +#define ROMAN1 UM(0x2160) +#define ROMAN2 UM(0x2161) +#define ROMAN3 UM(0x2162) +#define ROMAN4 UM(0x2163) +#define ROMAN5 UM(0x2164) +#define ROMAN6 UM(0x2165) +#define ROMAN7 UM(0x2166) +#define roman1 UM(0x2170) +#define roman2 UM(0x2171) +#define roman3 UM(0x2172) +#define roman4 UM(0x2173) +#define roman5 UM(0x2174) +#define roman6 UM(0x2175) +#define roman7 UM(0x2176) -#ifdef UNICODEMAP_ENABLE // For Unicode characters larger than 0x8000. Send with X() +#ifdef UNICODEMAP_ENABLE enum Ext_Unicode{ PENGUIN = 0, BOAR, @@ -182,12 +182,12 @@ const uint32_t unicode_map[] PROGMEM = { [CHICK] = 0x1F425, [TUMBLER] = 0x1F943 }; -#define PENGY X(PENGUIN) -#define BOARY X(BOAR) -#define MNKY X(MONKEY) -#define DRGN X(DRAGON) -#define DUCK X(CHICK) -#define TMBL X(TUMBLER) +#define PENGY UM(PENGUIN) +#define BOARY UM(BOAR) +#define MNKY UM(MONKEY) +#define DRGN UM(DRAGON) +#define DUCK UM(CHICK) +#define TMBL UM(TUMBLER) #endif //#endif diff --git a/keyboards/reviung/reviung41/keymaps/ciutadellla/keymap.c b/keyboards/reviung/reviung41/keymaps/ciutadellla/keymap.c index 98dda7fe1994..a4279821ccc1 100644 --- a/keyboards/reviung/reviung41/keymaps/ciutadellla/keymap.c +++ b/keyboards/reviung/reviung41/keymaps/ciutadellla/keymap.c @@ -265,7 +265,7 @@ * +-------------/ \--------------+ */ - [_ADJUST] = LAYOUT_reviung41(X(GRINNING_FACE), X(GRINNING_FACE_WITH_SWEAT), X(ROLLING_LAUGHING), X(WINKING_FACE), X(SMILING_FACE_HALO), X(SMILING_FACE_HEARTS), RGB_VAI, RGB_HUI, RGB_MOD, KC_BRIU, KC_MPLY, KC_VOLU, X(SMILING_FACE_HEART_EYES), X(FACE_BLOWING_KISS), X(FACE_ROLLING_EYES), X(PENSIVE_FACE), X(LOUDLY_CRYING_FACE), X(PILE_POO), RGB_VAD, RGB_HUD, RGB_RMOD, KC_BRID, KC_MSTP, KC_VOLD, X(THUMBSUP), X(THUMBSDOWN), X(CLAPPING_HANDS), X(EYES), X(MAN_FACEPALMING), X(GHOST), RGB_TOG, RGB_SAD, RGB_SAI, RGB_SPD, RGB_SPI, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) + [_ADJUST] = LAYOUT_reviung41(UM(GRINNING_FACE), UM(GRINNING_FACE_WITH_SWEAT), UM(ROLLING_LAUGHING), UM(WINKING_FACE), UM(SMILING_FACE_HALO), UM(SMILING_FACE_HEARTS), RGB_VAI, RGB_HUI, RGB_MOD, KC_BRIU, KC_MPLY, KC_VOLU, UM(SMILING_FACE_HEART_EYES), UM(FACE_BLOWING_KISS), UM(FACE_ROLLING_EYES), UM(PENSIVE_FACE), UM(LOUDLY_CRYING_FACE), UM(PILE_POO), RGB_VAD, RGB_HUD, RGB_RMOD, KC_BRID, KC_MSTP, KC_VOLD, UM(THUMBSUP), UM(THUMBSDOWN), UM(CLAPPING_HANDS), UM(EYES), UM(MAN_FACEPALMING), UM(GHOST), RGB_TOG, RGB_SAD, RGB_SAI, RGB_SPD, RGB_SPI, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) }; diff --git a/keyboards/signum/3_0/keymaps/default/generate_km.py b/keyboards/signum/3_0/keymaps/default/generate_km.py index cfa8edf57a76..a939e4e73a40 100755 --- a/keyboards/signum/3_0/keymaps/default/generate_km.py +++ b/keyboards/signum/3_0/keymaps/default/generate_km.py @@ -39,7 +39,7 @@ def _translate(s): elif re.match("^TT[0-9]{1,2}$", s): # Tn, works from TT0 to TT99 return ("TT({0})".format(s[2:]), "{0:^7}".format(s)) elif s in layout.uc_dict: - return ("X("+s+")", " {0} ".format(chr(int(layout.uc_dict[s], 0)))) + return ("UM("+s+")", " {0} ".format(chr(int(layout.uc_dict[s], 0)))) elif s in layout.qmk_dict: return (layout.qmk_dict[s], "{0:^7}".format(s)) elif s == s.upper() and s.startswith("KC_"): diff --git a/keyboards/signum/3_0/keymaps/default/layout.py b/keyboards/signum/3_0/keymaps/default/layout.py index 90fb1d9c9458..4691985d29d3 100644 --- a/keyboards/signum/3_0/keymaps/default/layout.py +++ b/keyboards/signum/3_0/keymaps/default/layout.py @@ -396,7 +396,7 @@ # One Shot Keys missing # Swap Hands "_sp_swp": "SHT(KC_SPC)", - # Unicode support (via X()) included implicitly + # Unicode support included implicitly # Switching Unicode Input Modes "UC_win": "UC_WINC", "UC_lnx": "UC_LINX", "UC_mac": "UC_MAC", diff --git a/keyboards/maple_computing/c39/keymaps/drashna/config.h b/keyboards/splitkb/kyria/keymaps/drashna/chconf.h similarity index 59% rename from keyboards/maple_computing/c39/keymaps/drashna/config.h rename to keyboards/splitkb/kyria/keymaps/drashna/chconf.h index 5b4f82c9b143..1ee8438cdfbe 100644 --- a/keyboards/maple_computing/c39/keymaps/drashna/config.h +++ b/keyboards/splitkb/kyria/keymaps/drashna/chconf.h @@ -1,4 +1,4 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) +/* Copyright 2020 QMK * * 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 @@ -16,19 +16,9 @@ #pragma once -// place overrides here -#undef MATRIX_COL_PINS -#define MATRIX_COL_PINS \ - { A3, A2, A1, A0, B13, B14, B15, B9, B3, B2, B4, A10, A9 } -#undef MATRIX_ROW_PINS -#define MATRIX_ROW_PINS \ - { B7, B1, B0 } +#if defined(KEYBOARD_splitkb_kyria_rev3) +#define CH_CFG_ST_RESOLUTION 16 +#define CH_CFG_ST_FREQUENCY 10000 +#endif -#define WS2812_DI_PIN B10 -#define RGBLED_NUM 15 - -#define SOLENOID_PIN B11 - -#define AUDIO_PIN A5 -#define AUDIO_PIN_ALT A4 -#define AUDIO_PIN_ALT_AS_NEGATIVE +#include_next diff --git a/keyboards/splitkb/kyria/keymaps/drashna/config.h b/keyboards/splitkb/kyria/keymaps/drashna/config.h index 2d1fbdcb02d0..702599605cb8 100644 --- a/keyboards/splitkb/kyria/keymaps/drashna/config.h +++ b/keyboards/splitkb/kyria/keymaps/drashna/config.h @@ -19,10 +19,10 @@ #define EE_HANDS #ifdef OLED_ENABLE -# ifdef OLED_DRIVER_SH1107 -# undef OLED_DISPLAY_128X64 -# define OLED_DISPLAY_128X128 -# endif +# undef OLED_DISPLAY_128X64 +# define OLED_DISPLAY_128X128 +# define OLED_PRE_CHARGE_PERIOD 0x22 +# define OLED_VCOM_DETECT 0x35 #endif #ifdef RGBLIGHT_ENABLE @@ -36,12 +36,41 @@ # define RGBLIGHT_LAYERS #endif -#define KEYLOGGER_LENGTH 10 #define QMK_ESC_INPUT D4 #define QMK_ESC_OUTPUT B2 -#ifndef KEYBOARD_splitkb_kyria_rev3 +#ifdef KEYBOARD_splitkb_kyria_rev3 +# define SERIAL_USART_FULL_DUPLEX // Enable full duplex operation mode. +# define SERIAL_USART_PIN_SWAP // Swap TX and RX pins if keyboard is master halve. +# define SERIAL_USART_DRIVER SD1 // USART driver of TX pin. default: SD1 +# define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7 +# undef SOFT_SERIAL_PIN +# define SERIAL_USART_TX_PIN D3 +# define SERIAL_USART_RX_PIN D2 + +# undef WS2812_DI_PIN +# define WS2812_DI_PIN PAL_LINE(GPIOA, 3) +# define WS2812_PWM_DRIVER PWMD2 // default: PWMD2 +# define WS2812_PWM_CHANNEL 4 // default: 2 +# define WS2812_PWM_PAL_MODE 1 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2 +# define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +# define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +# define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM2_UP // DMAMUX configuration for TIMx_UP -- only required if your MCU has a DMAMUX peripheral, see the respective reference manual for the appropriate values for your MCU. + +# define BOOTMAGIC_LITE_ROW 0 +# define BOOTMAGIC_LITE_COLUMN 6 +# define BOOTMAGIC_LITE_ROW_RIGHT 4 +# define BOOTMAGIC_LITE_COLUMN_RIGHT 6 + +# define BOOTMAGIC_LITE_EEPROM_ROW 1 +# define BOOTMAGIC_LITE_EEPROM_COLUMN 6 +# define BOOTMAGIC_LITE_EEPROM_ROW_RIGHT 5 +# define BOOTMAGIC_LITE_EEPROM_COLUMN_RIGHT 6 +# define SECURE_UNLOCK_SEQUENCE { {1, 5}, {1, 4}, {1, 3}, {1, 2} } + +# define ENCODER_RESOLUTION 2 +#else # define BOOTMAGIC_LITE_ROW 0 # define BOOTMAGIC_LITE_COLUMN 7 # define BOOTMAGIC_LITE_ROW_RIGHT 4 @@ -55,7 +84,7 @@ #define SERIAL_USART_SPEED 921600 -#if defined(KEYBOARD_splitkb_kyria_rev1_proton_c) +#if defined(KEYBOARD_splitkb_kyria_rev1_proton_c) || defined(KEYBOARD_splitkb_kyria_rev3) # define WEAR_LEVELING_BACKING_SIZE 16384 # define WEAR_LEVELING_LOGICAL_SIZE 8192 #endif diff --git a/keyboards/splitkb/kyria/keymaps/drashna/halconf.h b/keyboards/splitkb/kyria/keymaps/drashna/halconf.h new file mode 100644 index 000000000000..b23c85d0f138 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/drashna/halconf.h @@ -0,0 +1,24 @@ +/* Copyright 2020 QMK + * + * 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 3 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 + +#if defined(KEYBOARD_splitkb_kyria_rev3) +# define HAL_USE_I2C TRUE +# define HAL_USE_PWM TRUE +# define HAL_USE_SERIAL TRUE +#endif + +#include_next diff --git a/keyboards/splitkb/kyria/keymaps/drashna/keymap.c b/keyboards/splitkb/kyria/keymaps/drashna/keymap.c index 34f6e0d8e271..5a2b886fe4da 100644 --- a/keyboards/splitkb/kyria/keymaps/drashna/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/drashna/keymap.c @@ -32,7 +32,7 @@ K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ ) \ LAYOUT_wrapper( \ - KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \ + SH_T(KC_ESC), K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, SH_T(KC_MINS), \ LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(K1B), \ OS_LSFT, CTL_T(K21), K22, K23, K24, K25, TG_GAME, MEH(KC_MINS), TG_DBLO, KC_CAPS, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ KC_MUTE, OS_LALT, KC_GRV, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI, UC(0x03A8), UC(0x2E2E) \ @@ -126,7 +126,7 @@ void render_oled_title(bool side) { } oled_rotation_t oled_init_keymap(oled_rotation_t rotation) { -# ifdef OLED_DRIVER_SH1107 +# ifdef OLED_DISPLAY_128X128 return OLED_ROTATION_0; # else return OLED_ROTATION_180; @@ -155,7 +155,7 @@ void oled_render_large_display(bool side) { } #endif -#ifdef RGBLIGHT_LAYERS +#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_LAYERS) const rgblight_segment_t PROGMEM shift_layers[] = RGBLIGHT_LAYER_SEGMENTS({8, 1, 120, 255, 255}, {18, 1, 120, 255, 255}); const rgblight_segment_t PROGMEM control_layers[] = RGBLIGHT_LAYER_SEGMENTS({6, 1, 0, 255, 255}, {16, 1, 0, 255, 255}); const rgblight_segment_t PROGMEM alt_layers[] = RGBLIGHT_LAYER_SEGMENTS({2, 1, 240, 255, 255}, {17, 1, 250, 255, 255}); @@ -174,12 +174,56 @@ void housekeeping_task_keymap(void) { rgblight_set_layer_state(2, mods & MOD_MASK_ALT); rgblight_set_layer_state(3, mods & MOD_MASK_GUI); } -#endif +#elif defined(RGB_MATRIX_ENABLE) && defined(KEYBOARD_splitkb_kyria_rev3) +void keyboard_post_init_keymap(void) { + extern led_config_t g_led_config; + g_led_config.flags[30] = g_led_config.flags[24] = g_led_config.flags[18] = g_led_config.flags[12] = g_led_config.flags[11] = g_led_config.flags[10] = g_led_config.flags[9] = g_led_config.flags[8] = g_led_config.flags[7] = g_led_config.flags[6] = g_led_config.flags[37] = g_led_config.flags[38] = g_led_config.flags[39] = g_led_config.flags[40] = g_led_config.flags[41] = g_led_config.flags[42] = g_led_config.flags[43] = g_led_config.flags[49] = g_led_config.flags[55] = g_led_config.flags[61] = LED_FLAG_MODIFIER; +} + +void check_default_layer(uint8_t mode, uint8_t type, uint8_t led_min, uint8_t led_max) { + switch (get_highest_layer(default_layer_state)) { + case _QWERTY: + rgb_matrix_layer_helper(DEFAULT_LAYER_1_HSV, mode, rgb_matrix_config.speed, type, led_min, led_max); + break; + case _COLEMAK_DH: + rgb_matrix_layer_helper(DEFAULT_LAYER_2_HSV, mode, rgb_matrix_config.speed, type, led_min, led_max); + break; + case _COLEMAK: + rgb_matrix_layer_helper(DEFAULT_LAYER_3_HSV, mode, rgb_matrix_config.speed, type, led_min, led_max); + break; + case _DVORAK: + rgb_matrix_layer_helper(DEFAULT_LAYER_4_HSV, mode, rgb_matrix_config.speed, type, led_min, led_max); + break; + } +} -#ifdef KEYBOARD_splitkb_kyria_rev1_proton_c -void matrix_output_unselect_delay(uint8_t line, bool key_pressed) { - for (int32_t i = 0; i < 40; i++) { - __asm__ volatile("nop" ::: "memory"); +bool rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max) { + if (userspace_config.rgb_layer_change) { + switch (get_highest_layer(layer_state)) { + case _GAMEPAD: + rgb_matrix_layer_helper(HSV_ORANGE, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW, led_min, led_max); + break; + case _DIABLO: + rgb_matrix_layer_helper(HSV_RED, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW, led_min, led_max); + break; + case _RAISE: + rgb_matrix_layer_helper(HSV_YELLOW, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW, led_min, led_max); + break; + case _LOWER: + rgb_matrix_layer_helper(HSV_GREEN, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW, led_min, led_max); + break; + case _ADJUST: + rgb_matrix_layer_helper(HSV_RED, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW, led_min, led_max); + break; + case _MOUSE: + rgb_matrix_layer_helper(HSV_PURPLE, 1, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW, led_min, led_max); + break; + default: + check_default_layer(0, LED_FLAG_UNDERGLOW, led_min, led_max); + break; + } + check_default_layer(0, LED_FLAG_MODIFIER, led_min, led_max); } + return false; } #endif diff --git a/keyboards/splitkb/kyria/keymaps/drashna/mcuconf.h b/keyboards/splitkb/kyria/keymaps/drashna/mcuconf.h new file mode 100644 index 000000000000..2bee30b34253 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/drashna/mcuconf.h @@ -0,0 +1,35 @@ +/* Copyright 2020 Nick Brassel (tzarc) + * + * 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 3 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 + +#include_next + +#if defined(KEYBOARD_splitkb_kyria_rev3) +# undef STM32_PWM_USE_ADVANCED +# define STM32_PWM_USE_ADVANCED TRUE + +# undef STM32_PWM_USE_TIM2 +# define STM32_PWM_USE_TIM2 TRUE +# undef STM32_PWM_USE_TIM3 +# define STM32_PWM_USE_TIM3 FALSE + +# undef STM32_SERIAL_USE_USART1 +# define STM32_SERIAL_USE_USART1 TRUE + +# undef STM32_ST_USE_TIMER +# define STM32_ST_USE_TIMER 3 +#endif diff --git a/keyboards/splitkb/kyria/keymaps/drashna/rules.mk b/keyboards/splitkb/kyria/keymaps/drashna/rules.mk index 882a3fba092a..bb872743b7e5 100644 --- a/keyboards/splitkb/kyria/keymaps/drashna/rules.mk +++ b/keyboards/splitkb/kyria/keymaps/drashna/rules.mk @@ -11,6 +11,16 @@ KEY_LOCK_ENABLE = no WPM_ENABLE = yes ifeq ($(strip $(KEYBOARD)), splitkb/kyria/rev1/proton_c) + OVERLOAD_FEATURES = yes +endif +ifeq ($(strip $(KEYBOARD)), splitkb/kyria/rev3) + OVERLOAD_FEATURES = yes + CONVERT_TO = proton_c + WS2812_DRIVER = pwm + SERIAL_DRIVER = usart +endif + +ifeq ($(strip $(OVERLOAD_FEATURES)), yes) RGB_MATRIX_ENABLE = yes CONSOLE_ENABLE = yes # Console for debug MOUSEKEY_ENABLE = yes # Mouse keys @@ -20,7 +30,8 @@ ifeq ($(strip $(KEYBOARD)), splitkb/kyria/rev1/proton_c) ENCODER_MAP_ENABLE = yes AUTOCORRECT_ENABLE = yes CAPS_WORD_ENABLE = yes - OLED_DRIVER = custom + AUDIO_ENABLE = no + DEBUG_MATRIX_SCAN_RATE_ENABLE = api else LTO_ENABLE = yes BOOTLOADER = qmk-hid diff --git a/keyboards/splitkb/kyria/keymaps/lw/keymap.c b/keyboards/splitkb/kyria/keymaps/lw/keymap.c index 1ff1f54d0582..8cc29c84631c 100644 --- a/keyboards/splitkb/kyria/keymaps/lw/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/lw/keymap.c @@ -52,8 +52,6 @@ const uint32_t unicode_map[] PROGMEM = { [SECTION] = 0x00A7, // § [DEGREE] = 0x00B0, // ° }; -// usage: X(ACUTE), XP(CEDIL,CEDIL_MAJ) - // clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -74,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_QWERTZ] = LAYOUT( KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Z, KC_U, KC_I, KC_O, KC_P, KC_DEL, - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, XP(APOST,QUOTE), KC_BSPC, // XP(APOST,QUOTE) or KC_QUOT + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, UP(APOST,QUOTE), KC_BSPC, // UP(APOST,QUOTE) or KC_QUOT KC_LSFT, KC_Y, KC_X, KC_C, KC_V, KC_B, KC_BSLS, KC_GRV, KC_LPRN, KC_RPRN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SCLN, KC_CAPS, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), MO(2), SC_SENT, KC_MINS, KC_EXLM, KC_SLSH ), @@ -138,7 +136,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NAV] = LAYOUT( _______, KC_BRIU, KC_MNXT, KC_MFFD, KC_MPLY, KC_VOLU, KC_HOME, KC_PGUP, KC_UP, KC_PGDN, _______, KC_DEL, _______, KC_BRID, KC_MPRV, KC_MRWD, KC_MSTP, KC_VOLD, KC_END, KC_LEFT, KC_DOWN, KC_RGHT, KC_SCRL, KC_BSPC, - KC_LSFT, US_ACUT, US_DGRV, US_DCIR, US_DIAE, KC_MUTE, _______, UC_NEXT, KC_RSFT, KC_APP, KC_PSCR, XP(CEDIL,CEDIL_MAJ), XP(SECTION,DEGREE), _______, LCTL(KC_S), KC_INS, + KC_LSFT, US_ACUT, US_DGRV, US_DCIR, US_DIAE, KC_MUTE, _______, UC_NEXT, KC_RSFT, KC_APP, KC_PSCR, UP(CEDIL,CEDIL_MAJ), UP(SECTION,DEGREE), _______, LCTL(KC_S), KC_INS, KC_LCTL, KC_LGUI, KC_LALT, _______, MO(1), MO(2), LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V) ), diff --git a/keyboards/splitkb/zima/keymaps/drashna/keymap.c b/keyboards/splitkb/zima/keymaps/drashna/keymap.c index de3d74474e95..f7f3b54fbd6d 100644 --- a/keyboards/splitkb/zima/keymaps/drashna/keymap.c +++ b/keyboards/splitkb/zima/keymaps/drashna/keymap.c @@ -143,13 +143,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t* record) { return true; } - -bool encoder_update_user(uint8_t index, bool clockwise) { - oled_timer = timer_read32(); - if (clockwise) { - tap_code_delay(KC_VOLU, 10); - } else { - tap_code_delay(KC_VOLD, 10); - } - return false; -} diff --git a/keyboards/splitkb/zima/keymaps/drashna/readme.md b/keyboards/splitkb/zima/keymaps/drashna/readme.md deleted file mode 100644 index 0f78f4bf18d1..000000000000 --- a/keyboards/splitkb/zima/keymaps/drashna/readme.md +++ /dev/null @@ -1,7 +0,0 @@ -# The default keymap for zima - -This includes support for the OLED and Encoder. However, the actual code is found in the `zima.c` file. This can be replaced by adding your own `oled_task_user(void)` and `encoder_update_user` functinons. These will replace what is in the keyboard, and allow you to customize these features. - -The reason that this is done this way, is so that this functionality will work on the [QMK Configurator](https://config.qmk.fm/#/splitkb/zima/LAYOUT_ortho_4x3) - -For reference, the code used for the oled and encoder defaults is in [zima.c](https://github.com/qmk/qmk_firmware/tree/master/keyboards/splitkb/zima/zima.c). diff --git a/keyboards/thevankeyboards/minivan/keymaps/josjoha/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/josjoha/keymap.c index a1d82e992305..145da6b2a5a2 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/josjoha/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/josjoha/keymap.c @@ -40,7 +40,7 @@ along with this program. If not, see . * accented characters are defined in unicode_weurope.h * * Unicode macros facilitate recomputing for re-computing the Dvorak with changed letters - * ('descramble'), and exist because space ran out for * XP(…). + * ('descramble'), and exist because space ran out for * UP(…). * * The led color code might be a bit hairy, due to speed/count middle led overlapping layer color. * diff --git a/keyboards/thevankeyboards/minivan/keymaps/josjoha/unicode_macros.c b/keyboards/thevankeyboards/minivan/keymaps/josjoha/unicode_macros.c index f4416ca797a2..ddd37c89e354 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/josjoha/unicode_macros.c +++ b/keyboards/thevankeyboards/minivan/keymaps/josjoha/unicode_macros.c @@ -2022,7 +2022,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { # endif // REMOVE_DRA - /* _BON layer definitions. Due to running out of X(…), XP(…) space.*/ + /* _BON layer definitions. */ // ------------------------- row 4 # ifndef REMOVE_BON // Removes this layer entirely, if set. diff --git a/keyboards/work_louder/work_board/keymaps/drashna/keymap.c b/keyboards/work_louder/work_board/keymaps/drashna/keymap.c index 99bbedfdcb0c..1747ab638eb0 100644 --- a/keyboards/work_louder/work_board/keymaps/drashna/keymap.c +++ b/keyboards/work_louder/work_board/keymaps/drashna/keymap.c @@ -91,8 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -#ifdef ENCODER_ENABLE -# ifdef ENCODER_MAP_ENABLE +#ifdef ENCODER_MAP_ENABLE const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [_DEFAULT_LAYER_1] = { { KC_DOWN, KC_UP } }, [_DEFAULT_LAYER_2] = { { _______, _______ } }, @@ -107,23 +106,6 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [_ADJUST] = { { CK_DOWN, CK_UP } }, }; // clang-format on -# else -bool encoder_update_user(uint8_t index, bool clockwise) { - switch (get_highest_layer(layer_state)) { - case _RAISE: - clockwise ? rgblight_step() : rgblight_step_reverse(); - break; - case _LOWER: - clockwise ? rgb_matrix_step() : rgb_matrix_step_reverse(); - break; - default: - clockwise ? tap_code(KC_VOLU) : tap_code(KC_VOLD); - break; - } - return false; -} -# endif // ENCODER_ENABLE - #endif bool rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max) { @@ -133,8 +115,7 @@ bool rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max) { #define THUMB_LED 6 #define RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(...) RGB_MATRIX_INDICATOR_SET_COLOR(__VA_ARGS__) - extern bool host_driver_disabled; - if (host_driver_disabled) { + if (get_keyboard_lock()) { RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(THUMB_LED, RGB_OFF); } else { switch (get_highest_layer(default_layer_state)) { diff --git a/keyboards/work_louder/work_board/keymaps/drashna/rules.mk b/keyboards/work_louder/work_board/keymaps/drashna/rules.mk index 6a98d14daf66..8bdc48692962 100644 --- a/keyboards/work_louder/work_board/keymaps/drashna/rules.mk +++ b/keyboards/work_louder/work_board/keymaps/drashna/rules.mk @@ -1,10 +1,10 @@ -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes EXTRAKEY_ENABLE = yes MOUSEKEY_ENABLE = yes TAP_DANCE_ENABLE = no NKRO_ENABLE = yes -RGBLIGHT_STARTUP_ANIMATION = yes +RGBLIGHT_STARTUP_ANIMATION = no ENCODER_MAP_ENABLE = yes -AUTOCORRECT_ENABLE = no -CUSTOM_UNICODE_ENABLE = no +AUTOCORRECT_ENABLE = no +CUSTOM_UNICODE_ENABLE = no diff --git a/keyboards/xiudi/xd75/keymaps/bramver/keymap.c b/keyboards/xiudi/xd75/keymaps/bramver/keymap.c index f44adaf76862..960ef3ff1c78 100644 --- a/keyboards/xiudi/xd75/keymaps/bramver/keymap.c +++ b/keyboards/xiudi/xd75/keymaps/bramver/keymap.c @@ -85,7 +85,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_EMOJIFY] = LAYOUT_ortho_5x15( TO(0) , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , QK_BOOT, _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______, - _______ , X(CELE) , X(PRAY) , X(NAIL) , X(OK) , X(THNK) , _______ , _______ , _______ , X(UNAM) , X(HEYE) , X(COOL) , X(EYES) , X(SMIR) , _______, + _______ , UM(CELE), UM(PRAY), UM(NAIL), UM(OK) , UM(THNK), _______ , _______ , _______ , UM(UNAM), UM(HEYE), UM(COOL), UM(EYES), UM(SMIR), _______, _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______, _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ ) diff --git a/keyboards/xiudi/xd75/keymaps/bramver/readme.md b/keyboards/xiudi/xd75/keymaps/bramver/readme.md index a8ef38703bf9..cd1a78936e3e 100644 --- a/keyboards/xiudi/xd75/keymaps/bramver/readme.md +++ b/keyboards/xiudi/xd75/keymaps/bramver/readme.md @@ -37,7 +37,7 @@ _RAISE _EMOJIFY | TO(0) | _______ | _______ | _______ | _______ | _______ | _______ | _______ | _______ | _______ | _______ | _______ | _______ | _______ | RESET | | _______ | _______ | _______ | _______ | _______ | _______ | _______ | _______ | _______ | _______ | _______ | _______ | _______ | _______ | _______ | - | _______ | X(CELE) | X(PRAY) | X(NAIL) | X(OK) | X(THNK) | _______ | _______ | _______ | X(UNAM) | X(HEYE) | X(COOL) | X(EYES) | X(SMIR) | _______ | + | _______ | UM(CELE) | UM(PRAY) | UM(NAIL) | UM(OK) | UM(THNK) | _______ | _______ | _______ | UM(UNAM) | UM(HEYE) | UM(COOL) | UM(EYES) | UM(SMIR) | _______ | | _______ | _______ | _______ | _______ | _______ | _______ | _______ | _______ | _______ | _______ | _______ | _______ | _______ | _______ | _______ | | _______ | _______ | _______ | _______ | _______ | _______ | _______ | _______ | _______ | _______ | _______ | _______ | _______ | _______ | _______ | ``` \ No newline at end of file diff --git a/keyboards/xiudi/xd75/keymaps/minna/keymap.c b/keyboards/xiudi/xd75/keymaps/minna/keymap.c index d3ff7557be1e..535c870ff7b0 100644 --- a/keyboards/xiudi/xd75/keymaps/minna/keymap.c +++ b/keyboards/xiudi/xd75/keymaps/minna/keymap.c @@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_NO, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, FI_ARNG, FI_DIAE, KC_ENT, KC_CAPS, KC_NO, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, FI_ODIA, FI_ADIA, FI_QUOT, KC_NO, KC_LSFT, FI_LABK, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, FI_MINS, KC_RSFT, KC_UP, KC_NO, - KC_LCTL, MO(1), KC_LGUI, KC_LALT, XP(BEER, BEERS), KC_SPC, KC_NO, KC_SPC, KC_NO, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + KC_LCTL, MO(1), KC_LGUI, KC_LALT, UP(BEER, BEERS), KC_SPC, KC_NO, KC_SPC, KC_NO, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), /* * ┌────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ diff --git a/keyboards/z12/keymaps/zigotica/keymap.c b/keyboards/z12/keymaps/zigotica/keymap.c index ef01561f1af3..f4f5709fe02d 100644 --- a/keyboards/z12/keymaps/zigotica/keymap.c +++ b/keyboards/z12/keymaps/zigotica/keymap.c @@ -38,9 +38,10 @@ void raw_hid_receive(uint8_t* data, uint8_t length) { enum custom_keycodes { VIM_SIF = SAFE_RANGE, - VIM_SIP, - VIM_RIF, - VIM_RIP, + VIM_FORMAT, + VIM_GODEF, + VIM_RENSYM, + VIM_CODEACT, VIM_NEW }; @@ -49,31 +50,45 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case VIM_SIF:// Search in File if (record->event.pressed) { register_code(KC_ESC); - tap_code(KC_SLASH); + tap_code(KC_SPACE); + tap_code(KC_S); + tap_code(KC_C); } else { // released unregister_code(KC_ESC); } break; - case VIM_SIP:// Search in Project + case VIM_FORMAT:// Autoformat file if (record->event.pressed) { register_code(KC_ESC); - SEND_STRING(":Ag "); + tap_code(KC_F9); } else { // released unregister_code(KC_ESC); } break; - case VIM_RIF:// Replace in File + case VIM_GODEF:// Go to Definition if (record->event.pressed) { register_code(KC_ESC); - SEND_STRING(":%s/a/b/g"); + tap_code(KC_G); + tap_code(KC_D); } else { // released unregister_code(KC_ESC); } break; - case VIM_RIP:// Replace in Project + case VIM_CODEACT:// Code actions if (record->event.pressed) { register_code(KC_ESC); - SEND_STRING(":cdo %s/a/b/g"); + tap_code(KC_SPACE); + tap_code(KC_C); + tap_code(KC_A); + } else { // released + unregister_code(KC_ESC); + } + break; + case VIM_RENSYM:// Rename symbol + if (record->event.pressed) { + register_code(KC_ESC); + tap_code(KC_SPACE); + tap_code(KC_R); } else { // released unregister_code(KC_ESC); } @@ -160,15 +175,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |BUFFER | BROW | VIM | SCROLL| * |-------+------+------+-------| * |-------+-------+-------| - * |SRCH FL|REPL FL|NEW BUF| + * |SRCH FL| FORMAT|NEW BUF| * |-------+-------+-------| - * |SRCH PR|REPL PR| o | + * |REN SYM|GO DEF |CODEACT| * |-------+-------+-------| */ [_VIM] = LAYOUT( _______, _______, _______, _______, _______, _______, - VIM_SIF, VIM_RIF, VIM_NEW, - VIM_SIP, VIM_RIP, _______ + VIM_SIF, VIM_FORMAT, VIM_NEW, + VIM_RENSYM, VIM_GODEF, VIM_CODEACT ), }; diff --git a/keyboards/z12/keymaps/zigotica/oled.c b/keyboards/z12/keymaps/zigotica/oled.c index c96fc0f7086d..c1befb08d3f4 100644 --- a/keyboards/z12/keymaps/zigotica/oled.c +++ b/keyboards/z12/keymaps/zigotica/oled.c @@ -17,23 +17,36 @@ along with this program. If not, see . #include "zigotica.h" static void render_status(void) { - oled_write_P(PSTR("z12 v1.0\n"), false); - oled_write_P(PSTR("Layer: "), false); switch (get_highest_layer(layer_state)) { - case _VIM: - oled_write_P(PSTR("VIM \n\nBUFFER SCROLL"), false); + case _BASE: + oled_write_P(PSTR("Volume Scroll"), false); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR(" z12 v1.1"), false); break; case _FIGMA: - oled_write_P(PSTR("FIGMA \n\nTABS ZOOM"), false); + oled_write_P(PSTR("Tabs Zoom"), false); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR("ZoomFit Grids Full"), false); + oled_write_P(PSTR("Zoom100 Next Color"), false); break; case _BROWSER: - oled_write_P(PSTR("BROWSER \n\nTABS SCROLL"), false); + oled_write_P(PSTR("Tabs Scroll"), false); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR("Search Fav DevTool"), false); + oled_write_P(PSTR("Zoom100 Mute Read"), false); break; - case _BASE: - oled_write_P(PSTR("BASE \n\nVOLUME SCROLL"), false); + case _VIM: + oled_write_P(PSTR("Buffer Scroll"), false); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR("Find-F Format New"), false); + oled_write_P(PSTR("Rename Go-Def Action"), false); break; default: - oled_write_P(PSTR("Undef\n"), false); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR(" "), false); } } diff --git a/layouts/community/60_iso/bifbofii/keymap.c b/layouts/community/60_iso/bifbofii/keymap.c index d9d7383c3d55..890bdb4c5692 100755 --- a/layouts/community/60_iso/bifbofii/keymap.c +++ b/layouts/community/60_iso/bifbofii/keymap.c @@ -123,9 +123,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [UNICODE] = LAYOUT_60_iso( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSPC, - _______, _______, _______, X(EUR), _______, _______, _______, XP(SUE, BUE), _______, XP(SOE, BOE), _______, _______, _______, - KC_TRNS, XP(SAE, BAE), X(SS), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT, - KC_LSFT, _______, _______, _______, X(CPR), _______, _______, _______, _______, _______, _______, _______, KC_RSFT, + _______, _______, _______, UM(EUR), _______, _______, _______, UP(SUE, BUE), _______, UP(SOE, BOE), _______, _______, _______, + KC_TRNS, UP(SAE, BAE), UM(SS), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT, + KC_LSFT, _______, _______, _______, UM(CPR), _______, _______, _______, _______, _______, _______, _______, KC_RSFT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, _______ ), diff --git a/layouts/community/65_ansi_blocker/spidey3/keymap.c b/layouts/community/65_ansi_blocker/spidey3/keymap.c index 5f8080d4711c..81ee2bf3a7d6 100644 --- a/layouts/community/65_ansi_blocker/spidey3/keymap.c +++ b/layouts/community/65_ansi_blocker/spidey3/keymap.c @@ -32,10 +32,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), // Glyph Transformation [_GLYPH] = LAYOUT_65_ansi_blocker( - QK_BOOT, X(SAD), X(MEH), X(HAPPY), X(ANGRY), X(THUMBDN), X(THUMBUP), X(SPIDER), X_BUL, X(LOL), X(SURPRISE),X_DASH, SPI_GFLOCK, XXXXXXX, XXXXXXX, + QK_BOOT, UM(SAD), UM(MEH), UM(HAPPY), UM(ANGRY), UM(THUMBDN),UM(THUMBUP),UM(SPIDER), X_BUL, UM(LOL), UM(SURPRISE),X_DASH, SPI_GFLOCK, XXXXXXX, XXXXXXX, EE_CLR, SPI_NORMAL, SPI_WIDE, SPI_SCRIPT, SPI_BLOCKS, SPI_CIRCLE, SPI_SQUARE, SPI_PARENS, SPI_FRAKTR, SPI_BOLD, SPI_MATH, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, X(LARR), X(RARR), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, UM(LARR), UM(RARR), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX ) }; diff --git a/layouts/community/75_ansi/spidey3/keymap.c b/layouts/community/75_ansi/spidey3/keymap.c index 5c2f6a150b81..4e251b41dbeb 100644 --- a/layouts/community/75_ansi/spidey3/keymap.c +++ b/layouts/community/75_ansi/spidey3/keymap.c @@ -24,10 +24,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // FN [_FN] = LAYOUT_75_ansi( QK_BOOT, SPI_NORMAL, SPI_WIDE, SPI_SCRIPT, SPI_BLOCKS, SPI_CIRCLE, SPI_SQUARE, SPI_PARENS, SPI_FRAKTR, SPI_BOLD, SPI_MATH, XXXXXXX, SPI_GFLOCK, KC_SLEP, CH_SUSP, KC_PWR, - EE_CLR, X(SAD), X(MEH), X(HAPPY), X(ANGRY), X(THUMBDN), X(THUMBUP), X(SPIDER), X_BUL, X(LOL), X(SURPRISE),X_DASH, XXXXXXX, KC_PAUS, KC_SCRL, + EE_CLR, UM(SAD), UM(MEH), UM(HAPPY), UM(ANGRY), UM(THUMBDN),UM(THUMBUP),UM(SPIDER), X_BUL, UM(LOL), UM(SURPRISE),X_DASH, XXXXXXX, KC_PAUS, KC_SCRL, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, SPI_GLO, VK_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, KC_BRIU, XXXXXXX, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_G, RGB_M_TW, UC_LINX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BRID, - _______, XXXXXXX, UC_EMAC, UC_WINC, UC_NEXT, NK_TOGG, TG(_NUMPAD),UC_MAC, X(LARR), X(RARR), DB_TOGG, _______, KC_VOLU, KC_MUTE, + _______, XXXXXXX, UC_EMAC, UC_WINC, UC_NEXT, NK_TOGG, TG(_NUMPAD),UC_MAC, UM(LARR), UM(RARR), DB_TOGG, _______, KC_VOLU, KC_MUTE, _______, _______, _______, KC_MPLY, KC_ASST, _______, KC_CPNL, KC_MPRV, KC_VOLD, KC_MNXT ) }; diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c index 846bbc2351cf..1853b7007138 100644 --- a/layouts/community/ergodox/drashna/keymap.c +++ b/layouts/community/ergodox/drashna/keymap.c @@ -18,8 +18,6 @@ enum more_custom_keycodes { KC_SWAP_NUM = USER_SAFE_RANGE, - PM_SCROLL, - PM_PRECISION, }; // define layer change stuff for underglow indicator @@ -44,9 +42,9 @@ bool skip_leds = false; LAYOUT_ergodox_pretty_wrapper( \ KC_ESC, ________________NUMBER_LEFT________________, UC_FLIP, UC_TABL, ________________NUMBER_RIGHT_______________, KC_MINS, \ LALT_T(KC_TAB), K01, K02, K03, K04, K05, TG_DBLO, TG_DBLO, K06, K07, K08, K09, K0A, KC_BSLS, \ - KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(K1B), \ - KC_MLSF, CTL_T(K21), K22, K23, K24, K25, TG_GAME, TG_GAME, K26, K27, K28, K29, RCTL_T(K2A), KC_MRSF, \ - KC_GRV, OS_MEH, OS_HYPR, KC_LBRC, KC_RBRC, KC_BTN1, KC_BTN3, KC_BTN2, PM_SCROLL, PM_PRECISION, \ + KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(K1B), \ + KC_MLSF, CTL_T(K21), K22, K23, K24, K25, TG_GAME, TG_GAME, K26, K27, K28, K29, RCTL_T(K2A), KC_MRSF, \ + KC_GRV, OS_MEH, OS_HYPR, KC_LBRC, KC_RBRC, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, KC_NO, \ OS_LALT, OS_LGUI, OS_RGUI, CTL_T(KC_ESCAPE), \ KC_APP, KC_MENU, \ KC_SPC, LT(_LOWER, KC_BSPC), OS_LWR, OS_RSE, LT(_RAISE, KC_DEL), KC_ENT \ @@ -180,36 +178,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; // clang-format on -#ifdef PIMORONI_TRACKBALL_ENABLE -void run_trackball_cleanup(void) { - // if (trackball_is_scrolling()) { - // trackball_set_rgbw(RGB_CYAN, 0x00); - // } else if (trackball_get_precision() != 1.0) { - // trackball_set_rgbw(RGB_GREEN, 0x00); - // } else { - // trackball_set_rgbw(RGB_MAGENTA, 0x00); - // } -} - -void keyboard_post_init_keymap(void) { - // trackball_set_precision(1.5); - // trackball_set_rgbw(RGB_MAGENTA, 0x00); -} -// void shutdown_keymap(void) { trackball_set_rgbw(RGB_RED, 0x00); } - -static bool mouse_button_one, trackball_button_one; - -void trackball_register_button(bool pressed, enum mouse_buttons button) { - report_mouse_t currentReport = pointing_device_get_report(); - if (pressed) { - currentReport.buttons |= button; - } else { - currentReport.buttons &= ~button; - } - pointing_device_set_report(currentReport); -} -#endif - bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case KC_1: @@ -235,40 +203,15 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { case KC_SWAP_NUM: if (record->event.pressed) { userspace_config.swapped_numbers ^= 1; - eeconfig_update_user(userspace_config.raw); + eeconfig_update_user_config(&userspace_config.raw); } break; -#ifdef PIMORONI_TRACKBALL_ENABLE - case PM_SCROLL: - // trackball_set_scrolling(record->event.pressed); - run_trackball_cleanup(); - break; - case PM_PRECISION: - // if (record->event.pressed) { - // trackball_set_precision(1.5); - // } else { - // trackball_set_precision(1); - // } - // run_trackball_cleanup(); - break; -# if !defined(MOUSEKEY_ENABLE) - case KC_MS_BTN1: - mouse_button_one = record->event.pressed; - trackball_register_button(mouse_button_one | trackball_button_one, MOUSE_BTN1); - break; - case KC_MS_BTN2: - trackball_register_button(record->event.pressed, MOUSE_BTN2); - break; - case KC_MS_BTN3: - trackball_register_button(record->event.pressed, MOUSE_BTN3); - break; -# endif -#endif } return true; } void housekeeping_task_keymap(void) { // runs frequently to update info +#ifdef KEYBOARD_ergodox_ez uint8_t modifiers = get_mods(); uint8_t led_usb_state = host_keyboard_leds(); uint8_t one_shot = get_oneshot_mods(); @@ -295,6 +238,7 @@ void housekeeping_task_keymap(void) { // runs frequently to update info ergodox_right_led_3_set(10); } } +#endif } bool indicator_is_this_led_used_keyboard(uint8_t index) { diff --git a/layouts/community/ergodox/drashna/rules.mk b/layouts/community/ergodox/drashna/rules.mk index f5e9b500e0ee..072b70de19c0 100644 --- a/layouts/community/ergodox/drashna/rules.mk +++ b/layouts/community/ergodox/drashna/rules.mk @@ -8,10 +8,13 @@ ifeq ($(strip $(KEYBOARD)), ergodox_ez) RGB_MATRIX_ENABLE = yes INDICATOR_LIGHTS = no RGBLIGHT_STARTUP_ANIMATION = yes - PIMORONI_TRACKBALL_ENABLE = no - MOUSEKEY_ENABLE = no endif UNICODE_ENABLE = no UNICDOEMAP_ENABLE = no CUSTOM_UNICODE_ENABLE = no + +ifeq ($(strip $(KEYBOARD)), hotdox76v2) + OLED_ENABLE = no + RGB_MATRIX_ENABLE = no +endif diff --git a/layouts/community/ergodox/zweihander-macos/rules.mk b/layouts/community/ergodox/zweihander-macos/rules.mk index 8011660ced14..4a9626356a29 100644 --- a/layouts/community/ergodox/zweihander-macos/rules.mk +++ b/layouts/community/ergodox/zweihander-macos/rules.mk @@ -1,3 +1,6 @@ # Don’t do a tricolor flashing-light wave when the computer is shut down in Windows, # or when the machine is sleeping in macOS SLEEP_LED_ENABLE = no + +# Don’t pretend to be a mouse (if a a mouse is plugged into a FreeBSD machine, an annoying cursor will pop up) +MOUSEKEY_ENABLE = no diff --git a/layouts/community/ortho_4x12/bifbofii/keymap.c b/layouts/community/ortho_4x12/bifbofii/keymap.c index 7c25fed016f6..e7f427127ee0 100644 --- a/layouts/community/ortho_4x12/bifbofii/keymap.c +++ b/layouts/community/ortho_4x12/bifbofii/keymap.c @@ -146,9 +146,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+ */ [UNICODE] = LAYOUT_ortho_4x12( - _______, _______, _______, X(EUR), _______, _______, _______, XP(SUE, BUE), _______, XP(SOE, BOE), _______, _______, - _______, XP(SAE, BAE), X(SS), _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, X(CPR), _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, UM(EUR), _______, _______, _______, UP(SUE, BUE), _______, UP(SOE, BOE), _______, _______, + _______, UP(SAE, BAE), UM(SS), _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, UM(CPR), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c index cc84c132d9fb..475ccc5c3ab4 100644 --- a/layouts/community/ortho_4x12/drashna/keymap.c +++ b/layouts/community/ortho_4x12/drashna/keymap.c @@ -237,34 +237,6 @@ void keyboard_post_init_keymap(void) { } #endif // RGB_MATRIX_INIT -#ifdef ENCODER_ENABLE -bool encoder_update_user(uint8_t index, bool clockwise) { - switch (get_highest_layer(layer_state)) { - case _RAISE: - clockwise ? tap_code(KC_VOLD) : tap_code(KC_VOLU); - break; - case _LOWER: -# ifdef RGB_MATRIX_ENABLE - clockwise ? rgb_matrix_step() : rgb_matrix_step_reverse(); -# else - clockwise ? tap_code(KC_PGDN) : tap_code(KC_PGUP); -# endif - break; - case _ADJUST: -# ifdef AUDIO_CLICKY - clockwise ? clicky_freq_up() : clicky_freq_down(); -# endif - break; - default: - clockwise ? tap_code(KC_DOWN) : tap_code(KC_UP); - } -# ifdef AUDIO_CLICKY - clicky_play(); -# endif - return true; -} -#endif // ENCODER_ENABLE - #ifdef KEYBOARD_planck_rev6 bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { diff --git a/lib/python/qmk/search.py b/lib/python/qmk/search.py index c8ce85b96e8d..2bbbc7806fc6 100644 --- a/lib/python/qmk/search.py +++ b/lib/python/qmk/search.py @@ -80,9 +80,9 @@ def search_keymap_targets(keymap='default', filters=[], print_vals=[]): if value is not None: if func_name == 'length': - valid_keymaps = filter(lambda e: key in e[2] and len(e[2].get(key)) == int(value), valid_keymaps) + valid_keymaps = filter(lambda e, key=key, value=value: key in e[2] and len(e[2].get(key)) == int(value), valid_keymaps) elif func_name == 'contains': - valid_keymaps = filter(lambda e: key in e[2] and value in e[2].get(key), valid_keymaps) + valid_keymaps = filter(lambda e, key=key, value=value: key in e[2] and value in e[2].get(key), valid_keymaps) else: cli.log.warning(f'Unrecognized filter expression: {function_match.group(0)}') continue @@ -90,9 +90,9 @@ def search_keymap_targets(keymap='default', filters=[], print_vals=[]): cli.log.info(f'Filtering on condition: {{fg_green}}{func_name}{{fg_reset}}({{fg_cyan}}{key}{{fg_reset}}, {{fg_cyan}}{value}{{fg_reset}})...') else: if func_name == 'exists': - valid_keymaps = filter(lambda e: key in e[2], valid_keymaps) + valid_keymaps = filter(lambda e, key=key: key in e[2], valid_keymaps) elif func_name == 'absent': - valid_keymaps = filter(lambda e: key not in e[2], valid_keymaps) + valid_keymaps = filter(lambda e, key=key: key not in e[2], valid_keymaps) else: cli.log.warning(f'Unrecognized filter expression: {function_match.group(0)}') continue diff --git a/quantum/quantum.c b/quantum/quantum.c index 123e00d72605..1cc017a583ba 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -472,7 +472,7 @@ void suspend_power_down_quantum(void) { #ifndef NO_SUSPEND_POWER_DOWN // Turn off backlight # ifdef BACKLIGHT_ENABLE - backlight_set(0); + backlight_level_noeeprom(0); # endif # ifdef LED_MATRIX_ENABLE diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 32e786402c2e..58e5f4a5ef37 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -179,10 +179,10 @@ #define QK_UNICODE_GET_CODE_POINT(kc) ((kc)&0x7FFF) // UNICODEMAP_ENABLE - Allows Unicode input up to 0x10FFFF, requires unicode_map -#define X(i) (QK_UNICODEMAP | ((i)&0x3FFF)) +#define UM(i) (QK_UNICODEMAP | ((i)&0x3FFF)) #define QK_UNICODEMAP_GET_INDEX(kc) ((kc)&0x3FFF) -#define XP(i, j) (QK_UNICODEMAP_PAIR | ((i)&0x7F) | (((j)&0x7F) << 7)) // 127 max i and j +#define UP(i, j) (QK_UNICODEMAP_PAIR | ((i)&0x7F) | (((j)&0x7F) << 7)) // 127 max i and j #define QK_UNICODEMAP_PAIR_GET_UNSHIFTED_INDEX(kc) ((kc)&0x7F) #define QK_UNICODEMAP_PAIR_GET_SHIFTED_INDEX(kc) (((kc) >> 7) & 0x7F) diff --git a/quantum/quantum_keycodes_legacy.h b/quantum/quantum_keycodes_legacy.h index 120c98bc6283..ad078cdad5ce 100644 --- a/quantum/quantum_keycodes_legacy.h +++ b/quantum/quantum_keycodes_legacy.h @@ -53,3 +53,6 @@ #define GUI_ON QK_MAGIC_GUI_ON #define GUI_OFF QK_MAGIC_GUI_OFF #define GUI_TOG QK_MAGIC_TOGGLE_GUI + +#define X(i) UM(i) +#define XP(i, j) UM(i, j) diff --git a/quantum/split_common/transactions.c b/quantum/split_common/transactions.c index 1105bb226be0..5c09cb9e2c18 100644 --- a/quantum/split_common/transactions.c +++ b/quantum/split_common/transactions.c @@ -412,7 +412,7 @@ static void backlight_handlers_slave(matrix_row_t master_matrix[], matrix_row_t uint8_t backlight_level = split_shmem->backlight_level; split_shared_memory_unlock(); - backlight_set(backlight_level); + backlight_level_noeeprom(backlight_level); } # define TRANSACTIONS_BACKLIGHT_MASTER() TRANSACTION_HANDLER_MASTER(backlight) diff --git a/tests/caps_word/caps_word_unicodemap/test_caps_word_unicodemap.cpp b/tests/caps_word/caps_word_unicodemap/test_caps_word_unicodemap.cpp index 01cdfd6408d2..21e5493526e0 100644 --- a/tests/caps_word/caps_word_unicodemap/test_caps_word_unicodemap.cpp +++ b/tests/caps_word/caps_word_unicodemap/test_caps_word_unicodemap.cpp @@ -39,8 +39,8 @@ const uint32_t unicode_map[] PROGMEM = { [DELTA_UPPERCASE] = 0x0394, }; -#define U_DASH XP(ENDASH, EMDASH) -#define U_DELTA XP(DELTA_LOWERCASE, DELTA_UPPERCASE) +#define U_DASH UP(ENDASH, EMDASH) +#define U_DELTA UP(DELTA_LOWERCASE, DELTA_UPPERCASE) bool caps_word_press_user(uint16_t keycode) { switch (keycode) { diff --git a/users/drashna/bootmagic_better.c b/users/drashna/bootmagic_better.c index ffd2e609ae1f..fa1078e37da6 100644 --- a/users/drashna/bootmagic_better.c +++ b/users/drashna/bootmagic_better.c @@ -28,7 +28,7 @@ void bootmagic_lite(void) { if (!is_keyboard_left()) { row = BOOTMAGIC_LITE_ROW_RIGHT; col = BOOTMAGIC_LITE_COLUMN_RIGHT; -#if defined(BOOTMAGIC_LITE_EEPROM_ROW) && defined(BOOTMAGIC_LITE_EEPROM_COLUMN) && defined(BOOTMAGIC_LITE_EEPROM_ROW_RIGHT) && defined(BOOTMAGIC_LITE_EEPROM_COLUMN_RIGHT) +# if defined(BOOTMAGIC_LITE_EEPROM_ROW) && defined(BOOTMAGIC_LITE_EEPROM_COLUMN) && defined(BOOTMAGIC_LITE_EEPROM_ROW_RIGHT) && defined(BOOTMAGIC_LITE_EEPROM_COLUMN_RIGHT) row_e = BOOTMAGIC_LITE_EEPROM_ROW_RIGHT; col_e = BOOTMAGIC_LITE_EEPROM_COLUMN_RIGHT; # endif diff --git a/users/drashna/callbacks.c b/users/drashna/callbacks.c index 568f56c8d165..cab7e5278fed 100644 --- a/users/drashna/callbacks.c +++ b/users/drashna/callbacks.c @@ -3,6 +3,9 @@ #include "drashna.h" +#ifdef CUSTOM_DYNAMIC_MACROS_ENABLE +# include "keyrecords/dynamic_macros.h" +#endif #ifdef I2C_SCANNER_ENABLE void housekeeping_task_i2c_scanner(void); void keyboard_post_init_i2c(void); @@ -10,7 +13,10 @@ void keyboard_post_init_i2c(void); __attribute__((weak)) void keyboard_pre_init_keymap(void) {} void keyboard_pre_init_user(void) { - userspace_config.raw = eeconfig_read_user(); + eeconfig_read_user_config(&userspace_config.raw); + if (!userspace_config.check) { + eeconfig_init_user(); + } keyboard_pre_init_keymap(); } // Add reconfigurable functions here, for keymap customization @@ -24,58 +30,8 @@ void keyboard_pre_init_user(void) { void keyboard_post_init_qp(void); #endif -#ifdef OS_DETECTION_ENABLE -os_variant_t os_type; - -uint32_t startup_exec(uint32_t trigger_time, void *cb_arg) { - /* do something */ - - if (is_keyboard_master()) { - os_type = detected_host_os(); - if (os_type) { - bool is_mac = (os_type == OS_MACOS) || (os_type == OS_IOS); - keymap_config.swap_lctl_lgui = keymap_config.swap_rctl_rgui = is_mac; -# ifdef UNICODE_COMMON_ENABLE - uint8_t mode = is_mac ? UNICODE_MODE_MACOS : UNICODE_MODE_WINCOMPOSE; - if (mode != get_unicode_input_mode()) { - set_unicode_input_mode(mode); - } -# endif - switch (os_type) { - case OS_UNSURE: - xprintf("unknown OS Detected\n"); - break; - case OS_LINUX: - xprintf("Linux Detected\n"); - break; - case OS_WINDOWS: - xprintf("Windows Detected\n"); - break; -# if 0 - case OS_WINDOWS_UNSURE: - xprintf("Windows? Detected\n"); - break; -# endif - case OS_MACOS: - xprintf("MacOS Detected\n"); - break; - case OS_IOS: - xprintf("iOS Detected\n"); - break; -# if 0 - case OS_PS5: - xprintf("PlayStation 5 Detected\n"); - break; - case OS_HANDHELD: - xprintf("Nintend Switch/Quest 2 Detected\n"); - break; -# endif - } - } - } - - return os_type ? 0 : 500; -} +#if defined(OS_DETECTION_ENABLE) && defined(DEFERRED_EXEC_ENABLE) +uint32_t startup_exec(uint32_t trigger_time, void *cb_arg); #endif __attribute__((weak)) void keyboard_post_init_keymap(void) {} @@ -103,8 +59,10 @@ void keyboard_post_init_user(void) { DDRB &= ~(1 << 0); PORTB &= ~(1 << 0); #endif - -#ifdef OS_DETECTION_ENABLE +#ifdef CUSTOM_DYNAMIC_MACROS_ENABLE + dynamic_macro_init(); +#endif +#if defined(OS_DETECTION_ENABLE) && defined(DEFERRED_EXEC_ENABLE) defer_exec(100, startup_exec, NULL); #endif @@ -153,9 +111,6 @@ void suspend_power_down_user(void) { __attribute__((weak)) void suspend_wakeup_init_keymap(void) {} void suspend_wakeup_init_user(void) { -#ifdef OLED_ENABLE - oled_timer_reset(); -#endif suspend_wakeup_init_keymap(); } @@ -217,6 +172,11 @@ layer_state_t layer_state_set_user(layer_state_t state) { __attribute__((weak)) layer_state_t default_layer_state_set_keymap(layer_state_t state) { return state; } + +#if defined(AUDIO_ENABLE) && defined(DEFAULT_LAYER_SONGS) +static float default_layer_songs[][MAX_LAYER][2] = DEFAULT_LAYER_SONGS; +#endif + layer_state_t default_layer_state_set_user(layer_state_t state) { if (!is_keyboard_master()) { return state; @@ -226,6 +186,21 @@ layer_state_t default_layer_state_set_user(layer_state_t state) { #if defined(CUSTOM_RGBLIGHT) state = default_layer_state_set_rgb_light(state); #endif + + static bool has_init_been_ran = false; + // We don't want to run this the first time it's called, since it's read from eeeprom and called + // as part of the startup process. But after that, it's okay. + if (has_init_been_ran) { +#if defined(AUDIO_ENABLE) && defined(DEFAULT_LAYER_SONGS) + if (get_highest_layer(state) < MAX_LAYER) { + PLAY_SONG(default_layer_songs[get_highest_layer(state)]); + } +#endif + eeconfig_update_default_layer(state); + } else { + has_init_been_ran = true; + } + return state; } @@ -238,11 +213,23 @@ __attribute__((weak)) void eeconfig_init_keymap(void) {} void eeconfig_init_user(void) { userspace_config.raw = 0; userspace_config.rgb_layer_change = true; - userspace_config.autocorrection = true; - eeconfig_update_user(userspace_config.raw); + userspace_config.check = true; +#if defined(OLED_ENABLE) + userspace_config.oled_brightness = OLED_BRIGHTNESS; +#else + userspace_config.oled_brightness = 255; +#endif + eeconfig_update_user_config(&userspace_config.raw); eeconfig_init_keymap(); } +void eeconfig_init_user_datablock(void) { +#if (EECONFIG_USER_DATA_SIZE) > 4 + uint8_t eeconfig_empty_temp[(EECONFIG_USER_DATA_SIZE)-4] = {0}; + eeconfig_update_user_data(eeconfig_empty_temp); +#endif +} + #ifdef SPLIT_KEYBOARD __attribute__((weak)) void matrix_slave_scan_keymap(void) {} void matrix_slave_scan_user(void) { diff --git a/users/drashna/config.h b/users/drashna/config.h index 14805ca2d097..ec9bbf1afbe2 100644 --- a/users/drashna/config.h +++ b/users/drashna/config.h @@ -3,9 +3,6 @@ #pragma once -// Use custom magic number so that when switching branches, EEPROM always gets reset -#define EECONFIG_MAGIC_NUMBER (uint16_t)0x1339 - #ifdef IS_COMMAND # undef IS_COMMAND #endif @@ -97,7 +94,22 @@ # define C15 PAL_LINE(GPIOC, 15) #endif - #define ENABLE_COMPILE_KEYCODE #define BOTH_SHIFTS_TURNS_ON_CAPS_WORD + +/* --- PRINTF_BYTE_TO_BINARY macro's --- */ +#define PRINTF_BINARY_PATTERN_INT8 "%c%c%c%c%c%c%c%c" +#define PRINTF_BYTE_TO_BINARY_INT8(i) (((i)&0x80ll) ? '1' : '0'), (((i)&0x40ll) ? '1' : '0'), (((i)&0x20ll) ? '1' : '0'), (((i)&0x10ll) ? '1' : '0'), (((i)&0x08ll) ? '1' : '0'), (((i)&0x04ll) ? '1' : '0'), (((i)&0x02ll) ? '1' : '0'), (((i)&0x01ll) ? '1' : '0') + +#define PRINTF_BINARY_PATTERN_INT16 PRINTF_BINARY_PATTERN_INT8 " " PRINTF_BINARY_PATTERN_INT8 +#define PRINTF_BYTE_TO_BINARY_INT16(i) PRINTF_BYTE_TO_BINARY_INT8((i) >> 8), PRINTF_BYTE_TO_BINARY_INT8(i) +#define PRINTF_BINARY_PATTERN_INT32 PRINTF_BINARY_PATTERN_INT16 " " PRINTF_BINARY_PATTERN_INT16 +#define PRINTF_BYTE_TO_BINARY_INT32(i) PRINTF_BYTE_TO_BINARY_INT16((i) >> 16), PRINTF_BYTE_TO_BINARY_INT16(i) +#define PRINTF_BINARY_PATTERN_INT64 PRINTF_BINARY_PATTERN_INT32 " " PRINTF_BINARY_PATTERN_INT32 +#define PRINTF_BYTE_TO_BINARY_INT64(i) PRINTF_BYTE_TO_BINARY_INT32((i) >> 32), PRINTF_BYTE_TO_BINARY_INT32(i) +/* --- end macros --- */ + +#ifndef EECONFIG_USER_DATA_SIZE +# define EECONFIG_USER_DATA_SIZE 8 +#endif diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c index 259810c70f14..cad6db8f3d91 100644 --- a/users/drashna/drashna.c +++ b/users/drashna/drashna.c @@ -2,6 +2,8 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include "drashna.h" +#include +#include userspace_config_t userspace_config; @@ -139,7 +141,7 @@ float autocorrect_song[][2] = SONG(PLOVER_GOODBYE_SOUND); # endif # endif -bool apply_autocorrect(uint8_t backspaces, const char* str) { +bool apply_autocorrect(uint8_t backspaces, const char *str) { if (layer_state_is(_GAMEPAD)) { return false; } @@ -188,7 +190,7 @@ void oneshot_locked_mods_changed_user(uint8_t mods) { # endif #endif -void format_layer_bitmap_string(char* buffer, layer_state_t state, layer_state_t default_state) { +void format_layer_bitmap_string(char *buffer, layer_state_t state, layer_state_t default_state) { for (int i = 0; i < 16; i++) { if (i == 0 || i == 4 || i == 8 || i == 12) { *buffer = ' '; @@ -207,3 +209,111 @@ void format_layer_bitmap_string(char* buffer, layer_state_t state, layer_state_t } *buffer = 0; } + +#if defined(OS_DETECTION_ENABLE) && defined(DEFERRED_EXEC_ENABLE) +os_variant_t os_type; + +uint32_t startup_exec(uint32_t trigger_time, void *cb_arg) { + if (is_keyboard_master()) { + os_type = detected_host_os(); + if (os_type) { + bool is_mac = (os_type == OS_MACOS) || (os_type == OS_IOS); + if (keymap_config.swap_lctl_lgui != is_mac) { + keymap_config.swap_lctl_lgui = keymap_config.swap_rctl_rgui = is_mac; + eeconfig_update_keymap(keymap_config.raw); + } +# ifdef UNICODE_COMMON_ENABLE + set_unicode_input_mode_soft(keymap_config.swap_lctl_lgui ? UNICODE_MODE_MACOS : UNICODE_MODE_WINCOMPOSE); +# endif + switch (os_type) { + case OS_UNSURE: + xprintf("unknown OS Detected\n"); + break; + case OS_LINUX: + xprintf("Linux Detected\n"); + break; + case OS_WINDOWS: + xprintf("Windows Detected\n"); + break; +# if 0 + case OS_WINDOWS_UNSURE: + xprintf("Windows? Detected\n"); + break; +# endif + case OS_MACOS: + xprintf("MacOS Detected\n"); + break; + case OS_IOS: + xprintf("iOS Detected\n"); + break; +# if 0 + case OS_PS5: + xprintf("PlayStation 5 Detected\n"); + break; + case OS_HANDHELD: + xprintf("Nintend Switch/Quest 2 Detected\n"); + break; +# endif + } + } + } + + return os_type ? 0 : 500; +} +#endif + +static host_driver_t *host_driver = 0; +static bool host_driver_disabled = false; + +void set_keyboard_lock(bool status) { + if (!status && !host_get_driver()) { + host_set_driver(host_driver); + } else if (status && host_get_driver()) { + host_driver = host_get_driver(); + clear_keyboard(); + host_set_driver(0); + } else if (status) { + clear_keyboard(); + } + + host_driver_disabled = status; +} + +void toggle_keyboard_lock(void) { + set_keyboard_lock(!host_driver_disabled); +} + +bool get_keyboard_lock(void) { + return host_driver_disabled; +} + +const char *get_layer_name_string(layer_state_t state, bool alt_name) { + switch (get_highest_layer(state)) { + case _QWERTY: + return alt_name ? "Num Pad" : "QWERTY"; + case _COLEMAK: + return "Colemak"; + case _COLEMAK_DH: + return "Colemak-DH"; + case _DVORAK: + return "Dvorak"; + case _GAMEPAD: + return "Gamepad"; + case _DIABLO: + return "Diablo"; + case _DIABLOII: + return "Diablo II"; + case _MOUSE: + return alt_name ? "Macros" : "Mouse"; + case _MEDIA: + return "Media"; + case _LOWER: + return "Lower"; + case _RAISE: + return "Raise"; + case _ADJUST: + return "Adjust"; + default: + return "Unknown"; + } +} diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h index 4e2a4d5acbd3..49cdf6ca214c 100644 --- a/users/drashna/drashna.h +++ b/users/drashna/drashna.h @@ -4,7 +4,7 @@ #pragma once #include QMK_KEYBOARD_H -#include "eeprom.h" +#include "eeconfig_users.h" #include "keyrecords/wrappers.h" #include "keyrecords/process_records.h" #include "callbacks.h" @@ -30,6 +30,9 @@ #ifdef OS_DETECTION_ENABLE # include "os_detection.h" #endif +#ifdef UNICODE_COMMON_ENABLE +# include "keyrecords/unicode.h" +#endif /* Define layer names */ enum userspace_layers { @@ -88,14 +91,25 @@ void format_layer_bitmap_string(char* buffer, layer_state_t state, layer_state_t typedef union { uint32_t raw; struct { - bool rgb_layer_change :1; - bool is_overwatch :1; - bool nuke_switch :1; - bool swapped_numbers :1; - bool rgb_matrix_idle_anim :1; - bool autocorrection :1; + bool rgb_layer_change :1; + bool is_overwatch :1; + bool nuke_switch :1; + bool swapped_numbers :1; + bool rgb_matrix_idle_anim :1; + bool mouse_jiggler :1; + uint8_t align_reserved :2; + uint8_t oled_brightness :8; + uint32_t reserved :15; + bool check :1; }; } userspace_config_t; // clang-format on +_Static_assert(sizeof(userspace_config_t) == sizeof(uint32_t), "Userspace EECONFIG out of spec."); + extern userspace_config_t userspace_config; + +void set_keyboard_lock(bool enable); +bool get_keyboard_lock(void); +void toggle_keyboard_lock(void); +const char* get_layer_name_string(layer_state_t state, bool alt_name); diff --git a/users/drashna/eeconfig_users.c b/users/drashna/eeconfig_users.c new file mode 100644 index 000000000000..8e0f1f10b6a6 --- /dev/null +++ b/users/drashna/eeconfig_users.c @@ -0,0 +1,53 @@ +// Copyright 2023 Christopher Courtney, aka Drashna Jael're (@drashna) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "eeconfig_users.h" +#include "eeprom.h" +#include "eeconfig.h" +#include + +#if (TOTAL_EEPROM_BYTE_COUNT - 1) < EECONFIG_SIZE && !defined(KEYBOARD_input_club_ergodox_infinity) +# error "More eeprom configured than is available." +#endif +#if (EECONFIG_USER_DATA_SIZE) != 0 && (EECONFIG_USER_DATA_SIZE) < 4 +# error "Not enough EEPROM configured for user config." +#endif + +#if (EECONFIG_USER_DATA_SIZE) == 0 +# define EECONFIG_USER_TEMP EECONFIG_USER +#else +# define EECONFIG_USER_TEMP (uint32_t *)(EECONFIG_USER_DATABLOCK) +#endif + +void eeconfig_read_user_config(uint32_t *data) { +#if (EECONFIG_USER_DATA_SIZE) > 0 + if (!eeconfig_is_user_datablock_valid()) { + memset(data, 0, 4); + } else +#endif + eeprom_read_block(data, EECONFIG_USER_TEMP, 4); +} + +void eeconfig_update_user_config(const uint32_t *data) { + eeprom_update_block(data, EECONFIG_USER_TEMP, 4); +#if (EECONFIG_USER_DATA_SIZE) > 0 + eeprom_update_dword(EECONFIG_USER, (EECONFIG_USER_DATA_VERSION)); +#endif +} + +void eeconfig_read_user_data(void *data) { +#if (EECONFIG_USER_DATA_SIZE) > 4 + if (eeconfig_is_user_datablock_valid()) { + eeprom_read_block(data, EECONFIG_USER_DATABLOCK + 4, (EECONFIG_USER_DATA_SIZE)-4); + } else { + memset(data, 0, (EECONFIG_USER_DATA_SIZE)); + } +#endif +} + +void eeconfig_update_user_data(const void *data) { +#if (EECONFIG_USER_DATA_SIZE) > 4 + eeprom_update_dword(EECONFIG_USER, (EECONFIG_USER_DATA_VERSION)); + eeprom_update_block(data, EECONFIG_USER_DATABLOCK + 4, (EECONFIG_USER_DATA_SIZE)-4); +#endif +} diff --git a/users/drashna/eeconfig_users.h b/users/drashna/eeconfig_users.h new file mode 100644 index 000000000000..c9b230df9c3a --- /dev/null +++ b/users/drashna/eeconfig_users.h @@ -0,0 +1,12 @@ +// Copyright 2023 Christopher Courtney, aka Drashna Jael're (@drashna) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include + +void eeconfig_read_user_config(uint32_t *data); +void eeconfig_update_user_config(const uint32_t *data); + +void eeconfig_read_user_data(void *data); +void eeconfig_update_user_data(const void *data); diff --git a/users/drashna/keyrecords/dynamic_macros.c b/users/drashna/keyrecords/dynamic_macros.c new file mode 100644 index 000000000000..43c2336cb60a --- /dev/null +++ b/users/drashna/keyrecords/dynamic_macros.c @@ -0,0 +1,283 @@ +// Copyright 2016 Jack Humbert +// Copyright 2019 Wojciech Siewierski < wojciech dot siewierski at onet dot pl > +// Copyright 2023 Christopher Courtney, aka Drashna Jael're (@drashna) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "keyrecords/dynamic_macros.h" +#include "keyrecords/process_records.h" +#include "wait.h" +#include "debug.h" +#include "eeprom.h" +#include "eeconfig.h" +#include + +static uint8_t macro_id = 255; +static uint8_t recording_state = STATE_NOT_RECORDING; + +#if EECONFIG_USER_DATA_SIZE < 4 +# error "EECONFIG_USER_DATA_SIZE not set. Don't step on others eeprom." +#endif +#ifndef DYNAMIC_MACRO_EEPROM_BLOCK0_ADDR +# define DYNAMIC_MACRO_EEPROM_BLOCK0_ADDR (uint8_t*)(EECONFIG_USER_DATABLOCK + 4) +#endif + +dynamic_macro_t dynamic_macros[DYNAMIC_MACRO_COUNT]; +_Static_assert((sizeof(dynamic_macros)) <= (EECONFIG_USER_DATA_SIZE - 4), "User Data Size must be large enough to host all macros"); + +__attribute__((weak)) void dynamic_macro_record_start_user(void) {} + +__attribute__((weak)) void dynamic_macro_play_user(uint8_t macro_id) {} + +__attribute__((weak)) void dynamic_macro_record_key_user(uint8_t macro_id, keyrecord_t* record) {} + +__attribute__((weak)) void dynamic_macro_record_end_user(uint8_t macro_id) {} + +/** + * @brief Gets the current macro ID + * + * @return uint8_t + */ +uint8_t dynamic_macro_get_current_id(void) { + return macro_id; +} + +/** + * @brief Gets the current recording state + * + * @return uint8_t + */ +uint8_t dynamic_macro_get_recording_state(void) { + return recording_state; +} + +/** + * Start recording of the dynamic macro. + * + * @param macro_id[in] The id of macro to be recorded + */ +bool dynamic_macro_record_start(uint8_t macro_id) { + if (macro_id >= (uint8_t)(DYNAMIC_MACRO_COUNT)) { + return false; + } + dprintf("dynamic macro recording: started for slot %d\n", macro_id); + + dynamic_macro_record_start_user(); + + clear_keyboard(); + layer_clear(); + + dynamic_macros[macro_id].length = 0; + return true; +} + +/** + * Play the dynamic macro. + * + * @param macro_id[in] The id of macro to be played + */ +void dynamic_macro_play(uint8_t macro_id) { + if (macro_id >= (uint8_t)(DYNAMIC_MACRO_COUNT)) { + return; + } + + dprintf("dynamic macro: slot %d playback, length %d\n", macro_id, dynamic_macros[macro_id].length); + + layer_state_t saved_layer_state = layer_state; + + clear_keyboard(); + layer_clear(); + + for (uint8_t i = 0; i < dynamic_macros[macro_id].length; ++i) { + process_record(&dynamic_macros[macro_id].events[i]); + } + + clear_keyboard(); + + layer_state_set(saved_layer_state); + + dynamic_macro_play_user(macro_id); +} + +/** + * Record a single key in a dynamic macro. + * + * @param macro_id[in] The start of the used macro buffer. + * @param record[in] The current keypress. + */ +void dynamic_macro_record_key(uint8_t macro_id, keyrecord_t* record) { + dynamic_macro_t* macro = &dynamic_macros[macro_id]; + uint8_t length = macro->length; + + /* If we've just started recording, ignore all the key releases. */ + if (!record->event.pressed && length == 0) { + dprintln("dynamic macro: ignoring a leading key-up event"); + return; + } + + if (length < DYNAMIC_MACRO_SIZE) { + macro->events[length] = *record; + macro->length = ++length; + } else { + dynamic_macro_record_key_user(macro_id, record); + } + + dprintf("dynamic macro: slot %d length: %d/%d\n", macro_id, length, DYNAMIC_MACRO_SIZE); +} + +/** + * End recording of the dynamic macro. Essentially just update the + * pointer to the end of the macro. + */ +void dynamic_macro_record_end(uint8_t macro_id) { + if (macro_id >= (uint8_t)(DYNAMIC_MACRO_COUNT)) { + return; + } + dynamic_macro_record_end_user(macro_id); + + dynamic_macro_t* macro = &dynamic_macros[macro_id]; + uint8_t length = macro->length; + + keyrecord_t* events_begin = &(macro->events[0]); + keyrecord_t* events_pointer = &(macro->events[length - 1]); + + dprintf("dynamic_macro: macro length before trimming: %d\n", macro->length); + while (events_pointer != events_begin && (events_pointer)->event.pressed) { + dprintln("dynamic macro: trimming a trailing key-down event"); + --(macro->length); + --events_pointer; + } + + macro->checksum = dynamic_macro_calc_crc(macro); + dynamic_macro_save_eeprom(macro_id); + + dprintf("dynamic macro: slot %d saved, length: %d\n", macro_id, length); +} + +bool process_record_dynamic_macro(uint16_t keycode, keyrecord_t* record) { + if (STATE_NOT_RECORDING == recording_state) { + /* Program key pressed to request programming mode */ + if (keycode == DYN_MACRO_PROG && record->event.pressed) { + // dynamic_macro_led_blink(); + + recording_state = STATE_RECORD_KEY_PRESSED; + dprintf("dynamic macro: programming key pressed, waiting for macro slot selection. %d\n", recording_state); + + return false; + } + /* Macro key pressed to request macro playback */ + if (IS_DYN_KEYCODE(keycode) && record->event.pressed) { + dynamic_macro_play(keycode - DYN_MACRO_KEY00); + + return false; + } + + /* Non-dynamic macro key, process it elsewhere. */ + return true; + } else if (STATE_RECORD_KEY_PRESSED == recording_state) { + /* Program key pressed again before a macro selector key, cancel macro recording. + Blink leds to indicate cancelation. */ + if (keycode == DYN_MACRO_PROG && record->event.pressed) { + // dynamic_macro_led_blink(); + + recording_state = STATE_NOT_RECORDING; + dprintf("dynamic macro: programming key pressed, programming mode canceled. %d\n", recording_state); + + return false; + } else if (IS_DYN_KEYCODE(keycode) && record->event.pressed) { + macro_id = keycode - DYN_MACRO_KEY00; + + if (dynamic_macro_record_start(macro_id)) { + /* Macro slot selected, enter recording state. */ + recording_state = STATE_CURRENTLY_RECORDING; + } else { + recording_state = STATE_NOT_RECORDING; + } + + return false; + } + /* Ignore any non-macro key press while in RECORD_KEY_PRESSED state. */ + return false; + } else if (STATE_CURRENTLY_RECORDING == recording_state) { + /* Program key pressed to request end of macro recording. */ + if (keycode == DYN_MACRO_PROG && record->event.pressed) { + dynamic_macro_record_end(macro_id); + recording_state = STATE_NOT_RECORDING; + + return false; + } + /* Don't record other macro key presses. */ + else if (IS_DYN_KEYCODE(keycode) && record->event.pressed) { + dprintln("dynamic macro: playback key ignored in programming mode."); + return false; + } + /* Non-macro keypress that should be recorded */ + else { + dynamic_macro_record_key(macro_id, record); + + /* Don't output recorded keypress. */ + return false; + } + } + + return true; +} + +static inline uint16_t crc16_update(uint16_t crc, uint8_t a) { + crc ^= a; + for (uint8_t i = 0; i < 8; ++i) { + if (crc & 1) + crc = (crc >> 1) ^ 0xA001; + else + crc = (crc >> 1); + } + return crc; +} + +uint16_t dynamic_macro_calc_crc(dynamic_macro_t* macro) { + uint16_t crc = 0; + uint8_t* data = (uint8_t*)macro; + + for (uint16_t i = 0; i < DYNAMIC_MACRO_CRC_LENGTH; ++i) { + crc = crc16_update(crc, *(data++)); + } + return crc; +} + +inline void* dynamic_macro_eeprom_macro_addr(uint8_t macro_id) { + return DYNAMIC_MACRO_EEPROM_BLOCK0_ADDR + sizeof(dynamic_macro_t) * macro_id; +} + +void dynamic_macro_load_eeprom_all(void) { + for (uint8_t i = 0; i < DYNAMIC_MACRO_COUNT; ++i) { + dynamic_macro_load_eeprom(i); + } +} + +void dynamic_macro_load_eeprom(uint8_t macro_id) { + dynamic_macro_t* dst = &dynamic_macros[macro_id]; + + eeprom_read_block(dst, dynamic_macro_eeprom_macro_addr(macro_id), sizeof(dynamic_macro_t)); + + /* Validate checksum, ifchecksum is NOT valid for macro, set its length to 0 to prevent its use. */ + if (dynamic_macro_calc_crc(dst) != dst->checksum) { + dprintf("dynamic macro: slot %d not loaded, checksum mismatch\n", macro_id); + dst->length = 0; + + return; + } + + dprintf("dynamic macro: slot %d loaded from eeprom, checksum okay\n", macro_id); +} + +void dynamic_macro_save_eeprom(uint8_t macro_id) { + dynamic_macro_t* src = &dynamic_macros[macro_id]; + + eeprom_update_block(src, dynamic_macro_eeprom_macro_addr(macro_id), sizeof(dynamic_macro_t)); + dprintf("dynamic macro: slot %d saved to eeprom\n", macro_id); +} + +void dynamic_macro_init(void) { + /* zero out macro blocks */ + memset(&dynamic_macros, 0, DYNAMIC_MACRO_COUNT * sizeof(dynamic_macro_t)); + dynamic_macro_load_eeprom_all(); +} diff --git a/users/drashna/keyrecords/dynamic_macros.h b/users/drashna/keyrecords/dynamic_macros.h new file mode 100644 index 000000000000..5eefb9b268c1 --- /dev/null +++ b/users/drashna/keyrecords/dynamic_macros.h @@ -0,0 +1,50 @@ +// Copyright 2016 Jack Humbert +// Copyright 2019 Wojciech Siewierski < wojciech dot siewierski at onet dot pl > +// Copyright 2023 Christopher Courtney, aka Drashna Jael're (@drashna) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "action.h" +#include "action_layer.h" + +#ifndef DYNAMIC_MACRO_COUNT +# define DYNAMIC_MACRO_COUNT 8 +#endif + +#ifndef DYNAMIC_MACRO_SIZE +# define DYNAMIC_MACRO_SIZE 64 +#endif + +enum dynamic_macro_recording_state { + STATE_NOT_RECORDING, + STATE_RECORD_KEY_PRESSED, + STATE_CURRENTLY_RECORDING, +}; + +typedef struct { + keyrecord_t events[DYNAMIC_MACRO_SIZE]; + uint8_t length; + uint16_t checksum; +} dynamic_macro_t; + +void dynamic_macro_init(void); +bool dynamic_macro_record_start(uint8_t macro_id); +void dynamic_macro_play(uint8_t macro_id); +void dynamic_macro_record_key(uint8_t macro_id, keyrecord_t* record); +void dynamic_macro_record_end(uint8_t macro_id); +bool process_record_dynamic_macro(uint16_t keycode, keyrecord_t* record); + +void dynamic_macro_record_start_user(void); +void dynamic_macro_play_user(uint8_t macro_id); +void dynamic_macro_record_key_user(uint8_t macro_id, keyrecord_t* record); +void dynamic_macro_record_end_user(uint8_t macro_id); + +#define DYNAMIC_MACRO_CRC_LENGTH (sizeof(dynamic_macro_t) - sizeof(uint16_t)) +#define IS_DYN_KEYCODE(keycode) (keycode >= DYN_MACRO_KEY00 && keycode <= DYN_MACRO_KEY15) + +uint16_t dynamic_macro_calc_crc(dynamic_macro_t* macro); +void dynamic_macro_load_eeprom_all(void); +void dynamic_macro_load_eeprom(uint8_t macro_id); +void dynamic_macro_save_eeprom(uint8_t macro_id); +bool dynamic_macro_header_correct(void); diff --git a/users/drashna/keyrecords/process_records.c b/users/drashna/keyrecords/process_records.c index 99d95c3dff8f..d8d45dcac96a 100644 --- a/users/drashna/keyrecords/process_records.c +++ b/users/drashna/keyrecords/process_records.c @@ -6,9 +6,11 @@ #ifdef OS_DETECTION_ENABLE # include "os_detection.h" #endif +#ifdef CUSTOM_DYNAMIC_MACROS_ENABLE +# include "keyrecords/dynamic_macros.h" +#endif uint16_t copy_paste_timer; -bool host_driver_disabled = false; // Defines actions tor my global custom keycodes. Defined in drashna.h file // Then runs the _keymap's record handier if not processed here @@ -55,30 +57,15 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #endif #if defined(CUSTOM_POINTING_DEVICE) && process_record_pointing(keycode, record) +#endif +#ifdef CUSTOM_DYNAMIC_MACROS_ENABLE + && process_record_dynamic_macro(keycode, record) #endif && true)) { return false; } switch (keycode) { - case FIRST_DEFAULT_LAYER_KEYCODE ... LAST_DEFAULT_LAYER_KEYCODE: - if (record->event.pressed) { - uint8_t mods = mod_config(get_mods() | get_oneshot_mods()); - if (!mods) { - set_single_persistent_default_layer(keycode - FIRST_DEFAULT_LAYER_KEYCODE); -#if LAST_DEFAULT_LAYER_KEYCODE > (FIRST_DEFAULT_LAYER_KEYCODE + 3) - } else if (mods & MOD_MASK_SHIFT) { - set_single_persistent_default_layer(keycode - FIRST_DEFAULT_LAYER_KEYCODE + 4); -# if LAST_DEFAULT_LAYER_KEYCODE > (FIRST_DEFAULT_LAYER_KEYCODE + 7) - - } else if (mods & MOD_MASK_CTRL) { - set_single_persistent_default_layer(keycode - FIRST_DEFAULT_LAYER_KEYCODE + 8); -# endif -#endif - } - } - break; - case VRSN: // Prints firmware version if (record->event.pressed) { send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), TAP_CODE_DELAY); @@ -111,7 +98,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { userspace_config.rgb_layer_change ^= 1; dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); - eeconfig_update_user(userspace_config.raw); + eeconfig_update_user_config(&userspace_config.raw); if (userspace_config.rgb_layer_change) { # if defined(CUSTOM_RGB_MATRIX) rgb_matrix_set_flags(LED_FLAG_UNDERGLOW | LED_FLAG_KEYLIGHT | LED_FLAG_INDICATOR); @@ -168,38 +155,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } # endif if (is_eeprom_updated) { - eeconfig_update_user(userspace_config.raw); + eeconfig_update_user_config(&userspace_config.raw); } } break; #endif - case KEYLOCK: { - static host_driver_t *host_driver = 0; - + case KEYLOCK: if (record->event.pressed) { - if (host_get_driver()) { - host_driver = host_get_driver(); - clear_keyboard(); - host_set_driver(0); - host_driver_disabled = true; - } else { - host_set_driver(host_driver); - host_driver_disabled = false; - } + toggle_keyboard_lock(); } break; - } - case OLED_LOCK: { -#if defined(OLED_ENABLE) && defined(CUSTOM_OLED_DRIVER) - extern bool is_oled_locked; - if (record->event.pressed) { - is_oled_locked = !is_oled_locked; - if (is_oled_locked) { - oled_on(); - } - } -#endif - } break; #if defined(OS_DETECTION_ENABLE) && defined(OS_DETECTION_DEBUG_ENABLE) case STORE_SETUPS: if (record->event.pressed) { @@ -218,5 +183,18 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { __attribute__((weak)) void post_process_record_keymap(uint16_t keycode, keyrecord_t *record) {} void post_process_record_user(uint16_t keycode, keyrecord_t *record) { +#if defined(OS_DETECTION_ENABLE) && defined(UNICODE_COMMON_ENABLE) + switch (keycode) { + case QK_MAGIC_SWAP_LCTL_LGUI: + case QK_MAGIC_SWAP_RCTL_RGUI: + case QK_MAGIC_SWAP_CTL_GUI: + case QK_MAGIC_UNSWAP_LCTL_LGUI: + case QK_MAGIC_UNSWAP_RCTL_RGUI: + case QK_MAGIC_UNSWAP_CTL_GUI: + case QK_MAGIC_TOGGLE_CTL_GUI: + set_unicode_input_mode_soft(keymap_config.swap_lctl_lgui ? UNICODE_MODE_MACOS : UNICODE_MODE_WINCOMPOSE); + break; + } +#endif post_process_record_keymap(keycode, record); } diff --git a/users/drashna/keyrecords/process_records.h b/users/drashna/keyrecords/process_records.h index 8073b7adb07e..013797658021 100644 --- a/users/drashna/keyrecords/process_records.h +++ b/users/drashna/keyrecords/process_records.h @@ -5,27 +5,21 @@ #include "drashna.h" enum userspace_custom_keycodes { - VRSN = QK_USER, // Prints QMK Firmware and board info - KC_QWERTY, // Sets default layer to QWERTY - FIRST_DEFAULT_LAYER_KEYCODE = KC_QWERTY, // Sets default layer to QWERTY - KC_COLEMAK_DH, // Sets default layer to COLEMAK - KC_COLEMAK, // Sets default layer to COLEMAK - KC_DVORAK, // Sets default layer to DVORAK - LAST_DEFAULT_LAYER_KEYCODE = KC_DVORAK, // Sets default layer to WORKMAN - KC_DIABLO_CLEAR, // Clears all Diablo Timers - KC_RGB_T, // Toggles RGB Layer Indication mode - RGB_IDL, // RGB Idling animations - KC_SECRET_1, // test1 - KC_SECRET_2, // test2 - KC_SECRET_3, // test3 - KC_SECRET_4, // test4 - KC_SECRET_5, // test5 - KC_CCCV, // Hold to copy, tap to paste - KC_NUKE, // NUCLEAR LAUNCH DETECTED!!! - UC_FLIP, // (ಠ痊ಠ)┻━┻ - UC_TABL, // ┬─┬ノ( º _ ºノ) - UC_SHRG, // ¯\_(ツ)_/¯ - UC_DISA, // ಠ_ಠ + VRSN = QK_USER, // Prints QMK Firmware and board info + KC_DIABLO_CLEAR, // Clears all Diablo Timers + KC_RGB_T, // Toggles RGB Layer Indication mode + RGB_IDL, // RGB Idling animations + KC_SECRET_1, // test1 + KC_SECRET_2, // test2 + KC_SECRET_3, // test3 + KC_SECRET_4, // test4 + KC_SECRET_5, // test5 + KC_CCCV, // Hold to copy, tap to paste + KC_NUKE, // NUCLEAR LAUNCH DETECTED!!! + UC_FLIP, // (ಠ痊ಠ)┻━┻ + UC_TABL, // ┬─┬ノ( º _ ºノ) + UC_SHRG, // ¯\_(ツ)_/¯ + UC_DISA, // ಠ_ಠ UC_IRNY, UC_CLUE, KEYLOCK, // Locks keyboard by unmounting driver @@ -40,11 +34,33 @@ enum userspace_custom_keycodes { KC_COMIC, KC_ACCEL, OLED_LOCK, + OLED_BRIGHTNESS_INC, + OLED_BRIGHTNESS_DEC, STORE_SETUPS, PRINT_SETUPS, - USER_SAFE_RANGE, // use "NEWPLACEHOLDER for keymap specific codes + PD_JIGGLER, + + DYN_MACRO_PROG, + DYN_MACRO_KEY00, + DYN_MACRO_KEY01, + DYN_MACRO_KEY02, + DYN_MACRO_KEY03, + DYN_MACRO_KEY04, + DYN_MACRO_KEY05, + DYN_MACRO_KEY06, + DYN_MACRO_KEY07, + DYN_MACRO_KEY08, + DYN_MACRO_KEY09, + DYN_MACRO_KEY10, + DYN_MACRO_KEY11, + DYN_MACRO_KEY12, + DYN_MACRO_KEY13, + DYN_MACRO_KEY14, + DYN_MACRO_KEY15, + + USER_SAFE_RANGE, }; bool process_record_secrets(uint16_t keycode, keyrecord_t *record); @@ -69,27 +85,15 @@ bool process_record_unicode(uint16_t keycode, keyrecord_t *record); #define KC_SEC4 KC_SECRET_4 #define KC_SEC5 KC_SECRET_5 +#define KC_QWERTY DF(_QWERTY) +#define KC_COLEMAK_DH DF(_COLEMAK_DH) +#define KC_COLEMAK DF(_COLEMAK) +#define KC_DVORAK DF(_DVORAK) + #define QWERTY KC_QWERTY #define DVORAK KC_DVORAK #define COLEMAK KC_COLEMAK -#define COLEMAKDH KC_COLEMAK_DH - -#define DEFLYR1 FIRST_DEFAULT_LAYER_KEYCODE -#define DEFLYR2 (FIRST_DEFAULT_LAYER_KEYCODE + 1) -#define DEFLYR3 (FIRST_DEFAULT_LAYER_KEYCODE + 2) -#define DEFLYR4 (FIRST_DEFAULT_LAYER_KEYCODE + 3) -#if LAST_DEFAULT_LAYER_KEYCODE > (FIRST_DEFAULT_LAYER_KEYCODE + 3) -# define DEFLYR5 (FIRST_DEFAULT_LAYER_KEYCODE + 4) -# define DEFLYR6 (FIRST_DEFAULT_LAYER_KEYCODE + 5) -# define DEFLYR7 (FIRST_DEFAULT_LAYER_KEYCODE + 6) -# define DEFLYR8 (FIRST_DEFAULT_LAYER_KEYCODE + 7) -# if LAST_DEFAULT_LAYER_KEYCODE > (FIRST_DEFAULT_LAYER_KEYCODE + 7) -# define DEFLYR9 (FIRST_DEFAULT_LAYER_KEYCODE + 8) -# define DEFLYR10 (FIRST_DEFAULT_LAYER_KEYCODE + 9) -# define DEFLYR11 (FIRST_DEFAULT_LAYER_KEYCODE + 10) -# define DEFLYR12 (FIRST_DEFAULT_LAYER_KEYCODE + 11) -# endif -#endif +#define CLMKDH KC_COLEMAK_DH #ifdef SWAP_HANDS_ENABLE # define KC_C1R3 SH_T(KC_TAB) @@ -140,3 +144,7 @@ We use custom codes here, so we can substitute the right stuff # define KC_D3_3 KC_3 # define KC_D3_4 KC_4 #endif // TAP_DANCE_ENABLE + +#define OL_LOCK OLED_LOCK +#define OL_BINC OLED_BRIGHTNESS_INC +#define OL_BDEC OLED_BRIGHTNESS_DEC diff --git a/users/drashna/keyrecords/tapping.c b/users/drashna/keyrecords/tapping.c index 6a26a02aca33..d4a0e1611262 100644 --- a/users/drashna/keyrecords/tapping.c +++ b/users/drashna/keyrecords/tapping.c @@ -5,9 +5,14 @@ #ifdef TAPPING_TERM_PER_KEY __attribute__((weak)) uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { case BK_LWER: return TAPPING_TERM + 25; + case QK_MOD_TAP ... QK_MOD_TAP_MAX: + if (QK_MOD_TAP_GET_MODS(keycode) & MOD_LGUI) { + return 300; + } default: return TAPPING_TERM; } diff --git a/users/drashna/keyrecords/unicode.c b/users/drashna/keyrecords/unicode.c index 16390074cae5..a4687d3e5908 100644 --- a/users/drashna/keyrecords/unicode.c +++ b/users/drashna/keyrecords/unicode.c @@ -434,3 +434,13 @@ bool process_record_unicode(uint16_t keycode, keyrecord_t *record) { void keyboard_post_init_unicode(void) { unicode_input_mode_init(); } + +/** + * @brief Set the unicode input mode without extra functionality + * + * @param input_mode + */ +void set_unicode_input_mode_soft(uint8_t input_mode) { + unicode_config.input_mode = input_mode; + unicode_input_mode_set_kb(input_mode); +} diff --git a/users/drashna/keyrecords/unicode.h b/users/drashna/keyrecords/unicode.h index 43c2db89c011..fe95e78c3a52 100644 --- a/users/drashna/keyrecords/unicode.h +++ b/users/drashna/keyrecords/unicode.h @@ -18,3 +18,4 @@ enum unicode_typing_modes { extern uint8_t unicode_typing_mode; extern const PROGMEM char unicode_mode_str[UNCODES_MODE_END][13]; +void set_unicode_input_mode_soft(uint8_t input_mode); diff --git a/users/drashna/keyrecords/wrappers.h b/users/drashna/keyrecords/wrappers.h index 31efad5f6ed3..b298ef062868 100644 --- a/users/drashna/keyrecords/wrappers.h +++ b/users/drashna/keyrecords/wrappers.h @@ -260,7 +260,7 @@ NOTE: These are all the same length. If you do a search/replace #define _________________ADJUST_L3_________________ RGB_RMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T #define _________________ADJUST_R1_________________ KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5 -#define _________________ADJUST_R2_________________ CG_SWAP, DEFLYR1, DEFLYR2, DEFLYR3, DEFLYR4 +#define _________________ADJUST_R2_________________ CG_SWAP, QWERTY, CLMKDH, COLEMAK, DVORAK #define _________________ADJUST_R3_________________ MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT // clang-format on diff --git a/users/drashna/oled/drashna_font.h b/users/drashna/oled/drashna_font.h index 7ba03c4c13c3..cef1fc496931 100644 --- a/users/drashna/oled/drashna_font.h +++ b/users/drashna/oled/drashna_font.h @@ -3,14 +3,7 @@ // additional fonts from // https://github.com/datacute/TinyOLED-Fonts -#if __has_include("oled_font.h") -# include "oled_font.h" -#else - -// additional fonts from -// https://github.com/datacute/TinyOLED-Fonts - -# include "progmem.h" +#include "progmem.h" // clang-format off static const unsigned char font[] PROGMEM = { @@ -895,7 +888,7 @@ static const unsigned char font[] PROGMEM = { 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, - 0x18, 0x24, 0x24, 0x1C, 0x78, 0x00, + 0x18, 0xA4, 0xA4, 0x9C, 0x78, 0x00, 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, @@ -904,8 +897,8 @@ static const unsigned char font[] PROGMEM = { 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, - 0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, - 0x18, 0x24, 0x24, 0x18, 0x7C, 0x00, + 0xFC, 0x18, 0x24, 0x24, 0x18, 0x00, + 0x18, 0x24, 0x24, 0x18, 0xFC, 0x00, 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, @@ -923,139 +916,27 @@ static const unsigned char font[] PROGMEM = { # endif // top Logo section -# if defined(OLED_LOGO_GMK_BAD) - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0xC0, 0xE0, 0xF0, 0xF0, 0x70, - 0x38, 0x38, 0x38, 0x78, 0x70, 0xF0, - 0xE0, 0xE0, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0xF0, 0xF8, - 0xF8, 0xF8, 0xF8, 0x00, 0x00, 0x00, - 0x80, 0xE0, 0xF8, 0xF8, 0xF8, 0xF8, - 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0xF8, 0xF8, 0xF8, 0x38, 0x00, - 0x80, 0xE0, 0xF0, 0xF8, 0x78, 0x38, - 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0xF8, 0xF8, 0xF8, 0x38, 0x38, - 0x38, 0xF8, 0xF0, 0xF0, 0xE0, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0xFC, 0xFC, - 0xFC, 0x1C, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -# elif defined(OLED_LOGO_HUE_MANITEE) - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, - 0x90, 0x70, 0xE8, 0xA8, 0xE4, 0xC4, - 0xC4, 0xA0, 0xE4, 0xB0, 0xDC, 0xE4, - 0xFC, 0xFC, 0xFC, 0xFC, 0x3C, 0x3C, - 0xFC, 0xF8, 0xF0, 0xF0, 0xE0, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xF8, 0xF8, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xF8, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -# elif defined(OLED_LOGO_CORNE) 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, - 0xF0, 0xF8, 0xF8, 0x18, 0x00, 0xC0, - 0xF0, 0xFC, 0xFE, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0xC0, 0xE0, 0xE0, - 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, - 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x80, 0xC0, 0xE0, 0xE0, 0xE0, 0xE0, - 0xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0x80, - 0x00, 0x00, 0x00, 0xE0, 0xE0, 0xC0, - 0xC0, 0xE0, 0xE0, 0xE0, 0xE0, 0x00, - 0x00, 0xE0, 0xE0, 0xC0, 0xC0, 0xE0, - 0xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0x80, - 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, - 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, - 0xE0, 0xE0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -# elif defined(OLED_LOGO_LOOSE) 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, - 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0x00, - 0xFC, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, - 0x02, 0xF9, 0x01, 0x01, 0x05, 0x09, - 0x11, 0x22, 0x06, 0xFE, 0xFE, 0xFE, - 0xFE, 0xFE, 0xFE, 0xFE, 0x46, 0x46, - 0x44, 0x44, 0x45, 0x44, 0x29, 0x28, - 0x2A, 0x28, 0x11, 0x13, 0x05, 0x07, - 0x05, 0x07, 0x05, 0x07, 0x05, 0x07, - 0xE5, 0xE7, 0xE5, 0x07, 0x05, 0x07, - 0x05, 0x07, 0x05, 0x07, 0x05, 0x07, - 0x85, 0xC7, 0xE5, 0xE7, 0xE5, 0xE7, - 0xE5, 0xE7, 0xE5, 0xC7, 0x85, 0x07, - 0x85, 0xC7, 0xE5, 0xE7, 0xE5, 0xE7, - 0xE5, 0xE7, 0xE5, 0xC7, 0x85, 0x07, - 0x85, 0xC7, 0xE5, 0xE7, 0xE5, 0xE7, - 0xE5, 0xE7, 0xE5, 0xE7, 0xE5, 0x07, - 0xE5, 0xE7, 0xE5, 0xE7, 0xE5, 0xE7, - 0xE5, 0xE7, 0xE5, 0xE7, 0xE5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -# elif defined(OLED_LOGO_SKEEB) - 0xC0, 0x20, 0x10, 0x08, 0x04, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x03, 0x07, 0x0F, 0x1F, - 0x3F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x01, - 0xFF, 0xFF, 0x01, 0x01, 0xFF, 0xFF, - 0x01, 0x01, 0xFF, 0xFF, 0x19, 0x19, - 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, - 0x01, 0x01, 0xFF, 0xFF, 0x81, 0x81, - 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, - 0x19, 0x19, 0xFF, 0xFF, 0xF9, 0xF9, - 0xF9, 0xF9, 0x01, 0x01, 0xF9, 0xF9, - 0xF9, 0xF9, 0xFF, 0xFF, 0x99, 0x99, - 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, - 0xF9, 0xF9, 0xFF, 0xFF, 0x19, 0x19, - 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, - 0x67, 0x67, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x3F, - 0x1F, 0x0F, 0x07, 0x03, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x02, 0x04, 0x08, 0x10, 0x20, 0xC0, -# else 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x40, 0x40, 0x40, 0xF0, 0xF8, 0xF8, - 0xFF, 0x38, 0xFF, 0xF8, 0xF8, 0x3F, - 0xF8, 0xF8, 0xFF, 0x38, 0xFF, 0xF8, - 0xF8, 0xF0, 0x40, 0x40, 0x40, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xC0, 0xC0, 0xC0, 0x80, 0x00, 0x00, - 0xC0, 0xC0, 0x80, 0x00, 0x00, 0x00, - 0x80, 0xC0, 0xC0, 0x00, 0xC0, 0xC0, - 0x00, 0x00, 0x80, 0xC0, 0xC0, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, - 0xC0, 0xC0, 0xC0, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -#endif // First icon section 0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, @@ -1071,272 +952,49 @@ static const unsigned char font[] PROGMEM = { 0x14, 0x36, 0x00, 0x36, 0x77, 0x77, // middle logo section -# if defined(OLED_LOGO_GMK_BAD) - 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, - 0xFF, 0xFF, 0xFF, 0xC1, 0x80, 0x00, - 0x00, 0x38, 0x38, 0xB8, 0xB8, 0xF9, - 0xF9, 0xF8, 0x38, 0x00, 0x00, 0x00, - 0x00, 0xC0, 0xF8, 0xFF, 0xFF, 0x1F, - 0x01, 0x3F, 0xFF, 0xFF, 0xF0, 0xFE, - 0x7F, 0x0F, 0x03, 0xFF, 0xFF, 0xFF, - 0xFF, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xFF, 0xFF, 0xFF, 0x3F, 0x1E, 0x7F, - 0xFF, 0xFF, 0xF3, 0xC1, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xFF, 0xFF, 0xFF, 0x3F, 0x1C, 0x1C, - 0x9C, 0xFF, 0xFF, 0xF3, 0xE1, 0x00, - 0x00, 0x00, 0x00, 0xF0, 0xFC, 0xFE, - 0xFF, 0x0F, 0x07, 0x07, 0x8E, 0xFF, - 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, - 0x00, 0xF0, 0xFC, 0xFE, 0xFF, 0x8F, - 0x07, 0x07, 0x8E, 0xFF, 0xFF, 0xFF, - 0x3F, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, -# elif defined(OLED_LOGO_HUE_MANITEE) - 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, - 0xFC, 0xF6, 0xF7, 0xEF, 0xFF, 0x87, - 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, - 0x1F, 0x1F, 0x1F, 0xFF, 0xFF, 0xFF, - 0xFF, 0x07, 0x1F, 0x1F, 0x19, 0x15, - 0xF7, 0x16, 0x1A, 0x1B, 0x16, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x0C, 0x0C, 0x33, 0x33, - 0x33, 0x33, 0x33, 0x33, 0xC0, 0xC0, - 0x00, 0x00, 0x03, 0x03, 0xFF, 0xFF, - 0x03, 0x03, 0x00, 0x00, 0xC0, 0xC0, - 0x00, 0x00, 0x00, 0xFC, 0xFC, 0x03, - 0x03, 0x03, 0x03, 0x03, 0x03, 0xFC, - 0xFC, 0x00, 0x00, 0x00, 0xFC, 0xFC, - 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, - 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, - 0xFF, 0xFF, 0x30, 0x30, 0xCC, 0xCC, - 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -# elif defined(OLED_LOGO_CORNE) - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xF8, 0xFC, 0xFE, - 0xFF, 0xE0, 0x00, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0x1F, 0x07, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xFF, 0xFF, 0xFF, 0x81, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, - 0xC3, 0xC3, 0xC3, 0x00, 0x00, 0xFF, - 0xFF, 0xFF, 0x81, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x81, 0xFF, 0xFF, - 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xFF, 0xFF, 0xFF, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, - 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, - 0x9D, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, - 0x1C, 0x9D, 0xDF, 0xDF, 0xDF, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -# elif defined(OLED_LOGO_LOOSE) - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xE3, 0xC1, 0xC1, 0x00, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0x00, 0xFF, 0x00, 0x00, 0x80, 0x00, - 0x1C, 0x3E, 0x7F, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0x22, 0x22, - 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, - 0x22, 0x22, 0x22, 0x14, 0x14, 0x14, - 0x14, 0x14, 0x08, 0x08, 0x00, 0x00, - 0xFF, 0xFF, 0xFF, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, - 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0xBE, - 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, - 0xFF, 0xFF, 0xFF, 0xFF, 0x81, 0xBD, - 0x81, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, - 0x8F, 0x9F, 0x9C, 0x9C, 0x9C, 0x9C, - 0x9C, 0x9C, 0x9C, 0xFC, 0xF8, 0x00, - 0xFF, 0xFF, 0xFF, 0x9C, 0x9C, 0x9C, - 0x9C, 0x9C, 0x9C, 0x80, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -# elif defined(OLED_LOGO_SKEEB) - 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, - 0x0F, 0x0F, 0x0F, 0x0F, 0x08, 0x08, - 0x0F, 0x0F, 0x0E, 0x0E, 0x0F, 0x0F, - 0x08, 0x08, 0x0F, 0x0F, 0x08, 0x08, - 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, - 0x08, 0x08, 0x0F, 0x0F, 0x09, 0x09, - 0x09, 0x09, 0xF9, 0xF9, 0x09, 0x09, - 0x08, 0x08, 0x0F, 0x0F, 0x0F, 0x0F, - 0x0F, 0x0F, 0x08, 0x08, 0x0F, 0x0F, - 0x0F, 0x0F, 0x0F, 0x0F, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x09, 0x09, 0x0F, 0x0F, 0x08, 0x08, - 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, - 0x08, 0x08, 0x0F, 0x0F, 0x0F, 0x0F, - 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, -# else - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x49, 0x49, 0x49, 0xFF, 0xFF, 0xFF, - 0xFF, 0xE0, 0xDF, 0xBF, 0xBF, 0x00, - 0xBF, 0xBF, 0xDF, 0xE0, 0xFF, 0xFF, - 0xFF, 0xFF, 0x49, 0x49, 0x49, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x1F, 0x3F, - 0x60, 0x60, 0xE0, 0xBF, 0x1F, 0x00, - 0x7F, 0x7F, 0x07, 0x1E, 0x38, 0x1E, - 0x07, 0x7F, 0x7F, 0x00, 0x7F, 0x7F, - 0x0E, 0x1F, 0x3B, 0x71, 0x60, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7F, 0x7F, - 0x0C, 0x0C, 0x0C, 0x00, 0x7E, 0x7E, - 0x00, 0x7F, 0x7E, 0x03, 0x03, 0x00, - 0x7F, 0x7E, 0x03, 0x03, 0x7E, 0x7E, - 0x03, 0x03, 0x7F, 0x7E, 0x00, 0x0F, - 0x3E, 0x70, 0x3C, 0x06, 0x3C, 0x70, - 0x3E, 0x0F, 0x00, 0x32, 0x7B, 0x49, - 0x49, 0x3F, 0x7E, 0x00, 0x7F, 0x7E, - 0x03, 0x03, 0x00, 0x1E, 0x3F, 0x69, - 0x69, 0x6F, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -# endif - -// second icon section - 0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, - 0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, - 0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, - 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, - 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, - 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, - 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, - 0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, - 0x00, 0x44, 0x28, 0xFF, 0x5A, 0x24, - 0xF0, 0xFE, 0xF1, 0x91, 0xF6, 0xF0, - 0xF0, 0xFC, 0xF2, 0x92, 0xFC, 0xF0, - -// bottom logo section -# if defined(OLED_LOGO_GMK_BAD) - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x01, 0x03, 0x03, 0x03, 0x07, - 0x07, 0x07, 0x07, 0x03, 0x03, 0x03, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x06, 0x07, 0x07, 0x07, 0x01, 0x00, - 0x00, 0x00, 0x07, 0x07, 0x07, 0x01, - 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, - 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, - 0x07, 0x07, 0x07, 0x00, 0x00, 0x00, - 0x00, 0x03, 0x07, 0x07, 0x07, 0x06, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, - 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, - 0x07, 0x07, 0x03, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, - 0x07, 0x07, 0x07, 0x03, 0x07, 0x07, - 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x03, 0x07, 0x07, 0x07, - 0x07, 0x03, 0x07, 0x07, 0x07, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, - 0x07, 0x07, 0x01, 0x00, 0x00, 0x00, -# elif defined(OLED_LOGO_HUE_MANITEE) - 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x03, 0x07, 0x07, 0x07, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x07, 0x07, - 0x03, 0x00, 0x00, 0x02, 0x04, 0x00, - 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, - 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, - 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -# elif defined(OLED_LOGO_CORNE) 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x0F, 0x1F, - 0x3F, 0x3F, 0x3F, 0x3F, 0x1F, 0x1F, - 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x3F, - 0x3F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, - 0x7F, 0x7C, 0x78, 0x78, 0x38, 0x1C, - 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x03, 0x07, 0x07, - 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, - 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x03, 0x07, 0x07, 0x07, 0x07, - 0x07, 0x07, 0x07, 0x07, 0x03, 0x01, - 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x07, 0x07, 0x07, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, - 0x07, 0x00, 0x00, 0x00, 0x01, 0x03, - 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, - 0x07, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -# elif defined(OLED_LOGO_LOOSE) 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x03, 0x07, 0x0F, - 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x00, - 0x1F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, - 0x20, 0x47, 0x48, 0x50, 0x40, 0x41, - 0x42, 0x24, 0x30, 0x3F, 0x3F, 0x3F, - 0x3F, 0x3F, 0x3F, 0x3F, 0x31, 0x31, - 0x11, 0x51, 0x11, 0x11, 0x4A, 0x0A, - 0x2A, 0x0A, 0x44, 0x64, 0x50, 0x70, - 0x50, 0x70, 0x50, 0x70, 0x50, 0x70, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x70, - 0x50, 0x71, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x53, 0x71, 0x50, 0x70, - 0x50, 0x71, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x53, 0x71, 0x50, 0x70, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x53, 0x73, 0x51, 0x70, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -# elif defined(OLED_LOGO_SKEEB) - 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xFF, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0xFF, - 0x08, 0x08, 0x0F, 0x0F, 0x08, 0x08, - 0x03, 0x04, 0x08, 0x10, 0x20, 0x40, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x40, 0x20, 0x10, 0x08, 0x04, 0x03, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0xF8, - 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, - 0xF8, 0xF8, 0xF0, 0xE0, 0xC0, 0x80, - 0x01, 0x02, 0xFC, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + +// second icon section + 0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, + 0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, + 0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, + 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, + 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, + 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, + 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, + 0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, + 0x00, 0x44, 0x28, 0xFF, 0x5A, 0x24, + 0xF0, 0xFE, 0xF1, 0x91, 0xF6, 0xF0, + 0xF0, 0xFC, 0xF2, 0x92, 0xFC, 0xF0, + +// bottom logo section + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, -#else 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x01, 0x01, 0x07, 0x0F, 0x0F, - 0x7F, 0x0F, 0x7F, 0x0F, 0x0F, 0x7E, - 0x0F, 0x0F, 0x7F, 0x0F, 0x7F, 0x0F, - 0x0F, 0x07, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1351,7 +1009,6 @@ static const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -#endif // third icon section 0x1F, 0x05, 0x00, 0x02, 0x1F, 0x00, @@ -1391,14 +1048,13 @@ static const unsigned char font[] PROGMEM = { 0x6A, 0x60, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x42, 0x69, 0x65, 0x65, 0x65, 0x69, 0x42, 0x04, 0x00, 0x00, + 0x06, 0x0F, 0x09, 0x0F, 0x06, 0x00, 0x00, 0x00, 0x1C, 0x14, 0x1C, 0x08, 0x18, 0x08, 0x18, 0x00, 0x00, 0x00, 0x00, 0x70, 0xC8, 0xEE, 0xF9, 0x70, 0x1F, 0x05, 0x00, 0x10, 0x77, 0x40, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x06, 0x09, 0x59, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; // clang-format on -#endif diff --git a/users/drashna/oled/oled_assets.h b/users/drashna/oled/oled_assets.h new file mode 100644 index 000000000000..36dfc7762c7f --- /dev/null +++ b/users/drashna/oled/oled_assets.h @@ -0,0 +1,207 @@ +// Copyright 2023 Christopher Courtney, aka Drashna Jael're (@drashna) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +// clang-format off + +static const char PROGMEM code_to_name[256] = { +// 0 1 2 3 4 5 6 7 8 9 A B c D E F + ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', // 0x + 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', // 1x + '3', '4', '5', '6', '7', '8', '9', '0', 20, 19, 27, 26, 22, '-', '=', '[', // 2x + ']','\\', '#', ';','\'', '`', ',', '.', '/', 128,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA, // 3x + 0xDB,0xDC,0xDD,0xDE,0XDF,0xFB, 'P', 'S', 19, ' ', 17, 30, 16, 16, 31, 26, // 4x + 27, 25, 24, 'N', '/', '*', '-', '+', 23, '1', '2', '3', '4', '5', '6', '7', // 5x + '8', '9', '0', '.','\\', 'A', 0, '=', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 6x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 7x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 8x + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 9x + ' ', ' ', ' ', ' ', ' ', 0, ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ax + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Bx + ' ',0x9E,0x9E, ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',0x9D,0x9D,0x9D,0x9D, // Cx + 0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D, // Dx + 'C', 'S', 'A', 'G', 'C', 'S', 'A', 'G', ' ', ' ', ' ', ' ', ' ', 24, 26, 24, // Ex + 25, ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 24, 25, 27, 26, ' ', ' ', ' ' // Fx +}; + +static const char PROGMEM gmk_bad_logo[384] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0xF0, 0xF0, 0x70, 0x38, 0x38, 0x38, 0x78, 0x70, 0xF0, 0xE0, 0xE0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xF0, 0xF8, 0xF8, 0xF8, 0xF8, 0x00, 0x00, 0x00, 0x80, 0xE0, 0xF8, 0xF8, 0xF8, 0xF8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xF8, 0xF8, 0xF8, 0x38, 0x00, 0x80, 0xE0, 0xF0, 0xF8, 0x78, 0x38, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xF8, 0xF8, 0xF8, 0x38, 0x38, 0x38, 0xF8, 0xF0, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFC, 0xFC, 0xFC, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xFF, 0xFF, 0xFF, 0xC1, 0x80, 0x00, 0x00, 0x38, 0x38, 0xB8, 0xB8, 0xF9, 0xF9, 0xF8, 0x38, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xF8, 0xFF, 0xFF, 0x1F, 0x01, 0x3F, 0xFF, 0xFF, 0xF0, 0xFE, 0x7F, 0x0F, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x3F, 0x1E, 0x7F, 0xFF, 0xFF, 0xF3, 0xC1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x3F, 0x1C, 0x1C, 0x9C, 0xFF, 0xFF, 0xF3, 0xE1, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFC, 0xFE, 0xFF, 0x0F, 0x07, 0x07, 0x8E, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFC, 0xFE, 0xFF, 0x8F, 0x07, 0x07, 0x8E, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x07, 0x07, 0x07, 0x07, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x07, 0x07, 0x07, 0x01, 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, 0x01, 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x07, 0x07, 0x06, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x07, 0x07, 0x07, 0x03, 0x07, 0x07, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x07, 0x07, 0x07, 0x03, 0x07, 0x07, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x07, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +static const char PROGMEM hue_manitee_logo[384] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0x90, 0x70, 0xE8, 0xA8, 0xE4, 0xC4, 0xC4, 0xA0, 0xE4, 0xB0, 0xDC, 0xE4, 0xFC, 0xFC, 0xFC, 0xFC, 0x3C, 0x3C, 0xFC, 0xF8, 0xF0, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFC, 0xF6, 0xF7, 0xEF, 0xFF, 0x87, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x1F, 0x1F, 0x19, 0x15, 0xF7, 0x16, 0x1A, 0x1B, 0x16, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x0C, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0xC0, 0xC0, 0x00, 0x00, 0x03, 0x03, 0xFF, 0xFF, 0x03, 0x03, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0xFC, 0xFC, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0xFC, 0xFC, 0x00, 0x00, 0x00, 0xFC, 0xFC, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x30, 0x30, 0xCC, 0xCC, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x07, 0x07, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x07, 0x03, 0x00, 0x00, 0x02, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +static const char PROGMEM corne_logo[384] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xF8, 0x18, 0x00, 0xC0, 0xF0, 0xFC, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0xE0, 0xE0, 0xC0, 0xC0, 0xE0, 0xE0, 0xE0, 0xE0, 0x00, 0x00, 0xE0, 0xE0, 0xC0, 0xC0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFC, 0xFE, 0xFF, 0xE0, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0xC3, 0xC3, 0xC3, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x9D, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x9D, 0xDF, 0xDF, 0xDF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0F, 0x1F, 0x3F, 0x3F, 0x3F, 0x3F, 0x1F, 0x1F, 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x3F, 0x3F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7C, 0x78, 0x78, 0x38, 0x1C, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +static const char PROGMEM loose_logo[384] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0x00, 0xFC, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x02, 0xF9, 0x01, 0x01, 0x05, 0x09, 0x11, 0x22, 0x06, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x46, 0x46, 0x44, 0x44, 0x45, 0x44, 0x29, 0x28, 0x2A, 0x28, 0x11, 0x13, 0x05, 0x07, 0x05, 0x07, 0x05, 0x07, 0x05, 0x07, 0xE5, 0xE7, 0xE5, 0x07, 0x05, 0x07, 0x05, 0x07, 0x05, 0x07, 0x05, 0x07, 0x85, 0xC7, 0xE5, 0xE7, 0xE5, 0xE7, 0xE5, 0xE7, 0xE5, 0xC7, 0x85, 0x07, 0x85, 0xC7, 0xE5, 0xE7, 0xE5, 0xE7, 0xE5, 0xE7, 0xE5, 0xC7, 0x85, 0x07, 0x85, 0xC7, 0xE5, 0xE7, 0xE5, 0xE7, 0xE5, 0xE7, 0xE5, 0xE7, 0xE5, 0x07, 0xE5, 0xE7, 0xE5, 0xE7, 0xE5, 0xE7, 0xE5, 0xE7, 0xE5, 0xE7, 0xE5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0xC1, 0xC1, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x80, 0x00, 0x1C, 0x3E, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x14, 0x14, 0x14, 0x14, 0x14, 0x08, 0x08, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0xBE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x81, 0xBD, 0x81, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x8F, 0x9F, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0xFC, 0xF8, 0x00, 0xFF, 0xFF, 0xFF, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x9C, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x00, 0x1F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x20, 0x47, 0x48, 0x50, 0x40, 0x41, 0x42, 0x24, 0x30, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x31, 0x31, 0x11, 0x51, 0x11, 0x11, 0x4A, 0x0A, 0x2A, 0x0A, 0x44, 0x64, 0x50, 0x70, 0x50, 0x70, 0x50, 0x70, 0x50, 0x70, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x70, 0x50, 0x71, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x71, 0x50, 0x70, 0x50, 0x71, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x71, 0x50, 0x70, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x51, 0x70, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +static const char PROGMEM skeeb_logo[384] = { + 0xC0, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x01, 0xFF, 0xFF, 0x01, 0x01, 0xFF, 0xFF, 0x01, 0x01, 0xFF, 0xFF, 0x19, 0x19, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x01, 0x01, 0xFF, 0xFF, 0x81, 0x81, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x19, 0x19, 0xFF, 0xFF, 0xF9, 0xF9, 0xF9, 0xF9, 0x01, 0x01, 0xF9, 0xF9, 0xF9, 0xF9, 0xFF, 0xFF, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0xF9, 0xF9, 0xFF, 0xFF, 0x19, 0x19, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x67, 0x67, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x3F, 0x1F, 0x0F, 0x07, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0xC0, 0x00, + 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x0F, 0x0F, 0x0F, 0x0F, 0x08, 0x08, 0x0F, 0x0F, 0x0E, 0x0E, 0x0F, 0x0F, 0x08, 0x08, 0x0F, 0x0F, 0x08, 0x08, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x08, 0x08, 0x0F, 0x0F, 0x09, 0x09, 0x09, 0x09, 0xF9, 0xF9, 0x09, 0x09, 0x08, 0x08, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x08, 0x08, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0F, 0x0F, 0x08, 0x08, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x08, 0x08, 0x0F, 0x0F, 0x0F, 0x0F, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, + 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0xFF, 0x08, 0x08, 0x0F, 0x0F, 0x08, 0x08, 0x03, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x03, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF0, 0xE0, 0xC0, 0x80, 0x01, 0x02, 0xFC, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00 +}; + +static const char PROGMEM qmk_logo[384] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0xF0, 0xF8, 0xF8, 0xFF, 0x38, 0xFF, 0xF8, 0xF8, 0x3F, 0xF8, 0xF8, 0xFF, 0x38, 0xFF, 0xF8, 0xF8, 0xF0, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0xC0, 0x80, 0x00, 0x00, 0xC0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x49, 0x49, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0xDF, 0xBF, 0xBF, 0x00, 0xBF, 0xBF, 0xDF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x49, 0x49, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x3F, 0x60, 0x60, 0xE0, 0xBF, 0x1F, 0x00, 0x7F, 0x7F, 0x07, 0x1E, 0x38, 0x1E, 0x07, 0x7F, 0x7F, 0x00, 0x7F, 0x7F, 0x0E, 0x1F, 0x3B, 0x71, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x7F, 0x0C, 0x0C, 0x0C, 0x00, 0x7E, 0x7E, 0x00, 0x7F, 0x7E, 0x03, 0x03, 0x00, 0x7F, 0x7E, 0x03, 0x03, 0x7E, 0x7E, 0x03, 0x03, 0x7F, 0x7E, 0x00, 0x0F, 0x3E, 0x70, 0x3C, 0x06, 0x3C, 0x70, 0x3E, 0x0F, 0x00, 0x32, 0x7B, 0x49, 0x49, 0x3F, 0x7E, 0x00, 0x7F, 0x7E, 0x03, 0x03, 0x00, 0x1E, 0x3F, 0x69, 0x69, 0x6F, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x07, 0x0F, 0x0F, 0x7F, 0x0F, 0x7F, 0x0F, 0x0F, 0x7E, 0x0F, 0x0F, 0x7F, 0x0F, 0x7F, 0x0F, 0x0F, 0x07, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +static const char PROGMEM qmk_large_logo[1024] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x3f, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x83, 0x83, 0x83, 0x83, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfe, 0xfe, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x83, 0x83, 0x83, 0x83, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x83, 0x83, 0x83, 0x83, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x83, 0x83, 0x83, 0x83, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x1f, 0x3f, 0x7f, 0x7e, 0xf8, 0xf0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xf0, 0xf8, 0x7e, 0x7f, 0x3f, 0x1f, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0xff, 0xff, 0xff, 0xff, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xfc, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + +static const char PROGMEM header_image[128] = { 0x00, 0xC0, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x3F, 0x1F, 0x0F, 0x07, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0xC0 }; +static const char PROGMEM row_2_image[128] = { 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF }; + +static const char PROGMEM display_border[3] = {0x0, 0xFF, 0x0}; + +static const char PROGMEM footer_image[128] = { 0x00, 0x03, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF0, 0xE0, 0xC0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x03 }; + +static const char PROGMEM mouse_logo[3][2][16] = { + { // mouse icon + { 0x00, 0x00, 0x00, 0xFC, 0x02, 0x02, 0x02, 0x3A, 0x02, 0x02, 0x02, 0xFC, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x3F, 0x60, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x60, 0x3F, 0x00, 0x00, 0x00 } + }, + { // crosshair icon + {0x80, 0xF0, 0x88, 0xE4, 0x92, 0x8A, 0xCA, 0x7F, 0xCA, 0x8A, 0x92, 0xE4, 0x88, 0xF0, 0x80, 0x00 }, + {0x00, 0x07, 0x08, 0x13, 0x24, 0x28, 0x29, 0x7F, 0x29, 0x28, 0x24, 0x13, 0x08, 0x07, 0x00, 0x00 } + }, + { // dragscroll icon + {0x00, 0x00, 0x70, 0x88, 0x9C, 0x02, 0x0F, 0x01, 0x0F, 0x02, 0x8C, 0x44, 0x38, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x02, 0x06, 0x0F, 0x1C, 0x3C, 0x7C, 0x3C, 0x1C, 0x0F, 0x06, 0x02, 0x00, 0x00, 0x00} + } +}; + + +// Images credit j-inc(/James Incandenza) and pixelbenny. +// Credit to obosob for initial animation approach. +// heavily modified by drashna because he's a glutton for punishment + +#define OLED_ANIM_SIZE 36 +#define OLED_ANIM_ROWS 4 +#define OLED_ANIM_MAX_FRAMES 3 + +static const char PROGMEM animation[4][OLED_ANIM_MAX_FRAMES][OLED_ANIM_ROWS][OLED_ANIM_SIZE] = { + { // sleep frames + { + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0xa8, 0x48, 0xa8, 0x18, 0x08, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x80, 0x44, 0x84, 0x06, 0x05, 0x04, 0x80, 0x40, 0x20, 0x10, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x20, 0x18, 0x04, 0x04, 0x02, 0x7a, 0x86, 0x01, 0x80, 0x80, 0x01, 0x03, 0x05, 0x07, 0x01, 0x00, 0x00, 0x80, 0x83, 0x45, 0xfa, 0x3c, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x33, 0x24, 0x28, 0x28, 0x29, 0x29, 0x29, 0x3a, 0x18, 0x1c, 0x39, 0x24, 0x24, 0x3a, 0x2d, 0x26, 0x31, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00 } + }, + { + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x22, 0x3a, 0x2a, 0x26, 0x22, 0x80, 0xc0, 0x80, 0x00, 0x24, 0x34, 0x2c, 0xe4, 0x60, 0x10, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x38, 0x04, 0x02, 0x02, 0x01, 0x79, 0x87, 0x01, 0x80, 0x81, 0x83, 0x05, 0x05, 0x03, 0x01, 0x00, 0x00, 0x80, 0x43, 0x05, 0xfa, 0x3c, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x33, 0x24, 0x28, 0x28, 0x28, 0x29, 0x29, 0x3a, 0x18, 0x1c, 0x39, 0x24, 0x24, 0x3a, 0x2d, 0x26, 0x31, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00 } + } + }, + { // wake frames + { + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x08, 0x10, 0x60, 0x80, 0x00, 0x80, 0x60, 0x10, 0x08, 0x30, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x80, 0x40, 0x40, 0x5c, 0x00, 0x01, 0x41, 0x01, 0x00, 0x5c, 0x40, 0x40, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x80, 0xe1, 0x12, 0x0a, 0x06, 0x00, 0x80, 0x00, 0x06, 0x0a, 0x12, 0xe1, 0x80, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x1f, 0x14, 0x14, 0x10, 0x10, 0x11, 0x1f, 0x10, 0x10, 0x18, 0x0f, 0x18, 0x10, 0x10, 0x1f, 0x11, 0x10, 0x10, 0x14, 0x14, 0x1f, 0x1c, 0x14, 0x14, 0x14, 0x08, 0x00, 0x00, 0x00, 0x00 } + }, + { + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x08, 0x10, 0x60, 0x80, 0x00, 0x80, 0x60, 0x10, 0x08, 0x30, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x90, 0x12, 0x0a, 0x02, 0xf4, 0x09, 0x0d, 0xf1, 0x04, 0x02, 0x0a, 0x12, 0x90, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x80, 0xe1, 0x12, 0x0a, 0x06, 0x01, 0x81, 0x00, 0x06, 0x0a, 0x12, 0xe1, 0x80, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x1f, 0x14, 0x14, 0x10, 0x10, 0x11, 0x1f, 0x10, 0x10, 0x18, 0x0f, 0x18, 0x10, 0x10, 0x1f, 0x11, 0x10, 0x10, 0x14, 0x14, 0x1f, 0x1c, 0x14, 0x14, 0x14, 0x08, 0x00, 0x00, 0x00, 0x00 } + } + }, + { // kaki frames + { + { 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x40, 0x40, 0x80, 0x80, 0x80, 0x00, 0xfc, 0x84, 0x08, 0x08, 0x10, 0x20, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1e, 0x60, 0x80, 0x00, 0x00, 0x91, 0xa1, 0x80, 0x00, 0x00, 0x22, 0x84, 0x40, 0x50, 0x48, 0xc1, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x41, 0x82, 0xe2, 0x12, 0x0a, 0x06, 0x00, 0x80, 0x88, 0x4f, 0x02, 0x22, 0xe2, 0x9f, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x1f, 0x14, 0x14, 0x10, 0x10, 0x11, 0x1f, 0x10, 0x10, 0x18, 0x0f, 0x18, 0x14, 0x10, 0x10, 0x10, 0x10, 0x10, 0x14, 0x14, 0x1f, 0x1a, 0x0a, 0x0a, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00 } + }, + { + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x06, 0x1a, 0x22, 0xc2, 0x04, 0x04, 0x04, 0x07, 0x00, 0xc0, 0x20, 0x10, 0x80, 0x80, 0x01, 0x01, 0x02, 0xfc, 0xfe, 0x02, 0x3c, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0d, 0x8d, 0x55, 0x50, 0x94, 0xf0, 0x10, 0x09, 0x08, 0x00, 0x80, 0x00, 0x06, 0x09, 0x1b, 0xee, 0x00, 0x00, 0x00, 0x00, 0x81, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x1f, 0x14, 0x14, 0x10, 0x10, 0x11, 0x1f, 0x10, 0x10, 0x18, 0x0f, 0x18, 0x10, 0x10, 0x1f, 0x19, 0x18, 0x1c, 0x14, 0x16, 0x15, 0x14, 0x14, 0x14, 0x14, 0x08, 0x00, 0x00, 0x00, 0x00 } + }, + { + { 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x01, 0x02, 0x04, 0x04, 0x03, 0x80, 0x40, 0x40, 0x20, 0x00, 0x01, 0x02, 0x8c, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0d, 0x8d, 0x55, 0x50, 0x94, 0xf0, 0x10, 0x0a, 0x0e, 0x1d, 0x95, 0x24, 0x24, 0x27, 0x13, 0xe1, 0x01, 0x01, 0x01, 0x01, 0x02, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x1f, 0x14, 0x14, 0x10, 0x10, 0x11, 0x1f, 0x10, 0x10, 0x18, 0x0f, 0x18, 0x10, 0x10, 0x1f, 0x19, 0x18, 0x1c, 0x14, 0x14, 0x17, 0x14, 0x14, 0x14, 0x14, 0x08, 0x00, 0x00, 0x00, 0x00 } + } + }, + { // rtogi frames + { + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x20, 0x10, 0x10, 0x08, 0x04, 0x02, 0x01, 0x0f, 0x90, 0x10, 0x20, 0xf0, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x48, 0x47, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x88, 0xc7, 0xc4, 0x62, 0x23, 0x11, 0x3f, 0x00, 0x00, 0x00, 0x00 }, + { 0x80, 0x40, 0x20, 0x10, 0x88, 0xcc, 0x43, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xc0, 0x80, 0x80, 0xc0, 0xe1, 0xfe, 0xb8, 0x88, 0x0c, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x06, 0x04, 0x04, 0x04, 0x04, 0x05, 0x04, 0x04, 0x04, 0x07, 0x07, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } + }, + { + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x20, 0x10, 0x10, 0x08, 0x04, 0x02, 0x01, 0x1f, 0xa0, 0x20, 0x40, 0x80, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x48, 0x47, 0x88, 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x28, 0x6b, 0x40, 0xa0, 0x99, 0x86, 0xff, 0x00, 0x00, 0x00, 0x00 }, + { 0x0f, 0x11, 0x22, 0x44, 0x48, 0x4c, 0x43, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xc0, 0x80, 0x80, 0xc0, 0xe1, 0xfe, 0xb8, 0x88, 0x0c, 0x04, 0x06, 0x06, 0x06, 0x0e, 0x0e, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x06, 0x04, 0x04, 0x04, 0x04, 0x05, 0x04, 0x04, 0x04, 0x07, 0x07, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } + } + } +}; + +static const char PROGMEM tri_layer_image[][3][24] = { + { // base + { 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x10, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x88, 0x88, 0x5D, 0x5D, 0x3E, 0x3E, 0x7C, 0x7C, 0xF8, 0xF8, 0x7C, 0x7C, 0x3E, 0x3E, 0x5D, 0x5D, 0x88, 0x88, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 } + }, + { // raise + { 0x00, 0x00, 0x00, 0x80, 0x80, 0xC0, 0xC0, 0xE0, 0xE0, 0xF0, 0xF0, 0xF8, 0xF8, 0xF0, 0xF0, 0xE0, 0xE0, 0xC0, 0xC0, 0x80, 0x80, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x88, 0x88, 0x55, 0x55, 0x23, 0x23, 0x47, 0x47, 0x8F, 0x8F, 0x47, 0x47, 0x23, 0x23, 0x55, 0x55, 0x88, 0x88, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 } + }, + { // lower + { 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x10, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x88, 0x88, 0xD5, 0xD5, 0xE2, 0xE2, 0xC4, 0xC4, 0x88, 0x88, 0xC4, 0xC4, 0xE2, 0xE2, 0xD5, 0xD5, 0x88, 0x88, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x07, 0x07, 0x0F, 0x0F, 0x07, 0x07, 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 } + }, + { // adjust + { 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0xC0, 0x60, 0xA0, 0x50, 0xB0, 0x58, 0xA8, 0x50, 0xB0, 0x60, 0xA0, 0x40, 0xC0, 0x80, 0x80, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x88, 0x88, 0x5D, 0xD5, 0x6B, 0xB6, 0x6D, 0xD6, 0xAD, 0xDA, 0x6D, 0xD6, 0x6B, 0xB6, 0x5D, 0xD5, 0x88, 0x88, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x02, 0x05, 0x06, 0x0D, 0x0A, 0x05, 0x06, 0x03, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 } + }, + { // blank + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + }, + { // better gamepad + { 0x00, 0x00, 0x00, 0xC0, 0xE0, 0xE0, 0x70, 0xF0, 0xF0, 0xF0, 0xF0, 0x90, 0x90, 0xF0, 0xF0, 0xF0, 0xF0, 0x70, 0xE0, 0xE0, 0xC0, 0x00, 0x00, 0x00 }, + { 0x80, 0xF8, 0xFF, 0xFF, 0xFF, 0xFE, 0xFC, 0xE6, 0xC3, 0xC3, 0xE6, 0xFF, 0xFF, 0xFE, 0xF7, 0xE3, 0xF6, 0xFD, 0xFE, 0xFF, 0xFF, 0xFF, 0xF8, 0x80 }, + { 0x07, 0x0F, 0x0F, 0x0F, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x0F, 0x0F, 0x0F, 0x07 } + }, + { // mouse + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x20, 0x20, 0x20, 0xA0, 0x20, 0x20, 0x20, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x0F, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x06, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x06, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } + } +}; diff --git a/users/drashna/oled/oled_config.h b/users/drashna/oled/oled_config.h index c46c0c39ce2f..427764c4a7aa 100644 --- a/users/drashna/oled/oled_config.h +++ b/users/drashna/oled/oled_config.h @@ -4,14 +4,12 @@ #pragma once #ifndef OLED_UPDATE_INTERVAL -# ifdef OLED_DRIVER_SH1107 -# define OLED_UPDATE_INTERVAL 75 +# ifdef SPLIT_KEYBOARD +# define OLED_UPDATE_INTERVAL 60 +# elif defined(OLED_DISPLAY_128X128) +# define OLED_UPDATE_INTERVAL 30 # else -# ifdef SPLIT_KEYBOARD -# define OLED_UPDATE_INTERVAL 60 -# else -# define OLED_UPDATE_INTERVAL 15 -# endif +# define OLED_UPDATE_INTERVAL 15 # endif #endif #define OLED_DISABLE_TIMEOUT @@ -40,24 +38,3 @@ #define OLED_LOGO_SCIFI // # define OLED_LOGO_SETS3N // # define OLED_LOGO_SKEEB - -#ifdef OLED_DRIVER_SH1107 -# define OLED_DISPLAY_CUSTOM -# define OLED_IC_SH1107 2 -# define OLED_DISPLAY_128X128 -# define OLED_DISPLAY_WIDTH 128 -# define OLED_DISPLAY_HEIGHT 128 -# define OLED_MATRIX_SIZE (OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH) -# define OLED_BLOCK_TYPE uint32_t -# define OLED_SOURCE_MAP \ - { 0, 8, 16, 24, 32, 40, 48, 56 } -# define OLED_TARGET_MAP \ - { 56, 48, 40, 32, 24, 16, 8, 0 } -# define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8) -# define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT) -# define OLED_COM_PINS COM_PINS_ALT -# define OLED_IC OLED_IC_SH1107 -# ifndef OLED_BRIGHTNESS -# define OLED_BRIGHTNESS 50 -# endif -#endif diff --git a/users/drashna/oled/oled_stuff.c b/users/drashna/oled/oled_stuff.c index 98506247df3e..d232e90fb26a 100644 --- a/users/drashna/oled/oled_stuff.c +++ b/users/drashna/oled/oled_stuff.c @@ -16,6 +16,10 @@ */ #include "drashna.h" +#include +#include +#include +#include "lib/lib8tion/lib8tion.h" #ifdef UNICODE_COMMON_ENABLE # include "process_unicode_common.h" # include "keyrecords/unicode.h" @@ -23,42 +27,39 @@ #ifdef AUDIO_CLICKY # include "process_clicky.h" #endif -#include -bool is_oled_enabled = true, is_oled_locked = false; +#ifndef OLED_BRIGHTNESS_STEP +# define OLED_BRIGHTNESS_STEP 32 +#endif -extern bool host_driver_disabled; +bool is_oled_enabled = true, is_oled_locked = false, is_oled_force_off = false; -uint32_t oled_timer = 0; -char keylog_str[OLED_KEYLOGGER_LENGTH] = {0}; -static uint16_t log_timer = 0; -#ifdef OLED_DISPLAY_VERBOSE -const char PROGMEM display_border[3] = {0x0, 0xFF, 0x0}; -#endif +uint32_t oled_timer = 0; +char oled_keylog_str[OLED_KEYLOGGER_LENGTH + 1] = {0}; deferred_token kittoken; -// clang-format off -static const char PROGMEM code_to_name[256] = { -// 0 1 2 3 4 5 6 7 8 9 A B c D E F - ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', // 0x - 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', // 1x - '3', '4', '5', '6', '7', '8', '9', '0', 20, 19, 27, 26, 22, '-', '=', '[', // 2x - ']','\\', '#', ';','\'', '`', ',', '.', '/', 128,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA, // 3x - 0xDB,0xDC,0xDD,0xDE,0XDF,0xFB,'P', 'S', 19, ' ', 17, 30, 16, 16, 31, 26, // 4x - 27, 25, 24, 'N', '/', '*', '-', '+', 23, '1', '2', '3', '4', '5', '6', '7', // 5x - '8', '9', '0', '.','\\', 'A', 0, '=', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 6x - ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 7x - ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 8x - ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 9x - ' ', ' ', ' ', ' ', ' ', 0, ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ax - ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Bx - ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Cx - ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Dx - 'C', 'S', 'A', 'C', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 24, 26, 24, // Ex - 25,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D, 24, 25, 27, 26, ' ', ' ', ' ' // Fx -}; -// clang-format on +extern uint8_t oled_buffer[OLED_MATRIX_SIZE]; +extern OLED_BLOCK_TYPE oled_dirty; + +void oled_pan_section(bool left, uint16_t y_start, uint16_t y_end, uint16_t x_start, uint16_t x_end) { + uint16_t i = 0; + for (uint16_t y = y_start; y < y_end; y++) { + if (left) { + for (uint16_t x = x_start; x < x_end - 1; x++) { + i = y * OLED_DISPLAY_WIDTH + x; + oled_buffer[i] = oled_buffer[i + 1]; + oled_dirty |= ((OLED_BLOCK_TYPE)1 << (i / OLED_BLOCK_SIZE)); + } + } else { + for (uint16_t x = x_end - 1; x > 0; x--) { + i = y * OLED_DISPLAY_WIDTH + x; + oled_buffer[i] = oled_buffer[i - 1]; + oled_dirty |= ((OLED_BLOCK_TYPE)1 << (i / OLED_BLOCK_SIZE)); + } + } + } +} /** * @brief parses pressed keycodes and saves to buffer @@ -67,32 +68,34 @@ static const char PROGMEM code_to_name[256] = { * @param record keyrecord_t data structure */ void add_keylog(uint16_t keycode, keyrecord_t *record) { - if (keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) { - keycode = QK_MOD_TAP_GET_TAP_KEYCODE(keycode); - } else if (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) { - keycode = QK_LAYER_TAP_GET_TAP_KEYCODE(keycode); - } else if (keycode >= QK_MODS && keycode <= QK_MODS_MAX) { - keycode = QK_MODS_GET_BASIC_KEYCODE(keycode); + if (IS_QK_MOD_TAP(keycode)) { + if (record->tap.count) { + keycode = keycode_config(QK_MOD_TAP_GET_TAP_KEYCODE(keycode)); + } else { + keycode = keycode_config(0xE0 + biton(QK_MOD_TAP_GET_MODS(keycode) & 0xF) + biton(QK_MOD_TAP_GET_MODS(keycode) & 0x10)); + } + } else if (IS_QK_LAYER_TAP(keycode) && record->tap.count) { + keycode = keycode_config(QK_LAYER_TAP_GET_TAP_KEYCODE(keycode)); + } else if (IS_QK_MODS(keycode)) { + keycode = keycode_config(QK_MODS_GET_BASIC_KEYCODE(keycode)); + } else if (IS_QK_ONE_SHOT_MOD(keycode)) { + keycode = keycode_config(0xE0 + biton(QK_ONE_SHOT_MOD_GET_MODS(keycode) & 0xF) + biton(QK_ONE_SHOT_MOD_GET_MODS(keycode) & 0x10)); + } else if (IS_QK_BASIC(keycode)) { + keycode = keycode_config(keycode); } if ((keycode == KC_BSPC) && mod_config(get_mods() | get_oneshot_mods()) & MOD_MASK_CTRL) { - memset(keylog_str, ' ', OLED_KEYLOGGER_LENGTH); - keylog_str[OLED_KEYLOGGER_LENGTH-1] = 0x00; - return; - } - if (record->tap.count) { - keycode &= 0xFF; - } else if (keycode > 0xFF) { + memset(oled_keylog_str, ' ', OLED_KEYLOGGER_LENGTH); + oled_keylog_str[OLED_KEYLOGGER_LENGTH] = 0x00; return; } - memmove(keylog_str, keylog_str + 1, OLED_KEYLOGGER_LENGTH - 2); - - if (keycode < ARRAY_SIZE(code_to_name)) { - keylog_str[(OLED_KEYLOGGER_LENGTH - 2)] = pgm_read_byte(&code_to_name[keycode]); + if (keycode > ARRAY_SIZE(code_to_name)) { + return; } - log_timer = timer_read(); + memmove(oled_keylog_str, oled_keylog_str + 1, OLED_KEYLOGGER_LENGTH - 1); + oled_keylog_str[(OLED_KEYLOGGER_LENGTH - 1)] = pgm_read_byte(&code_to_name[keycode]); } /** @@ -107,15 +110,25 @@ void add_keylog(uint16_t keycode, keyrecord_t *record) { */ bool process_record_user_oled(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { - oled_timer_reset(); add_keylog(keycode, record); + if (keycode == OLED_BRIGHTNESS_INC) { + userspace_config.oled_brightness = qadd8(userspace_config.oled_brightness, OLED_BRIGHTNESS_STEP); + oled_set_brightness(userspace_config.oled_brightness); + eeconfig_update_user_config(&userspace_config.raw); + } else if (keycode == OLED_BRIGHTNESS_DEC) { + userspace_config.oled_brightness = qsub8(userspace_config.oled_brightness, OLED_BRIGHTNESS_STEP); + oled_set_brightness(userspace_config.oled_brightness); + eeconfig_update_user_config(&userspace_config.raw); + } else if (keycode == OLED_LOCK) { + is_oled_locked = !is_oled_locked; + if (is_oled_locked) { + oled_on(); + } + } } return true; } -void oled_timer_reset(void) { - oled_timer = timer_read32(); -} /** * @brief Renders keylogger buffer to oled * @@ -125,7 +138,7 @@ void render_keylogger_status(uint8_t col, uint8_t line) { oled_set_cursor(col, line); #endif oled_write_P(PSTR(OLED_RENDER_KEYLOGGER), false); - oled_write(keylog_str, false); + oled_write(oled_keylog_str, false); #ifdef OLED_DISPLAY_VERBOSE oled_advance_page(true); #endif @@ -138,7 +151,18 @@ void render_keylogger_status(uint8_t col, uint8_t line) { void render_default_layer_state(uint8_t col, uint8_t line) { #ifdef OLED_DISPLAY_VERBOSE oled_set_cursor(col, line); -#endif + oled_write_P(PSTR(OLED_RENDER_LAYOUT_NAME), false); + + static char layer_state_buffer[11] = {0}; + static layer_state_t old_state = 0; + + if (old_state != default_layer_state) { + snprintf(layer_state_buffer, sizeof(layer_state_buffer), "%-10s", get_layer_name_string(default_layer_state, false)); + old_state = default_layer_state; + } + oled_write(layer_state_buffer, false); + oled_advance_page(true); +#else oled_write_P(PSTR(OLED_RENDER_LAYOUT_NAME), false); switch (get_highest_layer(default_layer_state)) { case _QWERTY: @@ -154,8 +178,6 @@ void render_default_layer_state(uint8_t col, uint8_t line) { oled_write_P(PSTR(OLED_RENDER_LAYOUT_DVORAK), false); break; } -#ifdef OLED_DISPLAY_VERBOSE - oled_advance_page(true); #endif } @@ -165,114 +187,6 @@ void render_default_layer_state(uint8_t col, uint8_t line) { */ void render_layer_state(uint8_t col, uint8_t line) { #ifdef OLED_DISPLAY_VERBOSE - // clang-format off - static const char PROGMEM tri_layer_image[][3][24] = { - // base - { - { - 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, - 0x40, 0x20, 0x20, 0x10, 0x10, 0x08, - 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, - 0x40, 0x80, 0x80, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x88, 0x88, 0x5D, - 0x5D, 0x3E, 0x3E, 0x7C, 0x7C, 0xF8, - 0xF8, 0x7C, 0x7C, 0x3E, 0x3E, 0x5D, - 0x5D, 0x88, 0x88, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x01, 0x02, 0x02, 0x04, 0x04, 0x08, - 0x08, 0x04, 0x04, 0x02, 0x02, 0x01, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 - } - }, - // raise - { - { - 0x00, 0x00, 0x00, 0x80, 0x80, 0xC0, - 0xC0, 0xE0, 0xE0, 0xF0, 0xF0, 0xF8, - 0xF8, 0xF0, 0xF0, 0xE0, 0xE0, 0xC0, - 0xC0, 0x80, 0x80, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x88, 0x88, 0x55, - 0x55, 0x23, 0x23, 0x47, 0x47, 0x8F, - 0x8F, 0x47, 0x47, 0x23, 0x23, 0x55, - 0x55, 0x88, 0x88, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x01, 0x02, 0x02, 0x04, 0x04, 0x08, - 0x08, 0x04, 0x04, 0x02, 0x02, 0x01, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 - } - }, - // lower - { - { - 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, - 0x40, 0x20, 0x20, 0x10, 0x10, 0x08, - 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, - 0x40, 0x80, 0x80, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x88, 0x88, 0xD5, - 0xD5, 0xE2, 0xE2, 0xC4, 0xC4, 0x88, - 0x88, 0xC4, 0xC4, 0xE2, 0xE2, 0xD5, - 0xD5, 0x88, 0x88, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x01, 0x03, 0x03, 0x07, 0x07, 0x0F, - 0x0F, 0x07, 0x07, 0x03, 0x03, 0x01, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 - } - }, - // adjust - { - { - 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, - 0xC0, 0x60, 0xA0, 0x50, 0xB0, 0x58, - 0xA8, 0x50, 0xB0, 0x60, 0xA0, 0x40, - 0xC0, 0x80, 0x80, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x88, 0x88, 0x5D, - 0xD5, 0x6B, 0xB6, 0x6D, 0xD6, 0xAD, - 0xDA, 0x6D, 0xD6, 0x6B, 0xB6, 0x5D, - 0xD5, 0x88, 0x88, 0x00, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x01, 0x03, 0x02, 0x05, 0x06, 0x0D, - 0x0A, 0x05, 0x06, 0x03, 0x02, 0x01, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 - } - }, - // blank - { - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } - }, - // better gamepad - { - { 0, 0, 0,192,224,224,112,240,240,240,240,144,144,240,240,240,240,112,224,224,192, 0, 0, 0 }, - { 128,248,255,255,255,254,252,230,195,195,230,255,255,254,247,227,246,253,254,255,255,255,248,128 }, - { 7, 15, 15, 15, 7, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 7, 15, 15, 15, 7 } - - }, - // mouse - { - { 0, 0, 0, 0, 0, 0, 0, 0,192, 32, 32, 32,160, 32, 32, 32,192, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0,240, 15, 0, 0, 0, 3, 0, 0, 0, 15,240, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 3, 6, 4, 4, 4, 4, 4, 4, 4, 6, 3, 0, 0, 0, 0, 0, 0 } - } - }; - - // clang-format on uint8_t layer_is[4] = {0, 4, 4, 4}; if (layer_state_is(_ADJUST)) { layer_is[0] = 3; @@ -376,19 +290,23 @@ void render_mod_status(uint8_t modifiers, uint8_t col, uint8_t line) { static const char PROGMEM mod_status[5][3] = {{0xE8, 0xE9, 0}, {0xE4, 0xE5, 0}, {0xE6, 0xE7, 0}, {0xEA, 0xEB, 0}, {0xEC, 0xED, 0}}; #if defined(OLED_DISPLAY_VERBOSE) oled_set_cursor(col, line); +#endif + bool is_caps = host_keyboard_led_state().caps_lock; +#ifdef CAPS_WORD_ENABLE + is_caps |= is_caps_word_on(); #endif oled_write_P(PSTR(OLED_RENDER_MODS_NAME), false); #if defined(OLED_DISPLAY_VERBOSE) - oled_write_P(mod_status[0], (modifiers & MOD_BIT(KC_LSFT))); + oled_write_P(mod_status[0], (modifiers & MOD_BIT(KC_LSFT)) || is_caps); oled_write_P(mod_status[!keymap_config.swap_lctl_lgui ? 3 : 4], (modifiers & MOD_BIT(KC_LGUI))); oled_write_P(mod_status[2], (modifiers & MOD_BIT(KC_LALT))); oled_write_P(mod_status[1], (modifiers & MOD_BIT(KC_LCTL))); oled_write_P(mod_status[1], (modifiers & MOD_BIT(KC_RCTL))); oled_write_P(mod_status[2], (modifiers & MOD_BIT(KC_RALT))); oled_write_P(mod_status[!keymap_config.swap_lctl_lgui ? 3 : 4], (modifiers & MOD_BIT(KC_RGUI))); - oled_write_P(mod_status[0], (modifiers & MOD_BIT(KC_RSFT))); + oled_write_P(mod_status[0], (modifiers & MOD_BIT(KC_RSFT)) || is_caps); #else - oled_write_P(mod_status[0], (modifiers & MOD_MASK_SHIFT)); + oled_write_P(mod_status[0], (modifiers & MOD_MASK_SHIFT) || is_caps); oled_write_P(mod_status[!keymap_config.swap_lctl_lgui ? 3 : 4], (modifiers & MOD_MASK_GUI)); oled_write_P(PSTR(" "), false); oled_write_P(mod_status[2], (modifiers & MOD_MASK_ALT)); @@ -508,7 +426,7 @@ void render_user_status(uint8_t col, uint8_t line) { static const char PROGMEM rgb_layer_status[2][3] = {{0xEE, 0xEF, 0}, {0xF0, 0xF1, 0}}; oled_write_P(rgb_layer_status[userspace_config.rgb_layer_change], false); static const char PROGMEM cat_mode[2][3] = {{0xF8, 0xF9, 0}, {0xF6, 0xF7, 0}}; - oled_write_P(cat_mode[0], host_driver_disabled); + oled_write_P(cat_mode[0], get_keyboard_lock()); #if defined(UNICODE_COMMON_ENABLE) static const char PROGMEM uc_mod_status[5][3] = {{0xEC, 0xED, 0}, {0x20, 0x20, 0}, {0x20, 0x20, 0}, {0x20, 0x20, 0}, {0xEA, 0xEB, 0}}; oled_write_P(uc_mod_status[get_unicode_input_mode()], false); @@ -538,12 +456,51 @@ void render_rgb_hsv(uint8_t col, uint8_t line) { oled_write_P(PSTR(", "), false); oled_write(get_u8_str(rgb_matrix_get_val(), ' '), false); #elif RGBLIGHT_ENABLE - oled_write(get_u8_str(rgblight_get_hue(), ' '), false); - oled_write_P(PSTR(", "), false); - oled_write(get_u8_str(rgblight_get_sat(), ' '), false); - oled_write_P(PSTR(", "), false); - oled_write(get_u8_str(rgblight_get_val(), ' '), false); + if (is_rgblight_startup_running()) { + oled_write_P(PSTR("Start Animation"), false); + } else { + oled_write(get_u8_str(rgblight_get_hue(), ' '), false); + oled_write_P(PSTR(", "), false); + oled_write(get_u8_str(rgblight_get_sat(), ' '), false); + oled_write_P(PSTR(", "), false); + oled_write(get_u8_str(rgblight_get_val(), ' '), false); + } +#endif +} + +void render_rgb_mode(uint8_t col, uint8_t line) { + oled_set_cursor(col, line); + __attribute__((unused)) static uint8_t mode; + bool need_update = false; + static char buf[21] = {0}; + +#ifdef RGB_MATRIX_ENABLE + if (mode != rgb_matrix_get_mode()) { + snprintf(buf, sizeof(buf), "%-20s", rgb_matrix_name(rgb_matrix_get_mode())); + mode = rgb_matrix_get_mode(); + need_update = true; + } +#elif RGBLIGHT_ENABLE + if (mode != rgblight_get_mode()) { + snprintf(buf, sizeof(buf), "%-20s", rgblight_name(rgblight_get_mode())); + mode = rgblight_get_mode(); + need_update = true; + } #endif + if (need_update) { + for (uint8_t i = 1; i < sizeof(buf); ++i) { + if (buf[i] == 0) + break; + else if (buf[i] == '_') + buf[i] = ' '; + else if (buf[i - 1] == ' ') + buf[i] = toupper(buf[i]); + else if (buf[i - 1] != ' ') + buf[i] = tolower(buf[i]); + } + } + + oled_write(buf, false); } void render_wpm(uint8_t padding, uint8_t col, uint8_t line) { @@ -642,9 +599,6 @@ void render_pointing_dpi_status(uint16_t cpi, uint8_t padding, uint8_t col, uint // #define ANIM_FRAME_DURATION 500 // how long each frame lasts in ms // #define SLEEP_TIMER 60000 // should sleep after this period of 0 wpm, needs fixing -#define OLED_ANIM_SIZE 36 -#define OLED_ANIM_ROWS 4 -#define OLED_ANIM_MAX_FRAMES 3 #if (OLED_SLEEP_FRAMES > OLED_ANIM_MAX_FRAMES) || (OLED_WAKE_FRAMES > OLED_ANIM_MAX_FRAMES) || (OLED_KAKI_FRAMES > OLED_ANIM_MAX_FRAMES) || (OLED_RTOGI_FRAMES > OLED_ANIM_MAX_FRAMES) # error frame size too large #endif @@ -653,81 +607,6 @@ static uint8_t animation_frame = 0; static uint8_t animation_type = 0; void render_kitty(uint8_t col, uint8_t line) { - // Images credit j-inc(/James Incandenza) and pixelbenny. - // Credit to obosob for initial animation approach. - // heavily modified by drashna because he's a glutton for punishment - - // clang-format off - static const char PROGMEM animation[4][OLED_ANIM_MAX_FRAMES][OLED_ANIM_ROWS][OLED_ANIM_SIZE] = { - // sleep frames - { - { - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0xa8, 0x48, 0xa8, 0x18, 0x08, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x80, 0x44, 0x84, 0x06, 0x05, 0x04, 0x80, 0x40, 0x20, 0x10, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x20, 0x18, 0x04, 0x04, 0x02, 0x7a, 0x86, 0x01, 0x80, 0x80, 0x01, 0x03, 0x05, 0x07, 0x01, 0x00, 0x00, 0x80, 0x83, 0x45, 0xfa, 0x3c, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x33, 0x24, 0x28, 0x28, 0x29, 0x29, 0x29, 0x3a, 0x18, 0x1c, 0x39, 0x24, 0x24, 0x3a, 0x2d, 0x26, 0x31, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00 } - }, - { - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x22, 0x3a, 0x2a, 0x26, 0x22, 0x80, 0xc0, 0x80, 0x00, 0x24, 0x34, 0x2c, 0xe4, 0x60, 0x10, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x38, 0x04, 0x02, 0x02, 0x01, 0x79, 0x87, 0x01, 0x80, 0x81, 0x83, 0x05, 0x05, 0x03, 0x01, 0x00, 0x00, 0x80, 0x43, 0x05, 0xfa, 0x3c, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x33, 0x24, 0x28, 0x28, 0x28, 0x29, 0x29, 0x3a, 0x18, 0x1c, 0x39, 0x24, 0x24, 0x3a, 0x2d, 0x26, 0x31, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00 } - } - }, - // wake frames - { - { - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x08, 0x10, 0x60, 0x80, 0x00, 0x80, 0x60, 0x10, 0x08, 0x30, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x80, 0x40, 0x40, 0x5c, 0x00, 0x01, 0x41, 0x01, 0x00, 0x5c, 0x40, 0x40, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x80, 0xe1, 0x12, 0x0a, 0x06, 0x00, 0x80, 0x00, 0x06, 0x0a, 0x12, 0xe1, 0x80, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x1f, 0x14, 0x14, 0x10, 0x10, 0x11, 0x1f, 0x10, 0x10, 0x18, 0x0f, 0x18, 0x10, 0x10, 0x1f, 0x11, 0x10, 0x10, 0x14, 0x14, 0x1f, 0x1c, 0x14, 0x14, 0x14, 0x08, 0x00, 0x00, 0x00, 0x00 } - }, - { - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x08, 0x10, 0x60, 0x80, 0x00, 0x80, 0x60, 0x10, 0x08, 0x30, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x90, 0x12, 0x0a, 0x02, 0xf4, 0x09, 0x0d, 0xf1, 0x04, 0x02, 0x0a, 0x12, 0x90, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x80, 0xe1, 0x12, 0x0a, 0x06, 0x01, 0x81, 0x00, 0x06, 0x0a, 0x12, 0xe1, 0x80, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x1f, 0x14, 0x14, 0x10, 0x10, 0x11, 0x1f, 0x10, 0x10, 0x18, 0x0f, 0x18, 0x10, 0x10, 0x1f, 0x11, 0x10, 0x10, 0x14, 0x14, 0x1f, 0x1c, 0x14, 0x14, 0x14, 0x08, 0x00, 0x00, 0x00, 0x00 } - } - }, - // kaki frames - { - { - { 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x40, 0x40, 0x80, 0x80, 0x80, 0x00, 0xfc, 0x84, 0x08, 0x08, 0x10, 0x20, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1e, 0x60, 0x80, 0x00, 0x00, 0x91, 0xa1, 0x80, 0x00, 0x00, 0x22, 0x84, 0x40, 0x50, 0x48, 0xc1, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x41, 0x82, 0xe2, 0x12, 0x0a, 0x06, 0x00, 0x80, 0x88, 0x4f, 0x02, 0x22, 0xe2, 0x9f, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x1f, 0x14, 0x14, 0x10, 0x10, 0x11, 0x1f, 0x10, 0x10, 0x18, 0x0f, 0x18, 0x14, 0x10, 0x10, 0x10, 0x10, 0x10, 0x14, 0x14, 0x1f, 0x1a, 0x0a, 0x0a, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00 } - }, - { - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x06, 0x1a, 0x22, 0xc2, 0x04, 0x04, 0x04, 0x07, 0x00, 0xc0, 0x20, 0x10, 0x80, 0x80, 0x01, 0x01, 0x02, 0xfc, 0xfe, 0x02, 0x3c, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0d, 0x8d, 0x55, 0x50, 0x94, 0xf0, 0x10, 0x09, 0x08, 0x00, 0x80, 0x00, 0x06, 0x09, 0x1b, 0xee, 0x00, 0x00, 0x00, 0x00, 0x81, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x1f, 0x14, 0x14, 0x10, 0x10, 0x11, 0x1f, 0x10, 0x10, 0x18, 0x0f, 0x18, 0x10, 0x10, 0x1f, 0x19, 0x18, 0x1c, 0x14, 0x16, 0x15, 0x14, 0x14, 0x14, 0x14, 0x08, 0x00, 0x00, 0x00, 0x00 } - }, - { - { 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x01, 0x02, 0x04, 0x04, 0x03, 0x80, 0x40, 0x40, 0x20, 0x00, 0x01, 0x02, 0x8c, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0d, 0x8d, 0x55, 0x50, 0x94, 0xf0, 0x10, 0x0a, 0x0e, 0x1d, 0x95, 0x24, 0x24, 0x27, 0x13, 0xe1, 0x01, 0x01, 0x01, 0x01, 0x02, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x1f, 0x14, 0x14, 0x10, 0x10, 0x11, 0x1f, 0x10, 0x10, 0x18, 0x0f, 0x18, 0x10, 0x10, 0x1f, 0x19, 0x18, 0x1c, 0x14, 0x14, 0x17, 0x14, 0x14, 0x14, 0x14, 0x08, 0x00, 0x00, 0x00, 0x00 } - } - }, - // rtogi frames - { - { - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x20, 0x10, 0x10, 0x08, 0x04, 0x02, 0x01, 0x0f, 0x90, 0x10, 0x20, 0xf0, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x48, 0x47, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x88, 0xc7, 0xc4, 0x62, 0x23, 0x11, 0x3f, 0x00, 0x00, 0x00, 0x00 }, - { 0x80, 0x40, 0x20, 0x10, 0x88, 0xcc, 0x43, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xc0, 0x80, 0x80, 0xc0, 0xe1, 0xfe, 0xb8, 0x88, 0x0c, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x06, 0x04, 0x04, 0x04, 0x04, 0x05, 0x04, 0x04, 0x04, 0x07, 0x07, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } - }, - { - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x20, 0x10, 0x10, 0x08, 0x04, 0x02, 0x01, 0x1f, 0xa0, 0x20, 0x40, 0x80, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x48, 0x47, 0x88, 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x28, 0x6b, 0x40, 0xa0, 0x99, 0x86, 0xff, 0x00, 0x00, 0x00, 0x00 }, - { 0x0f, 0x11, 0x22, 0x44, 0x48, 0x4c, 0x43, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xc0, 0x80, 0x80, 0xc0, 0xe1, 0xfe, 0xb8, 0x88, 0x0c, 0x04, 0x06, 0x06, 0x06, 0x0e, 0x0e, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x06, 0x04, 0x04, 0x04, 0x04, 0x05, 0x04, 0x04, 0x04, 0x07, 0x07, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } - } - } - }; - // clang-format on - for (uint8_t i = 0; i < 4; i++) { oled_set_cursor(col, line + i); oled_write_raw_P(animation[animation_type][animation_frame][i], OLED_ANIM_SIZE); @@ -776,13 +655,6 @@ uint32_t kitty_animation_phases(uint32_t triger_time, void *cb_arg) { void render_mouse_mode(uint8_t col, uint8_t line) { #if (defined(KEYBOARD_bastardkb_charybdis) || defined(KEYBOARD_handwired_tractyl_manuform)) && defined(POINTING_DEVICE_ENABLE) // credit and thanks to jaspertandy on discord for these images - static const char PROGMEM mouse_logo[3][2][16] = {// mouse icon - {{0, 0, 0, 252, 2, 2, 2, 58, 2, 2, 2, 252, 0, 0, 0, 0}, {0, 0, 63, 96, 64, 64, 64, 64, 64, 64, 64, 96, 63, 0, 0, 0}}, - // crosshair icon - {{128, 240, 136, 228, 146, 138, 202, 127, 202, 138, 146, 228, 136, 240, 128, 0}, {0, 7, 8, 19, 36, 40, 41, 127, 41, 40, 36, 19, 8, 7, 0, 0}}, - // dragscroll icon - {{0, 0, 112, 136, 156, 2, 15, 1, 15, 2, 140, 68, 56, 0, 0, 0}, {0, 0, 2, 6, 15, 28, 60, 124, 60, 28, 15, 6, 2, 0, 0, 0}}}; - uint8_t image_index = 0; # ifdef OLED_DISPLAY_TEST image_index = animation_frame; @@ -848,7 +720,18 @@ void render_status_left(void) { } __attribute__((weak)) void oled_render_large_display(bool side) { - if (!side) { + if (side) { + render_rgb_hsv(1, 7); + render_rgb_mode(1, 8); + + render_wpm_graph(48, 72); + } else { + oled_advance_page(true); + oled_advance_page(true); + + oled_set_cursor(0, 9); + oled_write_raw_P(qmk_logo, 384); // is 3 rows of 128 pixels, so 384 bytes. + render_unicode_mode(1, 14); } } @@ -864,7 +747,7 @@ __attribute__((weak)) oled_rotation_t oled_init_keymap(oled_rotation_t rotation) oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (is_keyboard_master()) { - memset(keylog_str, ' ', OLED_KEYLOGGER_LENGTH); + memset(oled_keylog_str, ' ', OLED_KEYLOGGER_LENGTH); } kittoken = defer_exec(3000, kitty_animation_phases, NULL); @@ -894,12 +777,7 @@ bool oled_task_user(void) { } #if defined(OLED_DISPLAY_VERBOSE) - static const char PROGMEM header_image[] = { - 0, 192, 32, 16, 8, 4, 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, 7, 15, 31, 63, 127, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 127, 63, 31, 15, 7, 3, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 8, 16, 32, 192, 0, - // 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 7, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 7, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, 0 - }; oled_write_raw_P(header_image, sizeof(header_image)); - oled_set_cursor(4, 0); render_oled_title(is_keyboard_left()); #endif @@ -934,7 +812,6 @@ bool oled_task_user(void) { oled_write_raw_P(display_border, sizeof(display_border)); } - static const char PROGMEM footer_image[] = {0, 3, 4, 8, 16, 32, 64, 128, 128, 128, 128, 128, 128, 128, 192, 224, 240, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 240, 224, 192, 128, 128, 128, 128, 128, 128, 128, 64, 32, 16, 8, 4, 3, 0}; oled_set_cursor(0, num_of_rows); oled_write_raw_P(footer_image, sizeof(footer_image)); #endif @@ -942,8 +819,12 @@ bool oled_task_user(void) { return false; } -extern bool oled_initialized; - -__attribute__((weak)) void housekeeping_task_oled(void) { - is_oled_enabled = is_oled_locked ? true : !(timer_elapsed32(oled_timer) > 60000); +void housekeeping_task_oled(void) { + is_oled_enabled = false; + if ((is_oled_locked || (last_input_activity_elapsed() < 60000)) && !is_oled_force_off) { + is_oled_enabled = true; + } + if (oled_get_brightness() != userspace_config.oled_brightness) { + oled_set_brightness(userspace_config.oled_brightness); + } } diff --git a/users/drashna/oled/oled_stuff.h b/users/drashna/oled/oled_stuff.h index 419cdc11ebbe..414720ff2af3 100644 --- a/users/drashna/oled/oled_stuff.h +++ b/users/drashna/oled/oled_stuff.h @@ -18,6 +18,7 @@ #include "quantum.h" #include "oled_driver.h" +#include "oled_assets.h" #ifdef DEFFERED_EXEC_ENABLE extern deferred_token kittoken; #endif @@ -55,7 +56,7 @@ void oled_pan_section(bool left, uint16_t y_start, uint16_t y_end, uint16_t x_st # define OLED_RENDER_KEYLOGGER "Keylogger: " # ifndef OLED_KEYLOGGER_LENGTH -# define OLED_KEYLOGGER_LENGTH 10 +# define OLED_KEYLOGGER_LENGTH 9 # endif # define OLED_RENDER_LAYOUT_NAME "Layout: " # define OLED_RENDER_LAYOUT_QWERTY "Qwerty" @@ -102,7 +103,7 @@ void oled_pan_section(bool left, uint16_t y_start, uint16_t y_end, uint16_t x_st #else # define OLED_RENDER_KEYLOGGER "KLogr" # ifndef OLED_KEYLOGGER_LENGTH -# define OLED_KEYLOGGER_LENGTH 6 +# define OLED_KEYLOGGER_LENGTH 5 # endif # define OLED_RENDER_LAYOUT_NAME "Lyout" @@ -149,7 +150,7 @@ void oled_pan_section(bool left, uint16_t y_start, uint16_t y_end, uint16_t x_st # define OLED_RENDER_WPM_COUNTER "WPM: " #endif -extern char keylog_str[]; +extern char oled_keylog_str[OLED_KEYLOGGER_LENGTH + 1]; #ifndef OLED_WPM_GRAPH_MAX_WPM # define OLED_WPM_GRAPH_MAX_WPM 120 diff --git a/users/drashna/oled/rules.mk b/users/drashna/oled/rules.mk new file mode 100644 index 000000000000..95be67a9ef69 --- /dev/null +++ b/users/drashna/oled/rules.mk @@ -0,0 +1,12 @@ + +CUSTOM_OLED_DRIVER ?= yes +ifeq ($(strip $(OLED_ENABLE)), yes) + ifeq ($(strip $(CUSTOM_OLED_DRIVER)), yes) + OPT_DEFS += -DCUSTOM_OLED_DRIVER + SRC += $(USER_PATH)/oled/oled_stuff.c + endif + ifeq ($(strip $(OLED_DISPLAY_TEST)), yes) + OPT_DEFS += -DOLED_DISPLAY_TEST + endif +endif +DEFERRED_EXEC_ENABLE = yes diff --git a/users/drashna/oled/sh110x.c b/users/drashna/oled/sh110x.c deleted file mode 100644 index f96a93a8973a..000000000000 --- a/users/drashna/oled/sh110x.c +++ /dev/null @@ -1,860 +0,0 @@ -/* -Copyright 2019 Ryan Caltabiano - -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 "i2c_master.h" -#include "oled_driver.h" -#include OLED_FONT_H -#include "timer.h" -#include "print.h" - -#include - -#include "progmem.h" - -#include "keyboard.h" - -// for SH1107: https://www.displayfuture.com/Display/datasheet/controller/SH1107.pdf - -// Fundamental Commands -#define CONTRAST 0x81 -#define DISPLAY_ALL_ON 0xA5 -#define DISPLAY_ALL_ON_RESUME 0xA4 -#define NORMAL_DISPLAY 0xA6 -#define INVERT_DISPLAY 0xA7 -#define DISPLAY_ON 0xAF -#define DISPLAY_OFF 0xAE -#define NOP 0xE3 - -// Scrolling Commands -#define ACTIVATE_SCROLL 0x2F -#define DEACTIVATE_SCROLL 0x2E -#define SCROLL_RIGHT 0x26 -#define SCROLL_LEFT 0x27 -#define SCROLL_RIGHT_UP 0x29 -#define SCROLL_LEFT_UP 0x2A - -// Addressing Setting Commands -#define MEMORY_MODE 0x20 -#define COLUMN_ADDR 0x21 -#define PAGE_ADDR 0x22 -#define PAM_SETCOLUMN_LSB 0x00 -#define PAM_SETCOLUMN_MSB 0x10 -#define PAM_PAGE_ADDR 0xB0 // 0xb0 -- 0xb7 - -// Hardware Configuration Commands -#define DISPLAY_START_LINE 0x40 -#define SEGMENT_REMAP 0xA0 -#define SEGMENT_REMAP_INV 0xA1 -#define MULTIPLEX_RATIO 0xA8 -#define COM_SCAN_INC 0xC0 -#define COM_SCAN_DEC 0xC8 -#define DISPLAY_OFFSET 0xD3 -#define COM_PINS 0xDA -#define COM_PINS_SEQ 0x02 -#define COM_PINS_ALT 0x12 -#define COM_PINS_SEQ_LR 0x22 -#define COM_PINS_ALT_LR 0x32 - -// Timing & Driving Commands -#define DISPLAY_CLOCK 0xD5 -#define PRE_CHARGE_PERIOD 0xD9 -#define VCOM_DETECT 0xDB - -// Advance Graphic Commands -#define FADE_BLINK 0x23 -#define ENABLE_FADE 0x20 -#define ENABLE_BLINK 0x30 - -// Charge Pump Commands -#define CHARGE_PUMP 0x8D - -// Commands specific to the SH1107 chip -#define SH1107_DISPLAY_START_LINE 0xDC -#define SH1107_MEMORY_MODE_PAGE 0x20 -#define SH1107_MEMORY_MODE_VERTICAL 0x21 - -// Misc defines -#ifndef OLED_BLOCK_COUNT -# define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8) -#endif -#ifndef OLED_BLOCK_SIZE -# define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT) -#endif - -#define OLED_ALL_BLOCKS_MASK (((((OLED_BLOCK_TYPE)1 << (OLED_BLOCK_COUNT - 1)) - 1) << 1) | 1) - -#ifndef OLED_COM_PIN_COUNT -# define OLED_COM_PIN_COUNT 128 -#endif - -#ifndef OLED_COM_PIN_OFFSET -# define OLED_COM_PIN_OFFSET 0 -#endif - -// i2c defines -#define I2C_CMD 0x00 -#define I2C_DATA 0x40 -#if defined(__AVR__) -# define I2C_TRANSMIT_P(data) i2c_transmit_P((OLED_DISPLAY_ADDRESS << 1), &data[0], sizeof(data), OLED_I2C_TIMEOUT) -#else // defined(__AVR__) -# define I2C_TRANSMIT_P(data) i2c_transmit((OLED_DISPLAY_ADDRESS << 1), &data[0], sizeof(data), OLED_I2C_TIMEOUT) -#endif // defined(__AVR__) -#define I2C_TRANSMIT(data) i2c_transmit((OLED_DISPLAY_ADDRESS << 1), &data[0], sizeof(data), OLED_I2C_TIMEOUT) -#define I2C_WRITE_REG(mode, data, size) i2c_writeReg((OLED_DISPLAY_ADDRESS << 1), mode, data, size, OLED_I2C_TIMEOUT) - -#define HAS_FLAGS(bits, flags) ((bits & flags) == flags) - -// Display buffer's is the same as the OLED memory layout -// this is so we don't end up with rounding errors with -// parts of the display unusable or don't get cleared correctly -// and also allows for drawing & inverting -uint8_t oled_buffer[OLED_MATRIX_SIZE]; -uint8_t *oled_cursor; -OLED_BLOCK_TYPE oled_dirty = 0; -bool oled_initialized = false; -bool oled_active = false; -bool oled_scrolling = false; -bool oled_inverted = false; -uint8_t oled_brightness = OLED_BRIGHTNESS; -oled_rotation_t oled_rotation = 0; -uint8_t oled_rotation_width = 0; -uint8_t oled_scroll_speed = 0; // this holds the speed after being remapped to ssd1306 internal values -uint8_t oled_scroll_start = 0; -uint8_t oled_scroll_end = 7; -#if OLED_TIMEOUT > 0 -uint32_t oled_timeout; -#endif -#if OLED_SCROLL_TIMEOUT > 0 -uint32_t oled_scroll_timeout; -#endif -#if OLED_UPDATE_INTERVAL > 0 -uint16_t oled_update_timeout; -#endif - -// Internal variables to reduce math instructions - -#if defined(__AVR__) -// identical to i2c_transmit, but for PROGMEM since all initialization is in PROGMEM arrays currently -// probably should move this into i2c_master... -static i2c_status_t i2c_transmit_P(uint8_t address, const uint8_t *data, uint16_t length, uint16_t timeout) { - i2c_status_t status = i2c_start(address | I2C_WRITE, timeout); - - for (uint16_t i = 0; i < length && status >= 0; i++) { - status = i2c_write(pgm_read_byte((const char *)data++), timeout); - if (status) break; - } - - i2c_stop(); - - return status; -} -#endif - -// Flips the rendering bits for a character at the current cursor position -static void InvertCharacter(uint8_t *cursor) { - const uint8_t *end = cursor + OLED_FONT_WIDTH; - while (cursor < end) { - *cursor = ~(*cursor); - cursor++; - } -} - -bool oled_init(oled_rotation_t rotation) { -#if defined(USE_I2C) && defined(SPLIT_KEYBOARD) - if (!is_keyboard_master()) { - return true; - } -#endif - - oled_rotation = oled_init_user(oled_init_kb(rotation)); - if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { - oled_rotation_width = OLED_DISPLAY_WIDTH; - } else { - oled_rotation_width = OLED_DISPLAY_HEIGHT; - } - i2c_init(); - - static const uint8_t PROGMEM display_setup1[] = { - I2C_CMD, - DISPLAY_OFF, - DISPLAY_CLOCK, - 0x80, - MULTIPLEX_RATIO, - OLED_DISPLAY_WIDTH - 1, - SH1107_DISPLAY_START_LINE, - 0x00, - CHARGE_PUMP, - 0x14, - SH1107_MEMORY_MODE_PAGE, - }; - if (I2C_TRANSMIT_P(display_setup1) != I2C_STATUS_SUCCESS) { - print("oled_init cmd set 1 failed\n"); - return false; - } - - if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_180)) { - static const uint8_t PROGMEM display_normal[] = { - I2C_CMD, - SEGMENT_REMAP_INV, - COM_SCAN_DEC, - DISPLAY_OFFSET, - OLED_COM_PIN_OFFSET, - }; - if (I2C_TRANSMIT_P(display_normal) != I2C_STATUS_SUCCESS) { - print("oled_init cmd normal rotation failed\n"); - return false; - } - } else { - static const uint8_t PROGMEM display_flipped[] = { - I2C_CMD, - SEGMENT_REMAP, - COM_SCAN_INC, - DISPLAY_OFFSET, - (OLED_COM_PIN_COUNT - OLED_COM_PIN_OFFSET) % OLED_COM_PIN_COUNT, - }; - if (I2C_TRANSMIT_P(display_flipped) != I2C_STATUS_SUCCESS) { - print("display_flipped failed\n"); - return false; - } - } - - static const uint8_t PROGMEM display_setup2[] = { - I2C_CMD, COM_PINS, - OLED_COM_PINS, - CONTRAST, OLED_BRIGHTNESS, - PRE_CHARGE_PERIOD, 0x22, - VCOM_DETECT, 0x35, - DISPLAY_ALL_ON_RESUME, - NORMAL_DISPLAY, - DEACTIVATE_SCROLL, - DISPLAY_ON - }; - if (I2C_TRANSMIT_P(display_setup2) != I2C_STATUS_SUCCESS) { - print("display_setup2 failed\n"); - return false; - } - -#if OLED_TIMEOUT > 0 - oled_timeout = timer_read32() + OLED_TIMEOUT; -#endif -#if OLED_SCROLL_TIMEOUT > 0 - oled_scroll_timeout = timer_read32() + OLED_SCROLL_TIMEOUT; -#endif - - oled_clear(); - oled_initialized = true; - oled_active = true; - oled_scrolling = false; - return true; -} - -__attribute__((weak)) oled_rotation_t oled_init_kb(oled_rotation_t rotation) { - return rotation; -} -__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { - return rotation; -} - -void oled_clear(void) { - memset(oled_buffer, 0, sizeof(oled_buffer)); - oled_cursor = &oled_buffer[0]; - oled_dirty = OLED_ALL_BLOCKS_MASK; -} - -static void calc_bounds(uint8_t update_start, uint8_t *cmd_array) { - // Calculate commands to set memory addressing bounds. - uint8_t start_page = OLED_BLOCK_SIZE * update_start / OLED_DISPLAY_WIDTH; - uint8_t start_column = OLED_BLOCK_SIZE * update_start % OLED_DISPLAY_WIDTH; - // Commands for Page Addressing Mode. Sets starting page and column; has no end bound. - // Column value must be split into high and low nybble and sent as two commands. - cmd_array[0] = PAM_PAGE_ADDR | start_page; - cmd_array[1] = PAM_SETCOLUMN_LSB | ((OLED_COLUMN_OFFSET + start_column) & 0x0f); - cmd_array[2] = PAM_SETCOLUMN_MSB | ((OLED_COLUMN_OFFSET + start_column) >> 4 & 0x0f); -} - -static void calc_bounds_90(uint8_t update_start, uint8_t *cmd_array) { - // Block numbering starts from the bottom left corner, going up and then to - // the right. The controller needs the page and column numbers for the top - // left and bottom right corners of that block. - - // Total number of pages across the screen height. - const uint8_t height_in_pages = OLED_DISPLAY_HEIGHT / 8; - - // Difference of starting page numbers for adjacent blocks; may be 0 if - // blocks are large enough to occupy one or more whole 8px columns. - const uint8_t page_inc_per_block = OLED_BLOCK_SIZE % OLED_DISPLAY_HEIGHT / 8; - - // Top page number for a block which is at the bottom edge of the screen. - const uint8_t bottom_block_top_page = (height_in_pages - page_inc_per_block) % height_in_pages; - - // Only the Page Addressing Mode is supported - uint8_t start_page = bottom_block_top_page - (OLED_BLOCK_SIZE * update_start % OLED_DISPLAY_HEIGHT / 8); - uint8_t start_column = OLED_BLOCK_SIZE * update_start / OLED_DISPLAY_HEIGHT * 8; - cmd_array[0] = PAM_PAGE_ADDR | start_page; - cmd_array[1] = PAM_SETCOLUMN_LSB | ((OLED_COLUMN_OFFSET + start_column) & 0x0f); - cmd_array[2] = PAM_SETCOLUMN_MSB | ((OLED_COLUMN_OFFSET + start_column) >> 4 & 0x0f); -} - -uint8_t crot(uint8_t a, int8_t n) { - const uint8_t mask = 0x7; - n &= mask; - return a << n | a >> (-n & mask); -} - -static void rotate_90(const uint8_t *src, uint8_t *dest) { - for (uint8_t i = 0, shift = 7; i < 8; ++i, --shift) { - uint8_t selector = (1 << i); - for (uint8_t j = 0; j < 8; ++j) { - dest[i] |= crot(src[j] & selector, shift - (int8_t)j); - } - } -} - -void oled_render(void) { - // Do we have work to do? - oled_dirty &= OLED_ALL_BLOCKS_MASK; - if (!oled_dirty || !oled_initialized || oled_scrolling) { - return; - } - - // Turn on display if it is off - oled_on(); - - uint8_t update_start = 0; - uint8_t num_processed = 0; - while (oled_dirty && num_processed++ < OLED_UPDATE_PROCESS_LIMIT) { // render all dirty blocks (up to the configured limit) - // Find next dirty block - while (!(oled_dirty & ((OLED_BLOCK_TYPE)1 << update_start))) { - ++update_start; - } - - // Set column & page position - static uint8_t display_start[] = {I2C_CMD, PAM_PAGE_ADDR, PAM_SETCOLUMN_LSB, PAM_SETCOLUMN_MSB}; - if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { - calc_bounds(update_start, &display_start[1]); // Offset from I2C_CMD byte at the start - } else { - calc_bounds_90(update_start, &display_start[1]); // Offset from I2C_CMD byte at the start - } - - // Send column & page position - if (I2C_TRANSMIT(display_start) != I2C_STATUS_SUCCESS) { - print("oled_render offset command failed\n"); - return; - } - - if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { - // Send render data chunk as is - if (I2C_WRITE_REG(I2C_DATA, &oled_buffer[OLED_BLOCK_SIZE * update_start], OLED_BLOCK_SIZE) != I2C_STATUS_SUCCESS) { - print("oled_render data failed\n"); - return; - } - } else { - // Rotate the render chunks - const static uint8_t source_map[] = OLED_SOURCE_MAP; - const static uint8_t target_map[] = OLED_TARGET_MAP; - - static uint8_t temp_buffer[OLED_BLOCK_SIZE]; - memset(temp_buffer, 0, sizeof(temp_buffer)); - for (uint8_t i = 0; i < sizeof(source_map); ++i) { - rotate_90(&oled_buffer[OLED_BLOCK_SIZE * update_start + source_map[i]], &temp_buffer[target_map[i]]); - } - - // For SH1106 or SH1107 the data chunk must be split into separate pieces for each page - const uint8_t columns_in_block = (OLED_BLOCK_SIZE + OLED_DISPLAY_HEIGHT - 1) / OLED_DISPLAY_HEIGHT * 8; - const uint8_t num_pages = OLED_BLOCK_SIZE / columns_in_block; - for (uint8_t i = 0; i < num_pages; ++i) { - // Send column & page position for all pages except the first one - if (i > 0) { - display_start[1]++; - if (I2C_TRANSMIT(display_start) != I2C_STATUS_SUCCESS) { - print("oled_render offset command failed\n"); - return; - } - } - // Send data for the page - if (I2C_WRITE_REG(I2C_DATA, &temp_buffer[columns_in_block * i], columns_in_block) != I2C_STATUS_SUCCESS) { - print("oled_render90 data failed\n"); - return; - } - } - } - - // Clear dirty flag - oled_dirty &= ~((OLED_BLOCK_TYPE)1 << update_start); - } -} - -void oled_set_cursor(uint8_t col, uint8_t line) { - uint16_t index = line * oled_rotation_width + col * OLED_FONT_WIDTH; - - // Out of bounds? - if (index >= OLED_MATRIX_SIZE) { - index = 0; - } - - oled_cursor = &oled_buffer[index]; -} - -void oled_advance_page(bool clearPageRemainder) { - uint16_t index = oled_cursor - &oled_buffer[0]; - uint8_t remaining = oled_rotation_width - (index % oled_rotation_width); - - if (clearPageRemainder) { - // Remaining Char count - remaining = remaining / OLED_FONT_WIDTH; - - // Write empty character until next line - while (remaining--) - oled_write_char(' ', false); - } else { - // Next page index out of bounds? - if (index + remaining >= OLED_MATRIX_SIZE) { - index = 0; - remaining = 0; - } - - oled_cursor = &oled_buffer[index + remaining]; - } -} - -void oled_advance_char(void) { - uint16_t nextIndex = oled_cursor - &oled_buffer[0] + OLED_FONT_WIDTH; - uint8_t remainingSpace = oled_rotation_width - (nextIndex % oled_rotation_width); - - // Do we have enough space on the current line for the next character - if (remainingSpace < OLED_FONT_WIDTH) { - nextIndex += remainingSpace; - } - - // Did we go out of bounds - if (nextIndex >= OLED_MATRIX_SIZE) { - nextIndex = 0; - } - - // Update cursor position - oled_cursor = &oled_buffer[nextIndex]; -} - -// Main handler that writes character data to the display buffer -void oled_write_char(const char data, bool invert) { - // Advance to the next line if newline - if (data == '\n') { - // Old source wrote ' ' until end of line... - oled_advance_page(true); - return; - } - - if (data == '\r') { - oled_advance_page(false); - return; - } - - // copy the current render buffer to check for dirty after - static uint8_t oled_temp_buffer[OLED_FONT_WIDTH]; - memcpy(&oled_temp_buffer, oled_cursor, OLED_FONT_WIDTH); - - _Static_assert(sizeof(font) >= ((OLED_FONT_END + 1 - OLED_FONT_START) * OLED_FONT_WIDTH), "OLED_FONT_END references outside array"); - - // set the reder buffer data - uint8_t cast_data = (uint8_t)data; // font based on unsigned type for index - if (cast_data < OLED_FONT_START || cast_data > OLED_FONT_END) { - memset(oled_cursor, 0x00, OLED_FONT_WIDTH); - } else { - const uint8_t *glyph = &font[(cast_data - OLED_FONT_START) * OLED_FONT_WIDTH]; - memcpy_P(oled_cursor, glyph, OLED_FONT_WIDTH); - } - - // Invert if needed - if (invert) { - InvertCharacter(oled_cursor); - } - - // Dirty check - if (memcmp(&oled_temp_buffer, oled_cursor, OLED_FONT_WIDTH)) { - uint16_t index = oled_cursor - &oled_buffer[0]; - oled_dirty |= ((OLED_BLOCK_TYPE)1 << (index / OLED_BLOCK_SIZE)); - // Edgecase check if the written data spans the 2 chunks - oled_dirty |= ((OLED_BLOCK_TYPE)1 << ((index + OLED_FONT_WIDTH - 1) / OLED_BLOCK_SIZE)); - } - - // Finally move to the next char - oled_advance_char(); -} - -void oled_write(const char *data, bool invert) { - const char *end = data + strlen(data); - while (data < end) { - oled_write_char(*data, invert); - data++; - } -} - -void oled_write_ln(const char *data, bool invert) { - oled_write(data, invert); - oled_advance_page(true); -} - -void oled_pan(bool left) { - uint16_t i = 0; - for (uint16_t y = 0; y < OLED_DISPLAY_HEIGHT / 8; y++) { - if (left) { - for (uint16_t x = 0; x < OLED_DISPLAY_WIDTH - 1; x++) { - i = y * OLED_DISPLAY_WIDTH + x; - oled_buffer[i] = oled_buffer[i + 1]; - } - } else { - for (uint16_t x = OLED_DISPLAY_WIDTH - 1; x > 0; x--) { - i = y * OLED_DISPLAY_WIDTH + x; - oled_buffer[i] = oled_buffer[i - 1]; - } - } - } - oled_dirty = OLED_ALL_BLOCKS_MASK; -} - -void oled_pan_section(bool left, uint16_t y_start, uint16_t y_end, uint16_t x_start, uint16_t x_end) { - uint16_t i = 0; - for (uint16_t y = y_start; y < y_end; y++) { - if (left) { - for (uint16_t x = x_start; x < x_end - 1; x++) { - i = y * OLED_DISPLAY_WIDTH + x; - oled_buffer[i] = oled_buffer[i + 1]; - oled_dirty |= ((OLED_BLOCK_TYPE)1 << (i / OLED_BLOCK_SIZE)); - } - } else { - for (uint16_t x = x_end - 1; x > 0; x--) { - i = y * OLED_DISPLAY_WIDTH + x; - oled_buffer[i] = oled_buffer[i - 1]; - oled_dirty |= ((OLED_BLOCK_TYPE)1 << (i / OLED_BLOCK_SIZE)); - } - } - } -} - -oled_buffer_reader_t oled_read_raw(uint16_t start_index) { - if (start_index > OLED_MATRIX_SIZE) start_index = OLED_MATRIX_SIZE; - oled_buffer_reader_t ret_reader; - ret_reader.current_element = &oled_buffer[start_index]; - ret_reader.remaining_element_count = OLED_MATRIX_SIZE - start_index; - return ret_reader; -} - -void oled_write_raw_byte(const char data, uint16_t index) { - if (index > OLED_MATRIX_SIZE) index = OLED_MATRIX_SIZE; - if (oled_buffer[index] == data) return; - oled_buffer[index] = data; - oled_dirty |= ((OLED_BLOCK_TYPE)1 << (index / OLED_BLOCK_SIZE)); -} - -void oled_write_raw(const char *data, uint16_t size) { - uint16_t cursor_start_index = oled_cursor - &oled_buffer[0]; - if ((size + cursor_start_index) > OLED_MATRIX_SIZE) size = OLED_MATRIX_SIZE - cursor_start_index; - for (uint16_t i = cursor_start_index; i < cursor_start_index + size; i++) { - uint8_t c = *data++; - if (oled_buffer[i] == c) continue; - oled_buffer[i] = c; - oled_dirty |= ((OLED_BLOCK_TYPE)1 << (i / OLED_BLOCK_SIZE)); - } -} - -void oled_write_pixel(uint8_t x, uint8_t y, bool on) { - if (x >= oled_rotation_width) { - return; - } - uint16_t index = x + (y / 8) * oled_rotation_width; - if (index >= OLED_MATRIX_SIZE) { - return; - } - uint8_t data = oled_buffer[index]; - if (on) { - data |= (1 << (y % 8)); - } else { - data &= ~(1 << (y % 8)); - } - if (oled_buffer[index] != data) { - oled_buffer[index] = data; - oled_dirty |= ((OLED_BLOCK_TYPE)1 << (index / OLED_BLOCK_SIZE)); - } -} - -#if defined(__AVR__) -void oled_write_P(const char *data, bool invert) { - uint8_t c = pgm_read_byte(data); - while (c != 0) { - oled_write_char(c, invert); - c = pgm_read_byte(++data); - } -} - -void oled_write_ln_P(const char *data, bool invert) { - oled_write_P(data, invert); - oled_advance_page(true); -} - -void oled_write_raw_P(const char *data, uint16_t size) { - uint16_t cursor_start_index = oled_cursor - &oled_buffer[0]; - if ((size + cursor_start_index) > OLED_MATRIX_SIZE) size = OLED_MATRIX_SIZE - cursor_start_index; - for (uint16_t i = cursor_start_index; i < cursor_start_index + size; i++) { - uint8_t c = pgm_read_byte(data++); - if (oled_buffer[i] == c) continue; - oled_buffer[i] = c; - oled_dirty |= ((OLED_BLOCK_TYPE)1 << (i / OLED_BLOCK_SIZE)); - } -} -#endif // defined(__AVR__) - -bool oled_on(void) { - if (!oled_initialized) { - return oled_active; - } - -#if OLED_TIMEOUT > 0 - oled_timeout = timer_read32() + OLED_TIMEOUT; -#endif - - static const uint8_t PROGMEM display_on[] = -#ifdef OLED_FADE_OUT - {I2C_CMD, FADE_BLINK, 0x00}; -#else - {I2C_CMD, DISPLAY_ON}; -#endif - - if (!oled_active) { - if (I2C_TRANSMIT_P(display_on) != I2C_STATUS_SUCCESS) { - print("oled_on cmd failed\n"); - return oled_active; - } - oled_active = true; - } - return oled_active; -} - -bool oled_off(void) { - if (!oled_initialized) { - return !oled_active; - } - - static const uint8_t PROGMEM display_off[] = -#ifdef OLED_FADE_OUT - {I2C_CMD, FADE_BLINK, ENABLE_FADE | OLED_FADE_OUT_INTERVAL}; -#else - {I2C_CMD, DISPLAY_OFF}; -#endif - - if (oled_active) { - if (I2C_TRANSMIT_P(display_off) != I2C_STATUS_SUCCESS) { - print("oled_off cmd failed\n"); - return oled_active; - } - oled_active = false; - } - return !oled_active; -} - -bool is_oled_on(void) { - return oled_active; -} - -uint8_t oled_set_brightness(uint8_t level) { - if (!oled_initialized) { - return oled_brightness; - } - - uint8_t set_contrast[] = {I2C_CMD, CONTRAST, level}; - if (oled_brightness != level) { - if (I2C_TRANSMIT(set_contrast) != I2C_STATUS_SUCCESS) { - print("set_brightness cmd failed\n"); - return oled_brightness; - } - oled_brightness = level; - } - return oled_brightness; -} - -uint8_t oled_get_brightness(void) { - return oled_brightness; -} - -// Set the specific 8 lines rows of the screen to scroll. -// 0 is the default for start, and 7 for end, which is the entire -// height of the screen. For 128x32 screens, rows 4-7 are not used. -void oled_scroll_set_area(uint8_t start_line, uint8_t end_line) { - oled_scroll_start = start_line; - oled_scroll_end = end_line; -} - -void oled_scroll_set_speed(uint8_t speed) { - // Sets the speed for scrolling... does not take effect - // until scrolling is either started or restarted - // the ssd1306 supports 8 speeds - // FrameRate2 speed = 7 - // FrameRate3 speed = 4 - // FrameRate4 speed = 5 - // FrameRate5 speed = 0 - // FrameRate25 speed = 6 - // FrameRate64 speed = 1 - // FrameRate128 speed = 2 - // FrameRate256 speed = 3 - // for ease of use these are remaped here to be in order - static const uint8_t scroll_remap[8] = {7, 4, 5, 0, 6, 1, 2, 3}; - oled_scroll_speed = scroll_remap[speed]; -} - -bool oled_scroll_right(void) { - if (!oled_initialized) { - return oled_scrolling; - } - - // Dont enable scrolling if we need to update the display - // This prevents scrolling of bad data from starting the scroll too early after init - if (!oled_dirty && !oled_scrolling) { - uint8_t display_scroll_right[] = {I2C_CMD, SCROLL_RIGHT, 0x00, oled_scroll_start, oled_scroll_speed, oled_scroll_end, 0x00, 0xFF, ACTIVATE_SCROLL}; - if (I2C_TRANSMIT(display_scroll_right) != I2C_STATUS_SUCCESS) { - print("oled_scroll_right cmd failed\n"); - return oled_scrolling; - } - oled_scrolling = true; - } - return oled_scrolling; -} - -bool oled_scroll_left(void) { - if (!oled_initialized) { - return oled_scrolling; - } - - // Dont enable scrolling if we need to update the display - // This prevents scrolling of bad data from starting the scroll too early after init - if (!oled_dirty && !oled_scrolling) { - uint8_t display_scroll_left[] = {I2C_CMD, SCROLL_LEFT, 0x00, oled_scroll_start, oled_scroll_speed, oled_scroll_end, 0x00, 0xFF, ACTIVATE_SCROLL}; - if (I2C_TRANSMIT(display_scroll_left) != I2C_STATUS_SUCCESS) { - print("oled_scroll_left cmd failed\n"); - return oled_scrolling; - } - oled_scrolling = true; - } - return oled_scrolling; -} - -bool oled_scroll_off(void) { - if (!oled_initialized) { - return !oled_scrolling; - } - - if (oled_scrolling) { - static const uint8_t PROGMEM display_scroll_off[] = {I2C_CMD, DEACTIVATE_SCROLL}; - if (I2C_TRANSMIT_P(display_scroll_off) != I2C_STATUS_SUCCESS) { - print("oled_scroll_off cmd failed\n"); - return oled_scrolling; - } - oled_scrolling = false; - oled_dirty = OLED_ALL_BLOCKS_MASK; - } - return !oled_scrolling; -} - -bool is_oled_scrolling(void) { - return oled_scrolling; -} - -bool oled_invert(bool invert) { - if (!oled_initialized) { - return oled_inverted; - } - - if (invert && !oled_inverted) { - static const uint8_t PROGMEM display_inverted[] = {I2C_CMD, INVERT_DISPLAY}; - if (I2C_TRANSMIT_P(display_inverted) != I2C_STATUS_SUCCESS) { - print("oled_invert cmd failed\n"); - return oled_inverted; - } - oled_inverted = true; - } else if (!invert && oled_inverted) { - static const uint8_t PROGMEM display_normal[] = {I2C_CMD, NORMAL_DISPLAY}; - if (I2C_TRANSMIT_P(display_normal) != I2C_STATUS_SUCCESS) { - print("oled_invert cmd failed\n"); - return oled_inverted; - } - oled_inverted = false; - } - - return oled_inverted; -} - -uint8_t oled_max_chars(void) { - if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { - return OLED_DISPLAY_WIDTH / OLED_FONT_WIDTH; - } - return OLED_DISPLAY_HEIGHT / OLED_FONT_WIDTH; -} - -uint8_t oled_max_lines(void) { - if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { - return OLED_DISPLAY_HEIGHT / OLED_FONT_HEIGHT; - } - return OLED_DISPLAY_WIDTH / OLED_FONT_HEIGHT; -} - -void oled_task(void) { - if (!oled_initialized) { - return; - } - -#if OLED_UPDATE_INTERVAL > 0 - if (timer_elapsed(oled_update_timeout) >= OLED_UPDATE_INTERVAL) { - oled_update_timeout = timer_read(); - oled_set_cursor(0, 0); - oled_task_kb(); - } -#else - oled_set_cursor(0, 0); - oled_task_kbr(); -#endif - -#if OLED_SCROLL_TIMEOUT > 0 - if (oled_dirty && oled_scrolling) { - oled_scroll_timeout = timer_read32() + OLED_SCROLL_TIMEOUT; - oled_scroll_off(); - } -#endif - - // Smart render system, no need to check for dirty - oled_render(); - - // Display timeout check -#if OLED_TIMEOUT > 0 - if (oled_active && timer_expired32(timer_read32(), oled_timeout)) { - oled_off(); - } -#endif - -#if OLED_SCROLL_TIMEOUT > 0 - if (!oled_scrolling && timer_expired32(timer_read32(), oled_scroll_timeout)) { -# ifdef OLED_SCROLL_TIMEOUT_RIGHT - oled_scroll_right(); -# else - oled_scroll_left(); -# endif - } -#endif -} - -__attribute__((weak)) bool oled_task_kb(void) { - return oled_task_user(); -} -__attribute__((weak)) bool oled_task_user(void) { - return true; -} diff --git a/users/drashna/pointing/pointing.c b/users/drashna/pointing/pointing.c index 18dad0da816f..82cc5a3aa6fa 100644 --- a/users/drashna/pointing/pointing.c +++ b/users/drashna/pointing/pointing.c @@ -35,12 +35,11 @@ report_mouse_t pointing_device_task_user(report_mouse_t mouse_report) { mouse_report.y = 0; if (x != 0 && y != 0 && (timer_elapsed(mouse_debounce_timer) > TAP_CHECK)) { -#ifdef OLED_ENABLE - oled_timer_reset(); -#endif if (enable_acceleration) { - x = (mouse_xy_report_t)(x > 0 ? pow(4, x) / 2 + x : -pow(4, abs(x)) / 2 + x); - y = (mouse_xy_report_t)(y > 0 ? pow(5, y) / 2 + y : -pow(5, abs(y)) / 2 + y); + float magnitude = sqrtf( mouse_report.x * mouse_report.x + mouse_report.y * mouse_report.y ); + float adjusted_magnitude = powf(magnitude, 1.2f); + x = (mouse_xy_report_t)(x * adjusted_magnitude); + y = (mouse_xy_report_t)(y * adjusted_magnitude); // x = (mouse_xy_report_t)(x > 0 ? x * x / 16 + x : -x * x / 16 + x); // y = (mouse_xy_report_t)(y > 0 ? y * y / 16 + y : -y * y / 16 + y); } @@ -56,6 +55,12 @@ bool process_record_pointing(uint16_t keycode, keyrecord_t* record) { case KC_ACCEL: enable_acceleration = record->event.pressed; break; +#if defined(POINTING_DEVICE_MOUSE_JIGGLER_ENABLE) + case PD_JIGGLER: + if (record->event.pressed) { + pointing_device_mouse_jiggler_toggle(); + } +#endif default: mouse_debounce_timer = timer_read(); break; @@ -73,6 +78,24 @@ layer_state_t layer_state_set_pointing(layer_state_t state) { return state; } +#if defined(POINTING_DEVICE_MOUSE_JIGGLER_ENABLE) +static uint16_t mouse_jiggler_timer; + +bool has_mouse_report_changed(report_mouse_t* new_report, report_mouse_t* old_report) { + // Only report every 5 seconds. + if (userspace_config.mouse_jiggler && timer_elapsed(mouse_jiggler_timer) > 5000) { + mouse_jiggler_timer = timer_read(); + return true; + } + return memcmp(new_report, old_report, sizeof(report_mouse_t)); +} + +void pointing_device_mouse_jiggler_toggle(void) { + mouse_jiggler_timer = timer_read(); + userspace_config.mouse_jiggler = !userspace_config.mouse_jiggler; +} + +#endif #if defined(POINTING_DEVICE_AUTO_MOUSE_ENABLE) __attribute__((weak)) bool is_mouse_record_keymap(uint16_t keycode, keyrecord_t *record) { return false; } diff --git a/users/drashna/pointing/pointing.h b/users/drashna/pointing/pointing.h index 28d8610148fd..c97ce5b2dbb1 100644 --- a/users/drashna/pointing/pointing.h +++ b/users/drashna/pointing/pointing.h @@ -8,3 +8,4 @@ report_mouse_t pointing_device_task_keymap(report_mouse_t mouse_report); void matrix_scan_pointing(void); bool process_record_pointing(uint16_t keycode, keyrecord_t* record); layer_state_t layer_state_set_pointing(layer_state_t state); +void pointing_device_mouse_jiggler_toggle(void); diff --git a/users/drashna/post_config.h b/users/drashna/post_config.h index 85ce0e310811..5a2dfb663714 100644 --- a/users/drashna/post_config.h +++ b/users/drashna/post_config.h @@ -121,7 +121,7 @@ # ifndef MOUSEKEY_WHEEL_DECELERATED_MOVEMENTS # define MOUSEKEY_WHEEL_DECELERATED_MOVEMENTS 8 # endif -#endif // MOUSEKEY_ENABLE +#endif // MOUSEKEY_ENABLE #define MOUSE_EXTENDED_REPORT @@ -134,7 +134,7 @@ #endif #if defined(SPLIT_KEYBOARD) && defined(PROTOCOL_CHIBIOS) && !defined(USB_SUSPEND_WAKEUP_DELAY) -# define USB_SUSPEND_WAKEUP_DELAY 200 +# define USB_SUSPEND_WAKEUP_DELAY 500 #endif #if defined(XAP_ENABLE) && !defined(__AVR__) diff --git a/users/drashna/rgb/rgb_matrix_config.h b/users/drashna/rgb/rgb_matrix_config.h index 86f238f3923d..bc2c04d981b8 100644 --- a/users/drashna/rgb/rgb_matrix_config.h +++ b/users/drashna/rgb/rgb_matrix_config.h @@ -6,7 +6,7 @@ #define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot) // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened) #define RGB_MATRIX_FRAMEBUFFER_EFFECTS -// # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #undef ENABLE_RGB_MATRIX_ALPHAS_MODS #undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN diff --git a/users/drashna/rgb/rgb_matrix_stuff.c b/users/drashna/rgb/rgb_matrix_stuff.c index eff9191eb749..588e51daf925 100644 --- a/users/drashna/rgb/rgb_matrix_stuff.c +++ b/users/drashna/rgb/rgb_matrix_stuff.c @@ -74,7 +74,7 @@ bool process_record_user_rgb_matrix(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { userspace_config.rgb_matrix_idle_anim ^= 1; dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim); - eeconfig_update_user(userspace_config.raw); + eeconfig_update_user_config(&userspace_config.raw); if (userspace_config.rgb_matrix_idle_anim) { rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP); } @@ -146,3 +146,45 @@ __attribute__((weak)) bool rgb_matrix_indicators_keymap(void) { bool rgb_matrix_indicators_user(void) { return rgb_matrix_indicators_keymap(); } + + +//---------------------------------------------------------- +// RGB Matrix naming +#include + +#if defined(RGB_MATRIX_EFFECT) +# undef RGB_MATRIX_EFFECT +#endif // defined(RGB_MATRIX_EFFECT) + +#define RGB_MATRIX_EFFECT(x) RGB_MATRIX_EFFECT_##x, +enum { + RGB_MATRIX_EFFECT_NONE, +#include "rgb_matrix_effects.inc" +#undef RGB_MATRIX_EFFECT +#ifdef RGB_MATRIX_CUSTOM_KB +# include "rgb_matrix_kb.inc" +#endif +#ifdef RGB_MATRIX_CUSTOM_USER +# include "rgb_matrix_user.inc" +#endif +}; + +#define RGB_MATRIX_EFFECT(x) \ + case RGB_MATRIX_EFFECT_##x: \ + return #x; +const char* rgb_matrix_name(uint8_t effect) { + switch (effect) { + case RGB_MATRIX_EFFECT_NONE: + return "NONE"; +#include "rgb_matrix_effects.inc" +#undef RGB_MATRIX_EFFECT +#ifdef RGB_MATRIX_CUSTOM_KB +# include "rgb_matrix_kb.inc" +#endif +#ifdef RGB_MATRIX_CUSTOM_USER +# include "rgb_matrix_user.inc" +#endif + default: + return "UNKNOWN"; + } +} diff --git a/users/drashna/rgb/rgb_matrix_stuff.h b/users/drashna/rgb/rgb_matrix_stuff.h index 9559134c8cc6..80770bf40f3e 100644 --- a/users/drashna/rgb/rgb_matrix_stuff.h +++ b/users/drashna/rgb/rgb_matrix_stuff.h @@ -13,3 +13,5 @@ void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode bool rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max); bool rgb_matrix_indicators_keymap(void); + +const char* rgb_matrix_name(uint8_t effect); diff --git a/users/drashna/rgb/rgb_stuff.c b/users/drashna/rgb/rgb_stuff.c index c283e58d26d3..cc85425aff2f 100644 --- a/users/drashna/rgb/rgb_stuff.c +++ b/users/drashna/rgb/rgb_stuff.c @@ -11,6 +11,9 @@ void rgblight_sethsv_default_helper(uint8_t index) { rgblight_sethsv_at(rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val(), index); } void rgblight_set_hsv_and_mode(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode) { + if (val > RGBLIGHT_LIMIT_VAL) { + val = RGBLIGHT_LIMIT_VAL; + } rgblight_sethsv_noeeprom(hue, sat, val); // wait_us(175); // Add a slight delay between color and mode to ensure it's processed correctly rgblight_mode_noeeprom(mode); @@ -48,6 +51,15 @@ uint32_t rgb_startup_animation(uint32_t triger_time, void *cb_arg) { } #endif +bool is_rgblight_startup_running(void) { +#if defined(RGBLIGHT_STARTUP_ANIMATION) + return is_rgblight_startup && is_keyboard_master(); +#else + return false; +#endif +} + + void keyboard_post_init_rgb_light(void) { #if defined(RGBLIGHT_STARTUP_ANIMATION) is_enabled = rgblight_is_enabled(); @@ -121,3 +133,33 @@ layer_state_t default_layer_state_set_rgb_light(layer_state_t state) { } return state; } + +#define _RGBM_SINGLE_STATIC(sym) \ + case RGBLIGHT_MODE_##sym: \ + return #sym; +#define _RGBM_SINGLE_DYNAMIC(sym) \ + case RGBLIGHT_MODE_##sym: \ + return #sym; +#define _RGBM_MULTI_STATIC(sym) \ + case RGBLIGHT_MODE_##sym: \ + return #sym; +#define _RGBM_MULTI_DYNAMIC(sym) \ + case RGBLIGHT_MODE_##sym: \ + return #sym; +#define _RGBM_TMP_STATIC(sym, msym) \ + case RGBLIGHT_MODE_##sym: \ + return #msym; +#define _RGBM_TMP_DYNAMIC(sym, msym) \ + case RGBLIGHT_MODE_##sym: \ + return #msym; + + +const char* rgblight_name(uint8_t effect) { + switch (effect) { +#include "rgblight_modes.h" + case 0: + return "Off"; + default: + return "UNKNOWN"; + } +} diff --git a/users/drashna/rgb/rgb_stuff.h b/users/drashna/rgb/rgb_stuff.h index d720275b60b5..f76c591e0312 100644 --- a/users/drashna/rgb/rgb_stuff.h +++ b/users/drashna/rgb/rgb_stuff.h @@ -10,3 +10,6 @@ void matrix_scan_rgb_light(void); layer_state_t layer_state_set_rgb_light(layer_state_t state); layer_state_t default_layer_state_set_rgb_light(layer_state_t state); void rgblight_sethsv_default_helper(uint8_t index); + +const char* rgblight_name(uint8_t effect); +bool is_rgblight_startup_running(void); diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk index 43186b024ae4..6287d6e78c92 100644 --- a/users/drashna/rules.mk +++ b/users/drashna/rules.mk @@ -1,11 +1,21 @@ SRC += $(USER_PATH)/drashna.c \ $(USER_PATH)/callbacks.c \ $(USER_PATH)/keyrecords/process_records.c \ - $(USER_PATH)/keyrecords/tapping.c + $(USER_PATH)/keyrecords/tapping.c \ + $(USER_PATH)/eeconfig_users.c # TOP_SYMBOLS = yes -ifneq ($(PLATFORM),CHIBIOS) +DEBOUNCE_TYPE = asym_eager_defer_pk +DEFERRED_EXEC_ENABLE = yes +OS_DETECTION_ENABLE = yes + +ifeq ($(PLATFORM),CHIBIOS) + # cortex-m4 has DSP+FPU support, so use hack to enable it for lib8tion + ifeq ($(strip $(MCU)), cortex-m4) + OPT_DEFS += -DFASTLED_TEENSY3 + endif +else ifneq ($(strip $(LTO_SUPPORTED)), no) LTO_ENABLE = yes endif @@ -14,16 +24,7 @@ ifneq ($(PLATFORM),CHIBIOS) endif # DEBUG_MATRIX_SCAN_RATE_ENABLE = api -ifneq ($(strip $(NO_SECRETS)), yes) - ifneq ("$(wildcard $(USER_PATH)/../../../qmk_secrets/secrets.c)","") - SRC += $(USER_PATH)/../../../qmk_secrets/secrets.c - $(shell touch $(USER_PATH)/../../../qmk_secrets/secrets.c) - SECURE_ENABLE = yes - endif - ifeq ($(strip $(NO_SECRETS)), lite) - OPT_DEFS += -DNO_SECRETS - endif -endif +-include $(USER_PATH)/../../../qmk_secrets/rules.mk ifeq ($(strip $(MAKE_BOOTLOADER)), yes) OPT_DEFS += -DMAKE_BOOTLOADER @@ -67,7 +68,6 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) endif ifeq ($(strip $(RGBLIGHT_STARTUP_ANIMATION)), yes) OPT_DEFS += -DRGBLIGHT_STARTUP_ANIMATION - DEFERRED_EXEC_ENABLE = yes endif endif endif @@ -92,23 +92,7 @@ ifeq ($(strip $(I2C_SCANNER_ENABLE)), yes) CONSOLE_ENABLE := yes endif -CUSTOM_OLED_DRIVER ?= yes -ifeq ($(strip $(OLED_ENABLE)), yes) - ifeq ($(strip $(OLED_DRIVER)), custom) - OPT_DEFS += -DOLED_ENABLE \ - -DOLED_DRIVER_SH1107 - SRC += $(USER_PATH)/oled/sh110x.c - QUANTUM_LIB_SRC += i2c_master.c - endif - ifeq ($(strip $(CUSTOM_OLED_DRIVER)), yes) - OPT_DEFS += -DCUSTOM_OLED_DRIVER - SRC += $(USER_PATH)/oled/oled_stuff.c - endif - ifeq ($(strip $(OLED_DISPLAY_TEST)), yes) - OPT_DEFS += -DOLED_DISPLAY_TEST - endif - DEFERRED_EXEC_ENABLE = yes -endif +-include $(USER_PATH)/oled/rules.mk CUSTOM_POINTING_DEVICE ?= yes ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes) @@ -117,6 +101,10 @@ ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes) OPT_DEFS += -DCUSTOM_POINTING_DEVICE OPT_DEFS += -DPOINTING_DEVICE_AUTO_MOUSE_ENABLE endif + POINTING_DEVICE_MOUSE_JIGGLER_ENABLE ?= yes + ifeq ($(strip $(POINTING_DEVICE_MOUSE_JIGGLER_ENABLE)), yes) + OPT_DEFS += -DPOINTING_DEVICE_MOUSE_JIGGLER_ENABLE + endif endif CUSTOM_SPLIT_TRANSPORT_SYNC ?= yes @@ -128,10 +116,6 @@ ifeq ($(strip $(CUSTOM_SPLIT_TRANSPORT_SYNC)), yes) endif -ifeq ($(strip $(AUTOCORRECTION_ENABLE)), yes) - AUTOCORRECT_ENABLE = yes -endif - CUSTOM_BOOTMAGIC_ENABLE ?= yes ifeq ($(strip $(CUSTOM_BOOTMAGIC_ENABLE)), yes) ifeq ($(strip $(BOOTMAGIC_ENABLE)), yes) @@ -139,7 +123,14 @@ ifeq ($(strip $(CUSTOM_BOOTMAGIC_ENABLE)), yes) endif endif -OS_DETECTION_ENABLE ?= yes -ifeq ($(strip $(OS_DETECTION_ENABLE)), yes) - DEFERRED_EXEC_ENABLE = yes +CUSTOM_DYNAMIC_MACROS_ENABLE ?= no +ifeq ($(strip $(CUSTOM_DYNAMIC_MACROS_ENABLE)), yes) + SRC += $(USER_PATH)/keyrecords/dynamic_macros.c + OPT_DEFS += -DCUSTOM_DYNAMIC_MACROS_ENABLE +endif + +ifeq ($(strip $(HARDWARE_DEBUG_ENABLE)), yes) + LTO_ENABLE := no + OPT := 0 + OPT_DEFS += -g endif diff --git a/users/drashna/split/split_config.h b/users/drashna/split/split_config.h index 17daa4f808dc..fd8bf9551580 100644 --- a/users/drashna/split/split_config.h +++ b/users/drashna/split/split_config.h @@ -9,6 +9,9 @@ #define SPLIT_MODS_ENABLE #define SPLIT_WATCHDOG_ENABLE #define SPLIT_WPM_ENABLE +#define SPLIT_ACTIVITY_ENABLE +#define SPLIT_DETECTED_OS_ENABLE +#define SPLIT_HAPTIC_ENABLE #ifdef SPLIT_OLED_ENABLE # undef SPLIT_OLED_ENABLE #endif @@ -16,5 +19,8 @@ # define SELECT_SOFT_SERIAL_SPEED 1 #endif #ifdef CUSTOM_SPLIT_TRANSPORT_SYNC -# define SPLIT_TRANSACTION_IDS_USER RPC_ID_USER_STATE_SYNC, RPC_ID_USER_KEYMAP_SYNC, RPC_ID_USER_CONFIG_SYNC, RPC_ID_USER_PLACEHOLDER, RPC_ID_USER_KEYLOG_STR +# define SPLIT_TRANSACTION_IDS_USER RPC_ID_USER_STATE_SYNC, RPC_ID_USER_KEYMAP_SYNC, RPC_ID_USER_CONFIG_SYNC, RPC_ID_USER_PLACEHOLDER, RPC_ID_USER_OLED_KEYLOG_STR #endif + +#define CRC8_USE_TABLE +#define CRC8_OPTIMIZE_SPEED diff --git a/users/drashna/split/transport_sync.c b/users/drashna/split/transport_sync.c index bd6f7c568820..d5a1241586d6 100644 --- a/users/drashna/split/transport_sync.c +++ b/users/drashna/split/transport_sync.c @@ -15,9 +15,6 @@ extern unicode_config_t unicode_config; extern audio_config_t audio_config; extern bool delayed_tasks_run; #endif -#if defined(OLED_ENABLE) && !defined(SPLIT_OLED_ENABLE) && defined(CUSTOM_OLED_DRIVER) -extern bool is_oled_enabled; -#endif #if defined(POINTING_DEVICE_ENABLE) && defined(KEYBOARD_handwired_tractyl_manuform) extern bool tap_toggling; #endif @@ -26,7 +23,6 @@ extern bool swap_hands; #endif extern userspace_config_t userspace_config; -extern bool host_driver_disabled; uint16_t transport_keymap_config = 0; uint32_t transport_userspace_config = 0, transport_user_state = 0; @@ -52,8 +48,8 @@ void user_config_sync(uint8_t initiator2target_buffer_size, const void* initiato #ifdef CUSTOM_OLED_DRIVER # include "oled/oled_stuff.h" void keylogger_string_sync(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer) { - if (initiator2target_buffer_size == (OLED_KEYLOGGER_LENGTH)) { - memcpy(&keylog_str, initiator2target_buffer, initiator2target_buffer_size); + if (initiator2target_buffer_size == (OLED_KEYLOGGER_LENGTH+1)) { + memcpy(&oled_keylog_str, initiator2target_buffer, initiator2target_buffer_size); } } #endif @@ -64,7 +60,7 @@ void keyboard_post_init_transport_sync(void) { transaction_register_rpc(RPC_ID_USER_KEYMAP_SYNC, user_keymap_sync); transaction_register_rpc(RPC_ID_USER_CONFIG_SYNC, user_config_sync); #ifdef CUSTOM_OLED_DRIVER - transaction_register_rpc(RPC_ID_USER_KEYLOG_STR, keylogger_string_sync); + transaction_register_rpc(RPC_ID_USER_OLED_KEYLOG_STR, keylogger_string_sync); #endif } @@ -76,9 +72,6 @@ void user_transport_update(void) { user_state.audio_enable = is_audio_on(); user_state.audio_clicky_enable = is_clicky_on(); #endif -#if defined(OLED_ENABLE) && !defined(SPLIT_OLED_ENABLE) && defined(CUSTOM_OLED_DRIVER) - user_state.is_oled_enabled = is_oled_enabled; -#endif #if defined(POINTING_DEVICE_ENABLE) && defined(POINTING_DEVICE_AUTO_MOUSE_ENABLE) user_state.tap_toggling = get_auto_mouse_toggle(); #endif @@ -89,7 +82,7 @@ void user_transport_update(void) { #ifdef SWAP_HANDS_ENABLE user_state.swap_hands = swap_hands; #endif - user_state.host_driver_disabled = host_driver_disabled; + user_state.host_driver_disabled = get_keyboard_lock(); transport_user_state = user_state.raw; } else { @@ -100,9 +93,6 @@ void user_transport_update(void) { unicode_config.input_mode = user_state.unicode_mode; unicode_typing_mode = user_state.unicode_typing_mode; #endif -#if defined(OLED_ENABLE) && !defined(SPLIT_OLED_ENABLE) && defined(CUSTOM_OLED_DRIVER) - is_oled_enabled = user_state.is_oled_enabled; -#endif #if defined(POINTING_DEVICE_ENABLE) && defined(POINTING_DEVICE_AUTO_MOUSE_ENABLE) if (get_auto_mouse_toggle() != user_state.tap_toggling) { auto_mouse_toggle(); @@ -111,7 +101,7 @@ void user_transport_update(void) { #ifdef SWAP_HANDS_ENABLE swap_hands = user_state.swap_hands; #endif - host_driver_disabled = user_state.host_driver_disabled; + set_keyboard_lock(user_state.host_driver_disabled); } } @@ -122,7 +112,7 @@ void user_transport_sync(void) { static uint32_t last_config = 0, last_sync[4], last_user_state = 0; bool needs_sync = false; #ifdef CUSTOM_OLED_DRIVER - static char keylog_temp[OLED_KEYLOGGER_LENGTH] = {0}; + static char keylog_temp[OLED_KEYLOGGER_LENGTH + 1] = {0}; #endif // Check if the state values are different @@ -183,9 +173,9 @@ void user_transport_sync(void) { #ifdef CUSTOM_OLED_DRIVER // Check if the state values are different - if (memcmp(&keylog_str, &keylog_temp, OLED_KEYLOGGER_LENGTH)) { + if (memcmp(&oled_keylog_str, &keylog_temp, OLED_KEYLOGGER_LENGTH + 1)) { needs_sync = true; - memcpy(&keylog_temp, &keylog_str, OLED_KEYLOGGER_LENGTH); + memcpy(&keylog_temp, &oled_keylog_str, OLED_KEYLOGGER_LENGTH + 1); } if (timer_elapsed32(last_sync[3]) > 250) { needs_sync = true; @@ -193,7 +183,7 @@ void user_transport_sync(void) { // Perform the sync if requested if (needs_sync) { - if (transaction_rpc_send(RPC_ID_USER_KEYLOG_STR, OLED_KEYLOGGER_LENGTH, &keylog_str)) { + if (transaction_rpc_send(RPC_ID_USER_OLED_KEYLOG_STR, OLED_KEYLOGGER_LENGTH + 1, &oled_keylog_str)) { last_sync[3] = timer_read32(); } needs_sync = false; diff --git a/users/drashna/split/transport_sync.h b/users/drashna/split/transport_sync.h index e27e598f831a..d241e5446f06 100644 --- a/users/drashna/split/transport_sync.h +++ b/users/drashna/split/transport_sync.h @@ -6,7 +6,6 @@ #include "drashna.h" #ifdef OLED_ENABLE # include "oled/oled_stuff.h" -extern char keylog_str[]; #endif typedef union { diff --git a/users/konstantin/unicode.h b/users/konstantin/unicode.h index 82caea7c9ace..472f48a9428a 100644 --- a/users/konstantin/unicode.h +++ b/users/konstantin/unicode.h @@ -31,7 +31,7 @@ #define UCM_NAME(name, code) UCM_ ## name, #define UCM_ENTRY(name, code) [UCM_ ## name] = code, -#define UCM_KEYCODE(name, code) name = X(UCM_ ## name), +#define UCM_KEYCODE(name, code) name = UM(UCM_ ## name), #if defined(UNICODE_ENABLE) enum unicode_keycodes { diff --git a/users/kuchosauronad0/unicode.h b/users/kuchosauronad0/unicode.h index 9ff523baadf7..340b4cf94bcf 100644 --- a/users/kuchosauronad0/unicode.h +++ b/users/kuchosauronad0/unicode.h @@ -2,7 +2,6 @@ #include "quantum.h" -/* use X(n) to call the */ #ifdef UNICODEMAP_ENABLE enum unicode_name { OKOK, // diff --git a/users/kuchosauronad0/wrappers.h b/users/kuchosauronad0/wrappers.h index 543586e00906..a17e4178ffe4 100644 --- a/users/kuchosauronad0/wrappers.h +++ b/users/kuchosauronad0/wrappers.h @@ -152,13 +152,13 @@ NOTE: These are all the same length. If you do a search/replace #endif #ifdef UNICODEMAP_ENABLE -# define _______________UNICODE_L1__________________ X(SMRK), X(THINK), X(CLOWN), X(HUNDR), X(BANG) -# define _______________UNICODE_L2__________________ X(GRIN), X(MONKEY), X(OKOK), X(EGGPL), X(LIT) -# define _______________UNICODE_L3__________________ X(WEARY), X(UNAMU), X(EFFU), X(MONOCL), X(IRONY) +# define _______________UNICODE_L1__________________ UM(SMRK), UM(THINK), UM(CLOWN), UM(HUNDR), UM(BANG) +# define _______________UNICODE_L2__________________ UM(GRIN), UM(MONKEY), UM(OKOK), UM(EGGPL), UM(LIT) +# define _______________UNICODE_L3__________________ UM(WEARY), UM(UNAMU), UM(EFFU), UM(MONOCL), UM(IRONY) -# define _______________UNICODE_R1__________________ X(DRUG0), X(THUP), X(INUP), X(DIZZY), X(COOL) -# define _______________UNICODE_R2__________________ X(FIST0), X(FIST2), X(FIST3), X(FIST1), X(OKOK) -# define _______________UNICODE_R3__________________ X(MNDBLWN), X(THDN), X(SPOCK), X(HOLE), X(DASH) +# define _______________UNICODE_R1__________________ UM(DRUG0), UM(THUP), UM(INUP), UM(DIZZY), UM(COOL) +# define _______________UNICODE_R2__________________ UM(FIST0), UM(FIST2), UM(FIST3), UM(FIST1), UM(OKOK) +# define _______________UNICODE_R3__________________ UM(MNDBLWN), UM(THDN), UM(SPOCK), UM(HOLE), UM(DASH) #endif #define ________________NUMBER_LEFT________________ KC_1, KC_2, KC_3, KC_4, KC_5 diff --git a/users/ridingqwerty/unicode.h b/users/ridingqwerty/unicode.h index de8d1593b4a1..08b6f4fb8d50 100644 --- a/users/ridingqwerty/unicode.h +++ b/users/ridingqwerty/unicode.h @@ -216,7 +216,7 @@ #define UCM_NAME(name, code) UCM_ ## name, // UCM_LALP, #define UCM_ENTRY(name, code) [UCM_ ## name] = code, // [UCM_LALP] = 0x03B1, -#define UCM_KEYCODE(name, code) name = X(UCM_ ## name), // LALP = X(UCM_LALP) +#define UCM_KEYCODE(name, code) name = UM(UCM_ ## name), // LALP = UM(UCM_LALP) #if defined(UNICODE_ENABLE) enum unicode_keycodes { @@ -235,61 +235,61 @@ enum unicode_keycodes { #endif -#define ALPHA XP(LALP, UALP) -#define BETA XP(LBET, UBET) -#define GAMMA XP(LGAM, UGAM) -#define DELTA XP(LDEL, UDEL) -#define EPSLN XP(LEPS, UEPS) -#define ZETA XP(LZET, UZET) -#define ETA XP(LETA, UETA) -#define THETA XP(LTHE, UTHE) -#define IOTA XP(LIOT, UIOT) -#define KAPPA XP(LKAP, UKAP) -#define LAMBD XP(LLAM, ULAM) -#define GMU XP(LMU, UMU) -#define NU XP(LNU, UNU) -#define XI XP(LXI, UXI) -#define OMCRN XP(LOMI, UOMI) -#define PI XP(LPI, UPI) -#define RHO XP(LRHO, URHO) -#define SIGMA XP(LSIG, USIG) -#define TAU XP(LTAU, UTAU) -#define UPSLN XP(LUPS, UUPS) -#define PHI XP(LPHI, UPHI) -#define CHI XP(LCHI, UCHI) -#define PSI XP(LPSI, UPSI) -#define OMEGA XP(LOME, UOME) +#define ALPHA UP(LALP, UALP) +#define BETA UP(LBET, UBET) +#define GAMMA UP(LGAM, UGAM) +#define DELTA UP(LDEL, UDEL) +#define EPSLN UP(LEPS, UEPS) +#define ZETA UP(LZET, UZET) +#define ETA UP(LETA, UETA) +#define THETA UP(LTHE, UTHE) +#define IOTA UP(LIOT, UIOT) +#define KAPPA UP(LKAP, UKAP) +#define LAMBD UP(LLAM, ULAM) +#define GMU UP(LMU, UMU) +#define NU UP(LNU, UNU) +#define XI UP(LXI, UXI) +#define OMCRN UP(LOMI, UOMI) +#define PI UP(LPI, UPI) +#define RHO UP(LRHO, URHO) +#define SIGMA UP(LSIG, USIG) +#define TAU UP(LTAU, UTAU) +#define UPSLN UP(LUPS, UUPS) +#define PHI UP(LPHI, UPHI) +#define CHI UP(LCHI, UCHI) +#define PSI UP(LPSI, UPSI) +#define OMEGA UP(LOME, UOME) -#define AH XP(LAH, UAH) -#define BE XP(LBE, UBE) -#define VE XP(LVE, UVE) -#define GHE XP(LGHE, UGHE) -#define DE XP(LDE, UDE) -#define IE XP(LIE, UIE) -#define IO XP(LIO, UIO) -#define ZHE XP(LZHE, UZHE) -#define ZE XP(LZE, UZE) -#define IH XP(LIH, UIH) -#define SIH XP(LSIH, USIH) -#define KA XP(LKA, UKA) -#define EL XP(LEL, UEL) -#define EM XP(LEM, UEM) -#define EN XP(LEN, UEN) -#define OH XP(LOH, UOH) -#define PE XP(LPE, UPE) -#define ER XP(LER, UER) -#define ES XP(LES, UES) -#define TE XP(LTE, UTE) -#define UU XP(LUU, UUU) -#define EF XP(LEF, UEF) -#define HA XP(LHA, UHA) -#define TSE XP(LTSE, UTSE) -#define CHE XP(LCHE, UCHE) -#define SHA XP(LSHA, USHA) -#define SCHA XP(LSCHA, USCHA) -#define HARD XP(LHARD, UHARD) -#define YERU XP(LYERU, UYERU) -#define SOFT XP(LSOFT, USOFT) -#define EH XP(LEH, UEH) -#define YU XP(LYU, UYU) -#define YA XP(LYA, UYA) +#define AH UP(LAH, UAH) +#define BE UP(LBE, UBE) +#define VE UP(LVE, UVE) +#define GHE UP(LGHE, UGHE) +#define DE UP(LDE, UDE) +#define IE UP(LIE, UIE) +#define IO UP(LIO, UIO) +#define ZHE UP(LZHE, UZHE) +#define ZE UP(LZE, UZE) +#define IH UP(LIH, UIH) +#define SIH UP(LSIH, USIH) +#define KA UP(LKA, UKA) +#define EL UP(LEL, UEL) +#define EM UP(LEM, UEM) +#define EN UP(LEN, UEN) +#define OH UP(LOH, UOH) +#define PE UP(LPE, UPE) +#define ER UP(LER, UER) +#define ES UP(LES, UES) +#define TE UP(LTE, UTE) +#define UU UP(LUU, UUU) +#define EF UP(LEF, UEF) +#define HA UP(LHA, UHA) +#define TSE UP(LTSE, UTSE) +#define CHE UP(LCHE, UCHE) +#define SHA UP(LSHA, USHA) +#define SCHA UP(LSCHA, USCHA) +#define HARD UP(LHARD, UHARD) +#define YERU UP(LYERU, UYERU) +#define SOFT UP(LSOFT, USOFT) +#define EH UP(LEH, UEH) +#define YU UP(LYU, UYU) +#define YA UP(LYA, UYA) diff --git a/users/rmeli/keyrecords/unicode.h b/users/rmeli/keyrecords/unicode.h index c3ba96d5b654..63c355415e32 100644 --- a/users/rmeli/keyrecords/unicode.h +++ b/users/rmeli/keyrecords/unicode.h @@ -74,13 +74,13 @@ const uint32_t unicode_map[] PROGMEM = { }; // Accents -#define A_GRV XP(aGRV, AGRV) -#define A_UML XP(aUML, AUML) -#define E_GRV XP(eGRV, EGRV) -#define E_ACT XP(eACT, EACT) -#define I_GRV XP(iGRV, IGRV) -#define I_CIR XP(iCIR, ICIR) -#define O_GRV XP(oGRV, OGRV) -#define O_UML XP(oUML, OUML) -#define U_GRV XP(uGRV, UGRV) -#define U_UML XP(uUML, UUML) +#define A_GRV UP(aGRV, AGRV) +#define A_UML UP(aUML, AUML) +#define E_GRV UP(eGRV, EGRV) +#define E_ACT UP(eACT, EACT) +#define I_GRV UP(iGRV, IGRV) +#define I_CIR UP(iCIR, ICIR) +#define O_GRV UP(oGRV, OGRV) +#define O_UML UP(oUML, OUML) +#define U_GRV UP(uGRV, UGRV) +#define U_UML UP(uUML, UUML) diff --git a/users/rupa/wrappers.h b/users/rupa/wrappers.h index dfc00b512004..df32ef39abf8 100644 --- a/users/rupa/wrappers.h +++ b/users/rupa/wrappers.h @@ -28,14 +28,14 @@ along with this program. If not, see . #define G_LWR LT(_LOWER, KC_G) #if defined(UNICODEMAP_ENABLE) -# define CSHAPES XP(CCIR,CKEY) -# define CUIDADO XP(CUI,HAS) -# define NOPENAH XP(NOPE,STOP) -# define MUSIC_A XP(M4,M8) -# define MUSIC_B XP(M8B,M16) -# define SMILE XP(SMB,SMW) -# define STARS XP(STB,STW) -# define YEPYEP XP(CHEK,HUN) +# define CSHAPES UP(CCIR,CKEY) +# define CUIDADO UP(CUI,HAS) +# define NOPENAH UP(NOPE,STOP) +# define MUSIC_A UP(M4,M8) +# define MUSIC_B UP(M8B,M16) +# define SMILE UP(SMB,SMW) +# define STARS UP(STB,STW) +# define YEPYEP UP(CHEK,HUN) #endif /* _QWERTY @@ -70,10 +70,10 @@ along with this program. If not, see . * │RCtl│RAlt│RGui│ FLIP │ │ │ │M← │M↓ │M→ │ * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ */ -#define ____65_RAISE_______________ROW1 KC_GRV, X(IBNG), X(IRNY), _______, X(CENT), _______, _______, _______, STARS, _______, SMILE, X(NEG), CSHAPES, KC_DEL, KC_HOME -#define ____65_RAISE_______________ROW2 _______, _______, WAT, X(LEXI), RUPA, TADA, YUNO, _______, X(LELM), X(OM), _______, MUSIC_A, MUSIC_B, _______, KC_INS -#define ____65_RAISE_______________ROW3 _______, X(LALL), X(EFF), DICE, FART, _______, HUGS, JOY, KISS, LOD, _______, NOPENAH, YEPYEP, KC_END -#define ____65_RAISE_______________ROW4 OS_RSFT, CUIDADO, X(ECKS), CATS, DOMO, BUGS, X(NUM), MUSIC, DANCE, X(LPRO), SHRUG, KC_BTN1, KC_MS_U, KC_BTN2 +#define ____65_RAISE_______________ROW1 KC_GRV, UM(IBNG), UM(IRNY), _______, UM(CENT), _______, _______, _______, STARS, _______, SMILE, UM(NEG), CSHAPES, KC_DEL, KC_HOME +#define ____65_RAISE_______________ROW2 _______, _______, WAT, UM(LEXI), RUPA, TADA, YUNO, _______, UM(LELM), UM(OM), _______, MUSIC_A, MUSIC_B, _______, KC_INS +#define ____65_RAISE_______________ROW3 _______, UM(LALL), UM(EFF), DICE, FART, _______, HUGS, JOY, KISS, LOD, _______, NOPENAH, YEPYEP, KC_END +#define ____65_RAISE_______________ROW4 OS_RSFT, CUIDADO, UM(ECKS), CATS, DOMO, BUGS, UM(NUM), MUSIC, DANCE, UM(LPRO), SHRUG, KC_BTN1, KC_MS_U, KC_BTN2 #define ____65_RAISE_______________ROW5 OS_RCTL, OS_RALT, OS_RGUI, FLIP, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R /* _LOWER diff --git a/users/spidey3/spidey3_unicode.h b/users/spidey3/spidey3_unicode.h index ee8e00056ce6..4a3657fdfd83 100644 --- a/users/spidey3/spidey3_unicode.h +++ b/users/spidey3/spidey3_unicode.h @@ -25,7 +25,7 @@ enum unicode_names { SURPRISE, }; -# define X_BUL (XP(BUL1, BUL2)) -# define X_DASH (XP(EMDASH, ENDASH)) +# define X_BUL (UP(BUL1, BUL2)) +# define X_DASH (UP(EMDASH, ENDASH)) #endif diff --git a/users/turbomech/turbomech.c b/users/turbomech/turbomech.c index 892db1b92724..75796fb8fb36 100644 --- a/users/turbomech/turbomech.c +++ b/users/turbomech/turbomech.c @@ -101,8 +101,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { register_code(KC_LPRN); unregister_code(KC_LPRN); - register_code(X(0x00B0)); - unregister_code(X(0x00B0)); + register_unicode(0x00B0); UC(0x256F); PROCESS_UNICODE(UC(0x00B0)); diff --git a/users/yet-another-developer/unicode.h b/users/yet-another-developer/unicode.h index 9ff523baadf7..340b4cf94bcf 100644 --- a/users/yet-another-developer/unicode.h +++ b/users/yet-another-developer/unicode.h @@ -2,7 +2,6 @@ #include "quantum.h" -/* use X(n) to call the */ #ifdef UNICODEMAP_ENABLE enum unicode_name { OKOK, // diff --git a/users/yet-another-developer/wrappers.h b/users/yet-another-developer/wrappers.h index cd21032a4ecc..776da0c77ef3 100644 --- a/users/yet-another-developer/wrappers.h +++ b/users/yet-another-developer/wrappers.h @@ -118,13 +118,13 @@ NOTE: These are all the same length. If you do a search/replace #endif #ifdef UNICODEMAP_ENABLE -#define _______________UNICODE_L1__________________ X(SMRK), X(THINK), X(CLOWN), X(HUNDR), X(BANG) -#define _______________UNICODE_L2__________________ X(GRIN), X(MONKEY), X(OKOK), X(EGGPL), X(LIT) -#define _______________UNICODE_L3__________________ X(WEARY), X(UNAMU), X(EFFU), X(MONOCL), X(IRONY) +#define _______________UNICODE_L1__________________ UM(SMRK), UM(THINK), UM(CLOWN), UM(HUNDR), UM(BANG) +#define _______________UNICODE_L2__________________ UM(GRIN), UM(MONKEY), UM(OKOK), UM(EGGPL), UM(LIT) +#define _______________UNICODE_L3__________________ UM(WEARY), UM(UNAMU), UM(EFFU), UM(MONOCL), UM(IRONY) -#define _______________UNICODE_R1__________________ X(DRUG0), X(THUP), X(INUP), X(DIZZY), X(COOL) -#define _______________UNICODE_R2__________________ X(FIST0), X(FIST2),X(FIST3),X(FIST1), X(OKOK) -#define _______________UNICODE_R3__________________ X(MNDBLWN), X(THDN), X(SPOCK),X(HOLE), X(DASH) +#define _______________UNICODE_R1__________________ UM(DRUG0), UM(THUP), UM(INUP), UM(DIZZY), UM(COOL) +#define _______________UNICODE_R2__________________ UM(FIST0), UM(FIST2),UM(FIST3),UM(FIST1), UM(OKOK) +#define _______________UNICODE_R3__________________ UM(MNDBLWN), UM(THDN), UM(SPOCK),UM(HOLE), UM(DASH) #endif #define ________________NUMBER_LEFT________________ KC_1, KC_2, KC_3, KC_4, KC_5 diff --git a/util/uf2conv.py b/util/uf2conv.py index 578b2b49772d..84271cee4f6f 100755 --- a/util/uf2conv.py +++ b/util/uf2conv.py @@ -74,7 +74,7 @@ def convert_from_uf2(buf): assert False, "Non-word padding size at " + ptr while padding > 0: padding -= 4 - outp += b"\x00\x00\x00\x00" + outp.append(b"\x00\x00\x00\x00") if familyid == 0x0 or ((hd[2] & 0x2000) and familyid == hd[7]): outp.append(block[32 : 32 + datalen]) curraddr = newaddr + datalen @@ -218,18 +218,17 @@ def get_drives(): if len(words) >= 3 and words[1] == "2" and words[2] == "FAT": drives.append(words[0]) else: - rootpath = "/media" + searchpaths = ["/media"] if sys.platform == "darwin": - rootpath = "/Volumes" + searchpaths = ["/Volumes"] elif sys.platform == "linux": - tmp = rootpath + "/" + os.environ["USER"] - if os.path.isdir(tmp): - rootpath = tmp - tmp = "/run" + rootpath + "/" + os.environ["USER"] - if os.path.isdir(tmp): - rootpath = tmp - for d in os.listdir(rootpath): - drives.append(os.path.join(rootpath, d)) + searchpaths += ["/media/" + os.environ["USER"], '/run/media/' + os.environ["USER"]] + + for rootpath in searchpaths: + if os.path.isdir(rootpath): + for d in os.listdir(rootpath): + if os.path.isdir(rootpath): + drives.append(os.path.join(rootpath, d)) def has_info(d): diff --git a/util/uf2families.json b/util/uf2families.json index c2140fe351a2..778af4421fc6 100644 --- a/util/uf2families.json +++ b/util/uf2families.json @@ -203,5 +203,15 @@ "id": "0x11de784a", "short_name": "M0SENSE", "description": "M0SENSE BL702" + }, + { + "id": "0x4b684d71", + "short_name": "MaixPlay-U4", + "description": "Sipeed MaixPlay-U4(BL618)" + }, + { + "id": "0x9517422f", + "short_name": "RZA1LU", + "description": "Renesas RZ/A1LU (R7S7210xx)" } -] \ No newline at end of file +]