summaryrefslogtreecommitdiff
path: root/users/spidey3/spidey3.c
diff options
context:
space:
mode:
authorJoshua Diamond <josh@windowoffire.com>2022-08-28 13:10:28 -0400
committerGitHub <noreply@github.com>2022-08-28 10:10:28 -0700
commit37a85e1f9b5d6ad28e52b800f1b17d68ee5e4892 (patch)
tree292c6e4525523d125ed99c8b7b5b29b18c2a4667 /users/spidey3/spidey3.c
parentef0c87c976ff298f2e34e417808ed816f7ecb0b5 (diff)
More spidey3 userspace cleanup (#18049)
Diffstat (limited to 'users/spidey3/spidey3.c')
-rw-r--r--users/spidey3/spidey3.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/users/spidey3/spidey3.c b/users/spidey3/spidey3.c
index e993f4828e..842bb465f7 100644
--- a/users/spidey3/spidey3.c
+++ b/users/spidey3/spidey3.c
@@ -55,7 +55,8 @@ void matrix_scan_user(void) {
}
static uint32_t math_glyph_exceptions(const uint16_t keycode, const bool shifted) {
- if (shifted) {
+ bool caps = host_keyboard_led_state().caps_lock;
+ if (shifted != caps) {
switch (keycode) {
// clang-format off
case KC_C: return 0x2102;
@@ -97,7 +98,8 @@ bool process_record_glyph_replacement(uint16_t keycode, keyrecord_t *record, uin
clear_oneshot_mods();
#endif
- uint32_t base = shifted ? baseAlphaUpper : baseAlphaLower;
+ bool caps = host_keyboard_led_state().caps_lock;
+ uint32_t base = ((shifted == caps) ? baseAlphaLower : baseAlphaUpper);
_register(base + (keycode - KC_A));
set_mods(temp_mod);
}
@@ -201,11 +203,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
case CH_ASST: host_consumer_send(AL_ASSISTANT); return false;
case CH_SUSP: tap_code16(LGUI(LSFT(KC_L))); return true;
-#if defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)
- case SPI_LNX: set_unicode_input_mode(UC_LNX); break;
- case SPI_OSX: set_unicode_input_mode(UC_OSX); break;
- case SPI_WIN: set_unicode_input_mode(UC_WINC); break;
-#endif
// clang-format on
case SPI_NORMAL ... SPI_MATH: