summaryrefslogtreecommitdiff
path: root/users/drashna/keyrecords
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2022-07-02 19:55:46 -0700
committerGitHub <noreply@github.com>2022-07-02 19:55:46 -0700
commit1c43410e266429c97786c9f9217ab9708bb2754d (patch)
tree1b75461c4ac738bf455d0b6a1e6fe4bd88628f35 /users/drashna/keyrecords
parenta3119385a41fb7662d46e7e7062cd2a76dfc1870 (diff)
[Keymap] Updates to drashna Keymaps and Userspace (#17543)
Diffstat (limited to 'users/drashna/keyrecords')
-rw-r--r--users/drashna/keyrecords/autocorrection/autocorrection.c24
-rw-r--r--users/drashna/keyrecords/process_records.c36
-rw-r--r--users/drashna/keyrecords/process_records.h99
-rw-r--r--users/drashna/keyrecords/tap_dances.c2
-rw-r--r--users/drashna/keyrecords/tap_dances.h2
-rw-r--r--users/drashna/keyrecords/tapping.c6
-rw-r--r--users/drashna/keyrecords/unicode.c135
-rw-r--r--users/drashna/keyrecords/unicode.h1
8 files changed, 179 insertions, 126 deletions
diff --git a/users/drashna/keyrecords/autocorrection/autocorrection.c b/users/drashna/keyrecords/autocorrection/autocorrection.c
index 682d6fd49c..90fdba8f5e 100644
--- a/users/drashna/keyrecords/autocorrection/autocorrection.c
+++ b/users/drashna/keyrecords/autocorrection/autocorrection.c
@@ -52,7 +52,7 @@ void autocorrect_enable(void) {
*/
void autocorrect_disable(void) {
userspace_config.autocorrection = false;
- typo_buffer_size = 0;
+ typo_buffer_size = 0;
eeconfig_update_user(userspace_config.raw);
}
@@ -62,7 +62,7 @@ void autocorrect_disable(void) {
*/
void autocorrect_toggle(void) {
userspace_config.autocorrection = !userspace_config.autocorrection;
- typo_buffer_size = 0;
+ typo_buffer_size = 0;
eeconfig_update_user(userspace_config.raw);
}
@@ -98,15 +98,15 @@ __attribute__((weak)) bool process_autocorrect_user(uint16_t *keycode, keyrecord
}
*keycode &= 0xFF; // Get the basic keycode.
return true;
-#ifndef NO_ACTION_TAPPING
+# ifndef NO_ACTION_TAPPING
// Exclude tap-hold keys when they are held down
// and mask for base keycode when they are tapped.
case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
-# ifdef NO_ACTION_LAYER
+# ifdef NO_ACTION_LAYER
// Exclude Layer Tap, if layers are disabled
// but action tapping is still enabled.
return false;
-# endif
+# endif
case QK_MOD_TAP ... QK_MOD_TAP_MAX:
// Exclude hold keycode
if (!record->tap.count) {
@@ -114,25 +114,25 @@ __attribute__((weak)) bool process_autocorrect_user(uint16_t *keycode, keyrecord
}
*keycode &= 0xFF;
break;
-#else
+# else
case QK_MOD_TAP ... QK_MOD_TAP_MAX:
case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
// Exclude if disabled
return false;
-#endif
+# endif
// Exclude swap hands keys when they are held down
// and mask for base keycode when they are tapped.
case QK_SWAP_HANDS ... QK_SWAP_HANDS_MAX:
-#ifdef SWAP_HANDS_ENABLE
+# ifdef SWAP_HANDS_ENABLE
if (*keycode >= 0x56F0 || !record->tap.count) {
return false;
}
*keycode &= 0xFF;
break;
-#else
+# else
// Exclude if disabled
return false;
-#endif
+# endif
}
// Disable autocorrect while a mod other than shift is active.
@@ -166,9 +166,9 @@ __attribute__((weak)) bool apply_autocorrect(uint8_t backspaces, const char *str
*/
bool process_autocorrection(uint16_t keycode, keyrecord_t *record) {
uint8_t mods = get_mods();
-#ifndef NO_ACTION_ONESHOT
+# ifndef NO_ACTION_ONESHOT
mods |= get_oneshot_mods();
-#endif
+# endif
if ((keycode >= AUTOCORRECT_ON && keycode <= AUTOCORRECT_TOGGLE) && record->event.pressed) {
if (keycode == AUTOCORRECT_ON) {
diff --git a/users/drashna/keyrecords/process_records.c b/users/drashna/keyrecords/process_records.c
index 240156e816..c328451b75 100644
--- a/users/drashna/keyrecords/process_records.c
+++ b/users/drashna/keyrecords/process_records.c
@@ -20,8 +20,12 @@ bool host_driver_disabled = false;
*
* This handles the keycodes at the keymap level, useful for keyboard specific customization
*/
-__attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; }
-__attribute__((weak)) bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { return true; }
+__attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
+ return true;
+}
+__attribute__((weak)) bool process_record_secrets(uint16_t keycode, keyrecord_t *record) {
+ return true;
+}
/**
* @brief Main user keycode handler
@@ -46,10 +50,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// If console is enabled, it will print the matrix position and status of each key pressed
#ifdef KEYLOGGER_ENABLE
uprintf("KL: kc: 0x%04X, col: %2u, row: %2u, pressed: %b, time: %5u, int: %b, count: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed, record->event.time, record->tap.interrupted, record->tap.count);
-#endif // KEYLOGGER_ENABLE
+#endif // KEYLOGGER_ENABLE
#if defined(OLED_ENABLE) && defined(CUSTOM_OLED_DRIVER)
process_record_user_oled(keycode, record);
-#endif // OLED
+#endif // OLED
if (!(process_record_keymap(keycode, record) && process_record_secrets(keycode, record)
#ifdef CUSTOM_RGB_MATRIX
@@ -90,34 +94,34 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
break;
- case VRSN: // Prints firmware version
+ 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);
}
break;
- case KC_DIABLO_CLEAR: // reset all Diablo timers, disabling them
+ case KC_DIABLO_CLEAR: // reset all Diablo timers, disabling them
#ifdef TAP_DANCE_ENABLE
if (record->event.pressed) {
for (uint8_t index = 0; index < 4; index++) {
diablo_timer[index].key_interval = 0;
}
}
-#endif // TAP_DANCE_ENABLE
+#endif // TAP_DANCE_ENABLE
break;
- case KC_CCCV: // One key copy/paste
+ case KC_CCCV: // One key copy/paste
if (record->event.pressed) {
copy_paste_timer = timer_read();
} else {
- if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy
+ if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy
tap_code16(LCTL(KC_C));
- } else { // Tap, paste
+ } else { // Tap, paste
tap_code16(LCTL(KC_V));
}
}
break;
- case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal
+ case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal
#if defined(CUSTOM_RGBLIGHT) || defined(CUSTOM_RGB_MATRIX)
if (record->event.pressed) {
userspace_config.rgb_layer_change ^= 1;
@@ -140,7 +144,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
# endif
}
}
-#endif // CUSTOM_RGBLIGHT
+#endif // CUSTOM_RGBLIGHT
break;
#if defined(CUSTOM_RGBLIGHT) || defined(CUSTOM_RGB_MATRIX)
@@ -160,7 +164,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return false;
break;
- case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions
+ case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions
if (record->event.pressed) {
bool is_eeprom_updated;
# if defined(CUSTOM_RGBLIGHT) && !defined(RGBLIGHT_DISABLE_KEYCODES)
@@ -200,9 +204,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
break;
}
- }
+ }
return true;
}
__attribute__((weak)) void post_process_record_keymap(uint16_t keycode, keyrecord_t *record) {}
-void post_process_record_user(uint16_t keycode, keyrecord_t *record) { post_process_record_keymap(keycode, record); }
+void post_process_record_user(uint16_t keycode, keyrecord_t *record) {
+ post_process_record_keymap(keycode, record);
+}
diff --git a/users/drashna/keyrecords/process_records.h b/users/drashna/keyrecords/process_records.h
index e83e4ce308..be31f992cb 100644
--- a/users/drashna/keyrecords/process_records.h
+++ b/users/drashna/keyrecords/process_records.h
@@ -13,30 +13,30 @@
#endif
enum userspace_custom_keycodes {
- VRSN = PLACEHOLDER_SAFE_RANGE, // 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 = PLACEHOLDER_SAFE_RANGE, // 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, // ಠ_ಠ
UC_IRNY,
UC_CLUE,
- KEYLOCK, // Locks keyboard by unmounting driver
+ KEYLOCK, // Locks keyboard by unmounting driver
KC_NOMODE,
KC_WIDE,
KC_SCRIPT,
@@ -44,11 +44,12 @@ enum userspace_custom_keycodes {
KC_REGIONAL,
KC_AUSSIE,
KC_ZALGO,
+ KC_SUPER,
KC_ACCEL,
AUTOCORRECT_ON,
AUTOCORRECT_OFF,
AUTOCORRECT_TOGGLE,
- NEW_SAFE_RANGE // use "NEWPLACEHOLDER for keymap specific codes
+ NEW_SAFE_RANGE // use "NEWPLACEHOLDER for keymap specific codes
};
bool process_record_secrets(uint16_t keycode, keyrecord_t *record);
@@ -58,37 +59,37 @@ void post_process_record_keymap(uint16_t keycode, keyrecord_t *record);
bool process_record_unicode(uint16_t keycode, keyrecord_t *record);
#endif
-#define LOWER MO(_LOWER)
-#define RAISE MO(_RAISE)
-#define ADJUST MO(_ADJUST)
-#define TG_MODS OS_TOGG
-#define TG_GAME TG(_GAMEPAD)
-#define TG_DBLO TG(_DIABLO)
-#define OS_LWR OSL(_LOWER)
-#define OS_RSE OSL(_RAISE)
+#define LOWER MO(_LOWER)
+#define RAISE MO(_RAISE)
+#define ADJUST MO(_ADJUST)
+#define TG_MODS OS_TOGG
+#define TG_GAME TG(_GAMEPAD)
+#define TG_DBLO TG(_DIABLO)
+#define OS_LWR OSL(_LOWER)
+#define OS_RSE OSL(_RAISE)
-#define KC_SEC1 KC_SECRET_1
-#define KC_SEC2 KC_SECRET_2
-#define KC_SEC3 KC_SECRET_3
-#define KC_SEC4 KC_SECRET_4
-#define KC_SEC5 KC_SECRET_5
+#define KC_SEC1 KC_SECRET_1
+#define KC_SEC2 KC_SECRET_2
+#define KC_SEC3 KC_SECRET_3
+#define KC_SEC4 KC_SECRET_4
+#define KC_SEC5 KC_SECRET_5
-#define QWERTY KC_QWERTY
-#define DVORAK KC_DVORAK
-#define COLEMAK KC_COLEMAK
+#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)
+#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 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)
@@ -99,9 +100,9 @@ bool process_record_unicode(uint16_t keycode, keyrecord_t *record);
# define KC_C1R3 SH_T(KC_TAB)
#elif defined(DRASHNA_LP)
# define KC_C1R3 TG(_GAMEPAD)
-#else // SWAP_HANDS_ENABLE
+#else // SWAP_HANDS_ENABLE
# define KC_C1R3 KC_TAB
-#endif // SWAP_HANDS_ENABLE
+#endif // SWAP_HANDS_ENABLE
#define BK_LWER LT(_LOWER, KC_BSPC)
#define SP_LWER LT(_LOWER, KC_SPC)
@@ -120,7 +121,7 @@ bool process_record_unicode(uint16_t keycode, keyrecord_t *record);
#define OS_RCTL OSM(MOD_RCTL)
#define OS_LALT OSM(MOD_LALT)
#define OS_RALT OSM(MOD_RALT)
-#define OS_MEH OSM(MOD_MEH)
+#define OS_MEH OSM(MOD_MEH)
#define OS_HYPR OSM(MOD_HYPR)
#define ALT_APP ALT_T(KC_APP)
@@ -138,9 +139,9 @@ We use custom codes here, so we can substitute the right stuff
# define KC_D3_2 TD(TD_D3_2)
# define KC_D3_3 TD(TD_D3_3)
# define KC_D3_4 TD(TD_D3_4)
-#else // TAP_DANCE_ENABLE
+#else // TAP_DANCE_ENABLE
# define KC_D3_1 KC_1
# define KC_D3_2 KC_2
# define KC_D3_3 KC_3
# define KC_D3_4 KC_4
-#endif // TAP_DANCE_ENABLE
+#endif // TAP_DANCE_ENABLE
diff --git a/users/drashna/keyrecords/tap_dances.c b/users/drashna/keyrecords/tap_dances.c
index a1a7439164..6caf6b6b3e 100644
--- a/users/drashna/keyrecords/tap_dances.c
+++ b/users/drashna/keyrecords/tap_dances.c
@@ -26,7 +26,7 @@ void diablo_tapdance_master(qk_tap_dance_state_t *state, void *user_data) {
if (state->count >= (sizeof(diablo_times) / sizeof(uint8_t))) {
diablo_timer[diablo_keys->index].key_interval = 0;
reset_tap_dance(state);
- } else { // else set the interval (tapdance count starts at 1, array starts at 0, so offset by one)
+ } else { // else set the interval (tapdance count starts at 1, array starts at 0, so offset by one)
diablo_timer[diablo_keys->index].key_interval = diablo_times[state->count - 1];
}
}
diff --git a/users/drashna/keyrecords/tap_dances.h b/users/drashna/keyrecords/tap_dances.h
index d9baedc867..81d1f07fe0 100644
--- a/users/drashna/keyrecords/tap_dances.h
+++ b/users/drashna/keyrecords/tap_dances.h
@@ -28,4 +28,4 @@ enum {
TD_D3_3,
TD_D3_4,
};
-#endif // TAP_DANCE_ENABLE
+#endif // TAP_DANCE_ENABLE
diff --git a/users/drashna/keyrecords/tapping.c b/users/drashna/keyrecords/tapping.c
index 9c4892b33d..daba25bd72 100644
--- a/users/drashna/keyrecords/tapping.c
+++ b/users/drashna/keyrecords/tapping.c
@@ -29,10 +29,10 @@ __attribute__((weak)) bool get_hold_on_other_key_press(uint16_t keycode, keyreco
// Do not select the hold action when another key is pressed.
// return false;
switch (keycode) {
- case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
- return true;
+// case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
+// return true;
default:
- return false;
+ return true;
}
}
diff --git a/users/drashna/keyrecords/unicode.c b/users/drashna/keyrecords/unicode.c
index c1fe8df2c3..ea51b26061 100644
--- a/users/drashna/keyrecords/unicode.c
+++ b/users/drashna/keyrecords/unicode.c
@@ -69,7 +69,7 @@ bool process_record_glyph_replacement(uint16_t keycode, keyrecord_t *record, tra
}
return false;
} else if (KC_1 <= keycode && keycode <= KC_0) {
- if (is_shifted) { // skip shifted numbers, so that we can still use symbols etc.
+ if (is_shifted) { // skip shifted numbers, so that we can still use symbols etc.
return process_record_keymap(keycode, record);
}
if (record->event.pressed) {
@@ -92,42 +92,81 @@ DEFINE_UNICODE_RANGE_TRANSLATOR(unicode_range_translator_boxes, 0x1F170, 0x1F170
DEFINE_UNICODE_RANGE_TRANSLATOR(unicode_range_translator_regional, 0x1F1E6, 0x1F1E6, '0', '1', 0x2003);
DEFINE_UNICODE_LUT_TRANSLATOR(unicode_lut_translator_aussie,
- 0x0250, // a
- 'q', // b
- 0x0254, // c
- 'p', // d
- 0x01DD, // e
- 0x025F, // f
- 0x0183, // g
- 0x0265, // h
- 0x1D09, // i
- 0x027E, // j
- 0x029E, // k
- 'l', // l
- 0x026F, // m
- 'u', // n
- 'o', // o
- 'd', // p
- 'b', // q
- 0x0279, // r
- 's', // s
- 0x0287, // t
- 'n', // u
- 0x028C, // v
- 0x028D, // w
- 0x2717, // x
- 0x028E, // y
- 'z', // z
- 0x0269, // 1
- 0x3139, // 2
- 0x0190, // 3
- 0x3123, // 4
- 0x03DB, // 5
- '9', // 6
- 0x3125, // 7
- '8', // 8
- '6', // 9
- '0' // 0
+ 0x0250, // a
+ 'q', // b
+ 0x0254, // c
+ 'p', // d
+ 0x01DD, // e
+ 0x025F, // f
+ 0x0183, // g
+ 0x0265, // h
+ 0x1D09, // i
+ 0x027E, // j
+ 0x029E, // k
+ 'l', // l
+ 0x026F, // m
+ 'u', // n
+ 'o', // o
+ 'd', // p
+ 'b', // q
+ 0x0279, // r
+ 's', // s
+ 0x0287, // t
+ 'n', // u
+ 0x028C, // v
+ 0x028D, // w
+ 0x2717, // x
+ 0x028E, // y
+ 'z', // z
+ 0x0269, // 1
+ 0x3139, // 2
+ 0x0190, // 3
+ 0x3123, // 4
+ 0x03DB, // 5
+ '9', // 6
+ 0x3125, // 7
+ '8', // 8
+ '6', // 9
+ '0' // 0
+);
+
+DEFINE_UNICODE_LUT_TRANSLATOR(unicode_lut_translator_super,
+ 0x1D43, // a
+ 0x1D47, // b
+ 0x1D9C, // c
+ 0x1D48, // d
+ 0x1D49, // e
+ 0x1DA0, // f
+ 0x1D4D, // g
+ 0x02B0, // h
+ 0x2071, // i
+ 0x02B2, // j
+ 0x1D4F, // k
+ 0x1D4F, // l
+ 0x1D50, // m
+ 0x207F, // n
+ 0x1D52, // o
+ 0x1D56, // p
+ 0x06F9, // q
+ 0x02B3, // r
+ 0x02E2, // s
+ 0x1D57, // t
+ 0x1D58, // u
+ 0x1D5B, // v
+ 0x02B7, // w
+ 0x02E3, // x
+ 0x02B8, // y
+ 0x1DBB, // z
+ 0x00B9, // 1
+ 0x00B2, // 2
+ 0x00B3, // 3
+ 0x2074, // 4
+ 0x2075, // 5
+ 0x2076, // 6
+ 0x2077, // 7
+ 0x2078, // 8
+ 0x2079, // 9
+ 0x2070 // 0
);
bool process_record_aussie(uint16_t keycode, keyrecord_t *record) {
@@ -207,41 +246,41 @@ bool process_record_zalgo(uint16_t keycode, keyrecord_t *record) {
bool process_record_unicode(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
- case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻
+ case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻
if (record->event.pressed) {
send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻");
}
break;
- case UC_TABL: // ┬─┬ノ( º _ ºノ)
+ case UC_TABL: // ┬─┬ノ( º _ ºノ)
if (record->event.pressed) {
send_unicode_string("┬─┬ノ( º _ ºノ)");
}
break;
- case UC_SHRG: // ¯\_(ツ)_/¯
+ case UC_SHRG: // ¯\_(ツ)_/¯
if (record->event.pressed) {
send_unicode_string("¯\\_(ツ)_/¯");
}
break;
- case UC_DISA: // ಠ_ಠ
+ case UC_DISA: // ಠ_ಠ
if (record->event.pressed) {
send_unicode_string("ಠ_ಠ");
}
break;
- case UC_IRNY: // ⸮
+ case UC_IRNY: // ⸮
if (record->event.pressed) {
register_unicode(0x2E2E);
}
break;
- case UC_CLUE: // ‽
+ case UC_CLUE: // ‽
if (record->event.pressed) {
register_unicode(0x203D);
}
break;
- case KC_NOMODE ... KC_ZALGO:
+ case KC_NOMODE ... KC_SUPER:
if (record->event.pressed) {
if (typing_mode != keycode - KC_NOMODE) {
typing_mode = keycode - KC_NOMODE;
@@ -280,6 +319,10 @@ bool process_record_unicode(uint16_t keycode, keyrecord_t *record) {
return false;
}
}
+ } else if (typing_mode == UCTM_SUPER) {
+ if (((KC_A <= keycode) && (keycode <= KC_0))) {
+ return process_record_glyph_replacement(keycode, record, unicode_lut_translator_super);
+ }
} else if (typing_mode == UCTM_AUSSIE) {
return process_record_aussie(keycode, record);
} else if (typing_mode == UCTM_ZALGO) {
@@ -292,4 +335,6 @@ bool process_record_unicode(uint16_t keycode, keyrecord_t *record) {
* @brief Initialize the default unicode mode on firmware startu
*
*/
-void matrix_init_unicode(void) { unicode_input_mode_init(); }
+void matrix_init_unicode(void) {
+ unicode_input_mode_init();
+}
diff --git a/users/drashna/keyrecords/unicode.h b/users/drashna/keyrecords/unicode.h
index dd261d3406..6885d4dd7f 100644
--- a/users/drashna/keyrecords/unicode.h
+++ b/users/drashna/keyrecords/unicode.h
@@ -11,6 +11,7 @@ enum unicode_typing_mode {
UCTM_REGIONAL,
UCTM_AUSSIE,
UCTM_ZALGO,
+ UCTM_SUPER,
};
extern uint8_t typing_mode;