From d983251c10c4bb152c746dc4e94bc954b1b82c8c Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 29 Aug 2022 02:59:40 +1000 Subject: Switch over MANUFACTURER and PRODUCT to string literals (#18183) --- users/spidey3/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'users/spidey3') diff --git a/users/spidey3/config.h b/users/spidey3/config.h index 49409ed85d..69ae5cdcdb 100644 --- a/users/spidey3/config.h +++ b/users/spidey3/config.h @@ -42,7 +42,7 @@ #define SPI_DEBUG_SCAN_RATE #undef MANUFACTURER -#define MANUFACTURER Window of Fire +#define MANUFACTURER "Window of Fire" // Some keyboards enable BACKLIGHT_CAPS_LOCK without checking if backlight is enabled. // Undef as appropriate to avoid compiler warnings in that case. -- cgit v1.2.3 From 9632360caa5e6511b0ec13cb4c55eb64408232b5 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 30 Aug 2022 03:20:04 -0500 Subject: Use a macro to compute the size of arrays at compile time (#18044) * Add ARRAY_SIZE and CEILING utility macros * Apply a coccinelle patch to use ARRAY_SIZE * fix up some straggling items * Fix 'make test:secure' * Enhance ARRAY_SIZE macro to reject acting on pointers The previous definition would not produce a diagnostic for ``` int *p; size_t num_elem = ARRAY_SIZE(p) ``` but the new one will. * explicitly get definition of ARRAY_SIZE * Convert to ARRAY_SIZE when const is involved The following spatch finds additional instances where the array is const and the division is by the size of the type, not the size of the first element: ``` @ rule5a using "empty.iso" @ type T; const T[] E; @@ - (sizeof(E)/sizeof(T)) + ARRAY_SIZE(E) @ rule6a using "empty.iso" @ type T; const T[] E; @@ - sizeof(E)/sizeof(T) + ARRAY_SIZE(E) ``` * New instances of ARRAY_SIZE added since initial spatch run * Use `ARRAY_SIZE` in docs (found by grep) * Manually use ARRAY_SIZE hs_set is expected to be the same size as uint16_t, though it's made of two 8-bit integers * Just like char, sizeof(uint8_t) is guaranteed to be 1 This is at least true on any plausible system where qmk is actually used. Per my understanding it's universally true, assuming that uint8_t exists: https://stackoverflow.com/questions/48655310/can-i-assume-that-sizeofuint8-t-1 * Run qmk-format on core C files touched in this branch Co-authored-by: Stefan Kerkmann --- users/spidey3/layer_rgb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'users/spidey3') diff --git a/users/spidey3/layer_rgb.c b/users/spidey3/layer_rgb.c index c867468194..b34b91679d 100644 --- a/users/spidey3/layer_rgb.c +++ b/users/spidey3/layer_rgb.c @@ -97,7 +97,7 @@ const rgblight_segment_t *const PROGMEM _rgb_layers[] = { // clang-format on -const uint8_t PROGMEM _n_rgb_layers = sizeof(_rgb_layers) / sizeof(_rgb_layers[0]) - 1; +const uint8_t PROGMEM _n_rgb_layers = ARRAY_SIZE(_rgb_layers) - 1; void clear_rgb_layers() { for (uint8_t i = 0; i < _n_rgb_layers; i++) { -- cgit v1.2.3 From e4bf8323688b56cd5fc0f4f27c531f3406d40f6d Mon Sep 17 00:00:00 2001 From: Joshua Diamond Date: Wed, 31 Aug 2022 19:39:16 -0400 Subject: Add unicode mode change callbacks (#18235) --- users/spidey3/layer_rgb.c | 31 +++++++++++-------------------- users/spidey3/spidey3.c | 18 +++++++++++++----- users/spidey3/spidey3.h | 11 ++++++++--- 3 files changed, 32 insertions(+), 28 deletions(-) (limited to 'users/spidey3') diff --git a/users/spidey3/layer_rgb.c b/users/spidey3/layer_rgb.c index b34b91679d..bdf4584ef1 100644 --- a/users/spidey3/layer_rgb.c +++ b/users/spidey3/layer_rgb.c @@ -112,8 +112,7 @@ void do_rgb_layers(layer_state_t state, uint8_t start, uint8_t end) { } } -void do_rgb_unicode(void) { - uint8_t uc_mode = get_unicode_input_mode(); +void do_rgb_unicode(uint8_t uc_mode) { for (uint8_t i = 0; i < UC__COUNT; i++) { bool is_on = i == uc_mode; rgblight_set_layer_state(UNICODE_OFFSET + i, is_on); @@ -123,7 +122,7 @@ void do_rgb_unicode(void) { void do_rgb_all(void) { do_rgb_layers(default_layer_state, LAYER_BASE_DEFAULT, LAYER_BASE_REGULAR); do_rgb_layers(layer_state, LAYER_BASE_REGULAR, LAYER_BASE_END); - do_rgb_unicode(); + do_rgb_unicode(get_unicode_input_mode()); rgblight_set_layer_state(MISC_OFFSET + 0, spi_gflock); rgblight_set_layer_state(MISC_OFFSET + 1, spi_replace_mode != SPI_NORMAL); } @@ -148,7 +147,7 @@ extern rgblight_status_t rgblight_status; # define STARTUP_ANIMATION_CYCLE_STEP 2 # define STARTUP_ANIMATION_RAMP_TO_STEPS 70 # define STARTUP_ANIMATION_STEP_TIME 10 -# define STARTUP_ANIMATION_INITIAL_DELAY 0 // milliseconds, must be < 255 * STEP_TIME +# define STARTUP_ANIMATION_INITIAL_DELAY 0 // milliseconds, must be < 255 * STEP_TIME // clang-format off typedef enum { @@ -382,6 +381,13 @@ bool led_update_user_rgb(led_t led_state) { return true; } +#if defined(UNICODE_COMMON_ENABLE) +void unicode_input_mode_set_user_rgb(uint8_t input_mode) { + rgb_layer_ack(ACK_MEH); + do_rgb_unicode(input_mode); +} +#endif + void rgb_layer_ack_yn(bool yn) { rgb_layer_ack(yn ? ACK_YES : ACK_NO); } void rgb_layer_ack(layer_ack_t n) { @@ -458,7 +464,7 @@ void post_process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { break; case RGB_TOG: - // Hack - we only get called on the press for RGB_TOG, + // Hack - we only get called on the press for RGB_TOG, // but the flag is only flipped on the release... rgb_layer_ack_yn(!rgblight_config.enable); break; @@ -476,20 +482,5 @@ void post_process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { rgb_layer_ack_yn(keymap_config.nkro); break; #endif - -#if defined(UNICODE_COMMON_ENABLE) - case UC_M_MA: - case UC_M_LN: - case UC_M_WI: - case UC_M_BS: - case UC_M_WC: - case UC_M_EM: - - case UC_MOD: - case UC_RMOD: - rgb_layer_ack(ACK_MEH); - do_rgb_unicode(); - break; -#endif } } diff --git a/users/spidey3/spidey3.c b/users/spidey3/spidey3.c index 842bb465f7..d9b893814a 100644 --- a/users/spidey3/spidey3.c +++ b/users/spidey3/spidey3.c @@ -98,14 +98,14 @@ bool process_record_glyph_replacement(uint16_t keycode, keyrecord_t *record, uin clear_oneshot_mods(); #endif - bool caps = host_keyboard_led_state().caps_lock; + bool caps = host_keyboard_led_state().caps_lock; uint32_t base = ((shifted == caps) ? baseAlphaLower : baseAlphaUpper); _register(base + (keycode - KC_A)); set_mods(temp_mod); } return false; case KC_0: - if (shifted) { // skip shifted numbers, so that we can still use symbols etc. + if (shifted) { // skip shifted numbers, so that we can still use symbols etc. return true; } if (record->event.pressed) { @@ -113,7 +113,7 @@ bool process_record_glyph_replacement(uint16_t keycode, keyrecord_t *record, uin } return false; case KC_1 ... KC_9: - if (shifted) { // skip shifted numbers, so that we can still use symbols etc. + if (shifted) { // skip shifted numbers, so that we can still use symbols etc. return true; } if (record->event.pressed) { @@ -122,7 +122,7 @@ bool process_record_glyph_replacement(uint16_t keycode, keyrecord_t *record, uin return false; case KC_SPACE: if (record->event.pressed) { - _register(spaceGlyph); // em space + _register(spaceGlyph); // em space } return false; } @@ -338,7 +338,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { set_mods(mods); return false; } - } else { // on release of KC_BSPC + } else { // on release of KC_BSPC // In case KC_DEL is still being sent even after the release of KC_BSPC if (delkey_registered) { unregister_code(KC_DEL); @@ -387,3 +387,11 @@ bool led_update_user(led_t led_state) { return true; #endif } + +#if defined(UNICODE_COMMON_ENABLE) +void unicode_input_mode_set_user(uint8_t input_mode) { +# ifdef RGBLIGHT_ENABLE + unicode_input_mode_set_user_rgb(input_mode); +# endif +} +#endif diff --git a/users/spidey3/spidey3.h b/users/spidey3/spidey3.h index e91b299e55..7a9407969e 100644 --- a/users/spidey3/spidey3.h +++ b/users/spidey3/spidey3.h @@ -17,9 +17,9 @@ enum userspace_layers { }; enum custom_keycodes { - CH_CPNL = SAFE_RANGE, // AL Control Panel - CH_ASST, // AL Context-aware Desktop Assistant - CH_SUSP, // Suspend + CH_CPNL = SAFE_RANGE, // AL Control Panel + CH_ASST, // AL Context-aware Desktop Assistant + CH_SUSP, // Suspend SPI_NORMAL, SPI_WIDE, @@ -65,6 +65,11 @@ void rgb_layer_ack(layer_ack_t n); void rgb_layer_ack_yn(bool yn); void clear_rgb_layers(void); void shutdown_user_rgb(void); + +# if defined(UNICODE_COMMON_ENABLE) +void unicode_input_mode_set_user_rgb(uint8_t input_mode); +# endif + #endif #ifdef UNICODEMAP_ENABLE -- cgit v1.2.3 From 7c49b8caa989b34886847689d992827eeaa9c895 Mon Sep 17 00:00:00 2001 From: Joshua Diamond Date: Mon, 12 Sep 2022 16:32:52 -0400 Subject: Adapt to unicode refactoring (#18345) --- users/spidey3/rules.mk | 2 +- users/spidey3/spidey3.h | 2 +- users/spidey3/spidey3_unicode.c | 28 ++++++++++++++++++++++++++++ users/spidey3/spidey3_unicode.h | 31 +++++++++++++++++++++++++++++++ users/spidey3/unicode.c | 28 ---------------------------- users/spidey3/unicode.h | 31 ------------------------------- 6 files changed, 61 insertions(+), 61 deletions(-) create mode 100644 users/spidey3/spidey3_unicode.c create mode 100644 users/spidey3/spidey3_unicode.h delete mode 100644 users/spidey3/unicode.c delete mode 100644 users/spidey3/unicode.h (limited to 'users/spidey3') diff --git a/users/spidey3/rules.mk b/users/spidey3/rules.mk index c95582e176..35cfdb4187 100644 --- a/users/spidey3/rules.mk +++ b/users/spidey3/rules.mk @@ -11,5 +11,5 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) SRC += layer_rgb.c endif ifeq ($(strip $(UNICODEMAP_ENABLE)), yes) - SRC += unicode.c + SRC += spidey3_unicode.c endif diff --git a/users/spidey3/spidey3.h b/users/spidey3/spidey3.h index 7a9407969e..e344b08895 100644 --- a/users/spidey3/spidey3.h +++ b/users/spidey3/spidey3.h @@ -6,7 +6,7 @@ #include QMK_KEYBOARD_H #ifdef UNICODEMAP_ENABLE -# include "unicode.h" +# include "spidey3_unicode.h" #endif enum userspace_layers { diff --git a/users/spidey3/spidey3_unicode.c b/users/spidey3/spidey3_unicode.c new file mode 100644 index 0000000000..c2804d8805 --- /dev/null +++ b/users/spidey3/spidey3_unicode.c @@ -0,0 +1,28 @@ +// Copyright 2022 Joshua Diamond josh@windowoffire.com (@spidey3) +// SPDX-License-Identifier: GPL-2.0-or-later + + +#include "spidey3_unicode.h" + +const uint32_t PROGMEM unicode_map[] = { + [BUL1] = 0x2022, // • + [BUL2] = 0x25E6, // ◦ + [LARR] = 0x2190, // ← + [RARR] = 0x2192, // → + [ENDASH] = 0x2013, // – + [EMDASH] = 0x2014, // — + [SPIDER] = 0x1F577, // 🕷 + [SAD] = 0x2639, // ☹ + [MEH] = 0x1F611, // 😑 + [HAPPY] = 0x1F600, // 😀 + [ANGRY] = 0x1F620, // 😠 + [THUMBUP] = 0x1F44D, // 👍 + [THUMBDN] = 0x1F44E, // 👎 + [LOL] = 0x1F602, // 😂 + [SURPRISE] = 0x1F62E, // 😮 +}; + +void eeconfig_init_user_unicode(void) { + // Default to Linux style + set_unicode_input_mode(UC_LNX); +} diff --git a/users/spidey3/spidey3_unicode.h b/users/spidey3/spidey3_unicode.h new file mode 100644 index 0000000000..ee8e00056c --- /dev/null +++ b/users/spidey3/spidey3_unicode.h @@ -0,0 +1,31 @@ +// Copyright 2022 Joshua Diamond josh@windowoffire.com (@spidey3) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include QMK_KEYBOARD_H + +#ifdef UNICODEMAP_ENABLE + +enum unicode_names { + BUL1, + BUL2, + LARR, + RARR, + ENDASH, + EMDASH, + SPIDER, + SAD, + MEH, + HAPPY, + ANGRY, + THUMBUP, + THUMBDN, + LOL, + SURPRISE, +}; + +# define X_BUL (XP(BUL1, BUL2)) +# define X_DASH (XP(EMDASH, ENDASH)) + +#endif diff --git a/users/spidey3/unicode.c b/users/spidey3/unicode.c deleted file mode 100644 index 5292b0809b..0000000000 --- a/users/spidey3/unicode.c +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2022 Joshua Diamond josh@windowoffire.com (@spidey3) -// SPDX-License-Identifier: GPL-2.0-or-later - - -#include "unicode.h" - -const uint32_t PROGMEM unicode_map[] = { - [BUL1] = 0x2022, // • - [BUL2] = 0x25E6, // ◦ - [LARR] = 0x2190, // ← - [RARR] = 0x2192, // → - [ENDASH] = 0x2013, // – - [EMDASH] = 0x2014, // — - [SPIDER] = 0x1F577, // 🕷 - [SAD] = 0x2639, // ☹ - [MEH] = 0x1F611, // 😑 - [HAPPY] = 0x1F600, // 😀 - [ANGRY] = 0x1F620, // 😠 - [THUMBUP] = 0x1F44D, // 👍 - [THUMBDN] = 0x1F44E, // 👎 - [LOL] = 0x1F602, // 😂 - [SURPRISE] = 0x1F62E, // 😮 -}; - -void eeconfig_init_user_unicode(void) { - // Default to Linux style - set_unicode_input_mode(UC_LNX); -} diff --git a/users/spidey3/unicode.h b/users/spidey3/unicode.h deleted file mode 100644 index ee8e00056c..0000000000 --- a/users/spidey3/unicode.h +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2022 Joshua Diamond josh@windowoffire.com (@spidey3) -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include QMK_KEYBOARD_H - -#ifdef UNICODEMAP_ENABLE - -enum unicode_names { - BUL1, - BUL2, - LARR, - RARR, - ENDASH, - EMDASH, - SPIDER, - SAD, - MEH, - HAPPY, - ANGRY, - THUMBUP, - THUMBDN, - LOL, - SURPRISE, -}; - -# define X_BUL (XP(BUL1, BUL2)) -# define X_DASH (XP(EMDASH, ENDASH)) - -#endif -- cgit v1.2.3 From a26f1ddafa05c04cc9446109db250c59f689b35a Mon Sep 17 00:00:00 2001 From: Joshua Diamond Date: Sat, 17 Sep 2022 01:48:09 -0400 Subject: Chromeos keycodes (#18212) --- users/spidey3/spidey3.c | 7 ------- users/spidey3/spidey3.h | 4 +--- 2 files changed, 1 insertion(+), 10 deletions(-) (limited to 'users/spidey3') diff --git a/users/spidey3/spidey3.c b/users/spidey3/spidey3.c index d9b893814a..b4c261ce1d 100644 --- a/users/spidey3/spidey3.c +++ b/users/spidey3/spidey3.c @@ -199,8 +199,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // clang-format off - case CH_CPNL: host_consumer_send(AL_CONTROL_PANEL); return false; - case CH_ASST: host_consumer_send(AL_ASSISTANT); return false; case CH_SUSP: tap_code16(LGUI(LSFT(KC_L))); return true; // clang-format on @@ -285,11 +283,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } else { switch (keycode) { - case CH_CPNL: - case CH_ASST: - host_consumer_send(0); - return false; - case SPI_KP_00: unregister_code(KC_KP_0); return false; diff --git a/users/spidey3/spidey3.h b/users/spidey3/spidey3.h index e344b08895..2b2cac0a20 100644 --- a/users/spidey3/spidey3.h +++ b/users/spidey3/spidey3.h @@ -17,9 +17,7 @@ enum userspace_layers { }; enum custom_keycodes { - CH_CPNL = SAFE_RANGE, // AL Control Panel - CH_ASST, // AL Context-aware Desktop Assistant - CH_SUSP, // Suspend + CH_SUSP = SAFE_RANGE, // Suspend SPI_NORMAL, SPI_WIDE, -- cgit v1.2.3 From ad8630bd7229937877aa9a29693bbb8942a27abe Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sat, 15 Oct 2022 09:59:31 -0700 Subject: Remove RGBLIGHT_ANIMATION and clean up effect defines for layouts+users (#18729) --- users/spidey3/config.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'users/spidey3') diff --git a/users/spidey3/config.h b/users/spidey3/config.h index 36d59b6a5d..808de4d591 100644 --- a/users/spidey3/config.h +++ b/users/spidey3/config.h @@ -14,7 +14,16 @@ # define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF # define RGBLIGHT_STARTUP_ANIMATION -# undef RGBLIGHT_ANIMATIONS +# undef RGBLIGHT_EFFECT_BREATHING +# undef RGBLIGHT_EFFECT_RAINBOW_MOOD +# undef RGBLIGHT_EFFECT_RAINBOW_SWIRL +# undef RGBLIGHT_EFFECT_SNAKE +# undef RGBLIGHT_EFFECT_KNIGHT +# undef RGBLIGHT_EFFECT_CHRISTMAS +# undef RGBLIGHT_EFFECT_STATIC_GRADIENT +# undef RGBLIGHT_EFFECT_RGB_TEST +# undef RGBLIGHT_EFFECT_ALTERNATING +# undef RGBLIGHT_EFFECT_TWINKLE # define RGBLIGHT_EFFECT_BREATHING # define RGBLIGHT_EFFECT_RAINBOW_MOOD # define RGBLIGHT_EFFECT_RAINBOW_SWIRL -- cgit v1.2.3 From 80fdbfce5f92c552a2ec0bae72cdfc1639ffb9dc Mon Sep 17 00:00:00 2001 From: Joshua Diamond Date: Tue, 18 Oct 2022 19:28:19 -0400 Subject: A little personal cleanup after #18726 and #18729 (#18734) * A little cleanup after #18726 * Re-instate RGBLIGHT_EFFECT_STATIC_GRADIENT * Extend to spin --- users/spidey3/config.h | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'users/spidey3') diff --git a/users/spidey3/config.h b/users/spidey3/config.h index 808de4d591..15f46a1f4a 100644 --- a/users/spidey3/config.h +++ b/users/spidey3/config.h @@ -14,23 +14,8 @@ # define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF # define RGBLIGHT_STARTUP_ANIMATION -# undef RGBLIGHT_EFFECT_BREATHING -# undef RGBLIGHT_EFFECT_RAINBOW_MOOD -# undef RGBLIGHT_EFFECT_RAINBOW_SWIRL -# undef RGBLIGHT_EFFECT_SNAKE -# undef RGBLIGHT_EFFECT_KNIGHT # undef RGBLIGHT_EFFECT_CHRISTMAS -# undef RGBLIGHT_EFFECT_STATIC_GRADIENT -# undef RGBLIGHT_EFFECT_RGB_TEST # undef RGBLIGHT_EFFECT_ALTERNATING -# undef RGBLIGHT_EFFECT_TWINKLE -# define RGBLIGHT_EFFECT_BREATHING -# define RGBLIGHT_EFFECT_RAINBOW_MOOD -# define RGBLIGHT_EFFECT_RAINBOW_SWIRL -# define RGBLIGHT_EFFECT_SNAKE -# define RGBLIGHT_EFFECT_KNIGHT -# define RGBLIGHT_EFFECT_STATIC_GRADIENT -# define RGBLIGHT_EFFECT_TWINKLE # define RGBLIGHT_DEFAULT_HUE 213 # define RGBLIGHT_DEFAULT_SAT UINT8_MAX -- cgit v1.2.3 From 18dc851e37a203b32db0261c365dd300488e1c71 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 19 Oct 2022 21:33:05 +1100 Subject: Remove legacy Debug keycode (#18769) * `DEBUG` -> `DB_TOGG`, default-ish keymaps * `DEBUG` -> `DB_TOGG`, user keymaps * `DEBUG` -> `DB_TOGG`, community layouts * `DEBUG` -> `DB_TOGG`, userspace * `DEBUG` -> `DB_TOGG`, docs & core --- users/spidey3/layer_rgb.c | 2 +- users/spidey3/spidey3.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'users/spidey3') diff --git a/users/spidey3/layer_rgb.c b/users/spidey3/layer_rgb.c index bdf4584ef1..835a79186b 100644 --- a/users/spidey3/layer_rgb.c +++ b/users/spidey3/layer_rgb.c @@ -444,7 +444,7 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { void post_process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { switch (keycode) { // Acks follow... - case DEBUG: + case QK_DEBUG_TOGGLE: if (debug_matrix || debug_keyboard) rgb_layer_ack(ACK_HUH); else if (debug_enable) diff --git a/users/spidey3/spidey3.c b/users/spidey3/spidey3.c index b4c261ce1d..0955bef3c3 100644 --- a/users/spidey3/spidey3.c +++ b/users/spidey3/spidey3.c @@ -172,7 +172,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { #ifndef NO_DEBUG // Re-implement this here, but fix the persistence! - case DEBUG: + case QK_DEBUG_TOGGLE: if (get_mods() & MOD_MASK_SHIFT) { debug_enable = 0; debug_keyboard = 0; -- cgit v1.2.3 From 74484e21afc819b8e20f408aebc5c4e6cfdcc991 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 23 Oct 2022 07:45:20 +1100 Subject: Deprecate `VLK_TOG` for `VK_TOGG` (#18807) --- users/spidey3/layer_rgb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'users/spidey3') diff --git a/users/spidey3/layer_rgb.c b/users/spidey3/layer_rgb.c index 835a79186b..102848fc90 100644 --- a/users/spidey3/layer_rgb.c +++ b/users/spidey3/layer_rgb.c @@ -470,7 +470,7 @@ void post_process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { break; #ifdef VELOCIKEY_ENABLE - case VLK_TOG: + case QK_VELOCIKEY_TOGGLE: rgb_layer_ack_yn(velocikey_enabled()); break; #endif -- cgit v1.2.3 From 5974d989fe72f6c576901a065bee4487a58c351d Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 1 Nov 2022 08:15:12 +1100 Subject: Normalise Unicode keycodes (#18898) * `UC_MOD`/`UC_RMOD` -> `UC_NEXT`/`UC_PREV` * `UNICODE_MODE_*` -> `QK_UNICODE_MODE_*` * `UC_MAC` -> `UNICODE_MODE_MACOS` * `UC_LNX` -> `UNICODE_MODE_LINUX` * `UC_WIN` -> `UNICODE_MODE_WINDOWS` * `UC_BSD` -> `UNICODE_MODE_BSD` * `UC_WINC` -> `UNICODE_MODE_WINCOMPOSE` * `UC_EMACS` -> `UNICODE_MODE_EMACS` * `UC__COUNT` -> `UNICODE_MODE_COUNT` * `UC_M_MA` -> `UC_MAC` * `UC_M_LN` -> `UC_LINX` * `UC_M_WI` -> `UC_WIN` * `UC_M_BS` -> `UC_BSD` * `UC_M_WC` -> `UC_WINC` * `UC_M_EM` -> `UC_EMAC` * Docs * Update quantum/unicode/unicode.h --- users/spidey3/config.h | 2 +- users/spidey3/layer_rgb.c | 22 +++++++++++----------- users/spidey3/spidey3.c | 6 +++--- users/spidey3/spidey3_unicode.c | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) (limited to 'users/spidey3') diff --git a/users/spidey3/config.h b/users/spidey3/config.h index 15f46a1f4a..0b3bf8f723 100644 --- a/users/spidey3/config.h +++ b/users/spidey3/config.h @@ -31,7 +31,7 @@ #endif -#define UNICODE_SELECTED_MODES UC_MAC, UC_LNX, UC_WINC, UC_EMACS +#define UNICODE_SELECTED_MODES UNICODE_MODE_MACOS, UNICODE_MODE_LINUX, UNICODE_MODE_WINCOMPOSE, UNICODE_MODE_EMACS #define SPI_DEBUG_SCAN_RATE diff --git a/users/spidey3/layer_rgb.c b/users/spidey3/layer_rgb.c index 102848fc90..75a4b4c0a1 100644 --- a/users/spidey3/layer_rgb.c +++ b/users/spidey3/layer_rgb.c @@ -61,9 +61,9 @@ const rgblight_segment_t PROGMEM _huh_layer[] = RGBLIGHT_LAYER_SEGMENTS(CORNE #define UNICODE_OFFSET 12 const rgblight_segment_t PROGMEM _uc_mac_layer[] = RGBLIGHT_LAYER_SEGMENTS(CORNER_BR(HSV_PURPLE)); -// No indicator for UC_LNX -// UC_WIN disabled in config.h -// UC_BSD not implemented +// No indicator for UNICODE_MODE_LINUX +// UNICODE_MODE_WINDOWS disabled in config.h +// UNICODE_MODE_BSD not implemented const rgblight_segment_t PROGMEM _uc_winc_layer[] = RGBLIGHT_LAYER_SEGMENTS(CORNER_BR(HSV_CYAN)); const rgblight_segment_t PROGMEM _uc_emacs_layer[] = RGBLIGHT_LAYER_SEGMENTS(CORNER_BR(HSV_GREEN)); @@ -85,14 +85,14 @@ const rgblight_segment_t *const PROGMEM _rgb_layers[] = { [ACK_OFFSET + ACK_MEH] = _meh_layer, [ACK_OFFSET + ACK_HUH] = _huh_layer, - [UNICODE_OFFSET + UC_MAC] = _uc_mac_layer, - [UNICODE_OFFSET + UC_LNX] = _none, - [UNICODE_OFFSET + UC_WIN] = _none, - [UNICODE_OFFSET + UC_BSD] = _none, - [UNICODE_OFFSET + UC_WINC] = _uc_winc_layer, - [UNICODE_OFFSET + UC_EMACS] = _uc_emacs_layer, + [UNICODE_OFFSET + UNICODE_MODE_MACOS] = _uc_mac_layer, + [UNICODE_OFFSET + UNICODE_MODE_LINUX] = _none, + [UNICODE_OFFSET + UNICODE_MODE_WINDOWS] = _none, + [UNICODE_OFFSET + UNICODE_MODE_BSD] = _none, + [UNICODE_OFFSET + UNICODE_MODE_WINCOMPOSE] = _uc_winc_layer, + [UNICODE_OFFSET + UNICODE_MODE_EMACS] = _uc_emacs_layer, - [UNICODE_OFFSET + UC__COUNT] = NULL + [UNICODE_OFFSET + UNICODE_MODE_COUNT] = NULL }; // clang-format on @@ -113,7 +113,7 @@ void do_rgb_layers(layer_state_t state, uint8_t start, uint8_t end) { } void do_rgb_unicode(uint8_t uc_mode) { - for (uint8_t i = 0; i < UC__COUNT; i++) { + for (uint8_t i = 0; i < UNICODE_MODE_COUNT; i++) { bool is_on = i == uc_mode; rgblight_set_layer_state(UNICODE_OFFSET + i, is_on); } diff --git a/users/spidey3/spidey3.c b/users/spidey3/spidey3.c index 0955bef3c3..3cf458d460 100644 --- a/users/spidey3/spidey3.c +++ b/users/spidey3/spidey3.c @@ -224,7 +224,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // to determine what Print Screen key should do. The // idea here is to make it consistent across hosts. switch (get_unicode_input_mode()) { - case UC_MAC: + case UNICODE_MODE_MACOS: if ((mods | osm) & MOD_MASK_ALT) { // Window screenshot clear_mods(); @@ -247,8 +247,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } break; - case UC_WIN: - case UC_WINC: + case UNICODE_MODE_WINDOWS + case UNICODE_MODE_WINCOMPOSE: if ((mods | osm) & MOD_MASK_ALT) { // Window screenshot // Alt+PrintScreen should work as is diff --git a/users/spidey3/spidey3_unicode.c b/users/spidey3/spidey3_unicode.c index c2804d8805..bda0876b54 100644 --- a/users/spidey3/spidey3_unicode.c +++ b/users/spidey3/spidey3_unicode.c @@ -24,5 +24,5 @@ const uint32_t PROGMEM unicode_map[] = { void eeconfig_init_user_unicode(void) { // Default to Linux style - set_unicode_input_mode(UC_LNX); + set_unicode_input_mode(UNICODE_MODE_LINUX); } -- cgit v1.2.3 From 5fb80562f11b9bbd291a7d7e920912dedcc8a9f2 Mon Sep 17 00:00:00 2001 From: Joshua Diamond Date: Tue, 1 Nov 2022 17:34:31 -0400 Subject: Fix syntax error introduced in #18800 (#18933) --- users/spidey3/spidey3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'users/spidey3') diff --git a/users/spidey3/spidey3.c b/users/spidey3/spidey3.c index 3cf458d460..0f3c08fca6 100644 --- a/users/spidey3/spidey3.c +++ b/users/spidey3/spidey3.c @@ -247,7 +247,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } break; - case UNICODE_MODE_WINDOWS + case UNICODE_MODE_WINDOWS: case UNICODE_MODE_WINCOMPOSE: if ((mods | osm) & MOD_MASK_ALT) { // Window screenshot -- cgit v1.2.3