summaryrefslogtreecommitdiffstats
path: root/users/spidey3
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2022-11-01 08:15:12 +1100
committerGitHub <noreply@github.com>2022-10-31 21:15:12 +0000
commit5974d989fe72f6c576901a065bee4487a58c351d (patch)
treea88a796ec2c0a11d4d554325fa92e53d9fbb82c2 /users/spidey3
parent743524df32ef265fdc3999518cdaba45cd4abf22 (diff)
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
Diffstat (limited to 'users/spidey3')
-rw-r--r--users/spidey3/config.h2
-rw-r--r--users/spidey3/layer_rgb.c22
-rw-r--r--users/spidey3/spidey3.c6
-rw-r--r--users/spidey3/spidey3_unicode.c2
4 files changed, 16 insertions, 16 deletions
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);
}