summaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-08-27 16:51:19 +1000
committerGitHub <noreply@github.com>2023-08-27 16:51:19 +1000
commit66b744b63b6328a206f9ab463b4acb44002e4bb0 (patch)
tree8a5d4a8b4222301ec9145a4bbd799cc72e33de41 /keyboards
parent70e34e491c297231a3f987fd69760d38e79dbfa4 (diff)
Clean up Unicode API usage in user keymaps (#21849)
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/input_club/ergodox_infinity/keymaps/not-quite-neo/keymap.c20
-rw-r--r--keyboards/planck/keymaps/rootiest/keymap.c16
2 files changed, 6 insertions, 30 deletions
diff --git a/keyboards/input_club/ergodox_infinity/keymaps/not-quite-neo/keymap.c b/keyboards/input_club/ergodox_infinity/keymaps/not-quite-neo/keymap.c
index a345e075d9..a49fe882ea 100644
--- a/keyboards/input_club/ergodox_infinity/keymaps/not-quite-neo/keymap.c
+++ b/keyboards/input_club/ergodox_infinity/keymaps/not-quite-neo/keymap.c
@@ -21,11 +21,6 @@ A layout based on neo2
#endif
#define LEADER_TIMEOUT 300
-#define TAP_ONCE(code) \
- register_code (code); \
- unregister_code (code)
-
-
// Automatic number generation of important keywords
enum my_keycodes{
// Layer numbers follow the neo2 terminology, i.e. base layer = layer 1
@@ -257,22 +252,11 @@ L06 -> <TBD>: UNSPECIFIED
void leader_end_user(void) {
if (leader_sequence_one_key(KC_1)) {
- // ¯\_(ツ)_/¯
- unicode_input_start(); register_hex(0xaf); unicode_input_finish();
- register_code (KC_RALT); TAP_ONCE (KC_MINS); unregister_code (KC_RALT);
- register_code (KC_RSFT); TAP_ONCE (KC_8); unregister_code (KC_RSFT);
- unicode_input_start (); register_hex(0x30c4); unicode_input_finish();
- register_code (KC_RSFT); TAP_ONCE (KC_9); TAP_ONCE(KC_7); unregister_code (KC_RSFT);
- unicode_input_start (); register_hex(0xaf); unicode_input_finish();
+ send_unicode_string("¯\\_(ツ)_/¯");
}
if (leader_sequence_one_key(KC_2)) {
- // 凸(ツ)凸
- unicode_input_start(); register_hex(0x51F8); unicode_input_finish();
- register_code (KC_RSFT); TAP_ONCE (KC_8); unregister_code (KC_RSFT);
- unicode_input_start (); register_hex(0x30c4); unicode_input_finish();
- register_code (KC_RSFT); TAP_ONCE (KC_9); unregister_code (KC_RSFT);
- unicode_input_start (); register_hex(0x51F8); unicode_input_finish();
+ send_unicode_string("凸(ツ)凸");
}
}
diff --git a/keyboards/planck/keymaps/rootiest/keymap.c b/keyboards/planck/keymaps/rootiest/keymap.c
index d6e8c7ef0f..a8ff2dd8d9 100644
--- a/keyboards/planck/keymaps/rootiest/keymap.c
+++ b/keyboards/planck/keymaps/rootiest/keymap.c
@@ -1328,33 +1328,25 @@ void send_degree_symbol(tap_dance_state_t* state, void* user_data) {
switch (state->count) {
case 4:
// ℃
- unicode_input_start();
- register_hex(0x2103);
- unicode_input_finish();
+ register_unicode(0x2103);
print("You pressed the Degrees key 4 times!\n");
reset_tap_dance(state);
break;
case 3:
//℉
- unicode_input_start();
- register_hex(0x2109);
- unicode_input_finish();
+ register_unicode(0x2109);
print("You pressed the Degrees key 3 times!\n");
reset_tap_dance(state);
break;
case 2:
// €
- unicode_input_start();
- register_hex(0x20AC);
- unicode_input_finish();
+ register_unicode(0x20AC);
print("You pressed the Degrees key 2 times!\n");
reset_tap_dance(state);
break;
case 1:
// °
- unicode_input_start();
- register_hex(0x00B0);
- unicode_input_finish();
+ register_unicode(0x00B0);
print("You pressed the Degrees key 1 time!\n");
reset_tap_dance(state);
break;