summaryrefslogtreecommitdiff
path: root/quantum/process_keycode/process_ucis.c
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/process_keycode/process_ucis.c')
-rw-r--r--quantum/process_keycode/process_ucis.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/quantum/process_keycode/process_ucis.c b/quantum/process_keycode/process_ucis.c
index 6a8d8f0ff6..646471bc4d 100644
--- a/quantum/process_keycode/process_ucis.c
+++ b/quantum/process_keycode/process_ucis.c
@@ -15,6 +15,9 @@
*/
#include "process_ucis.h"
+#include "unicode.h"
+#include "keycode.h"
+#include "wait.h"
qk_ucis_state_t qk_ucis_state;
@@ -26,9 +29,7 @@ void qk_ucis_start(void) {
}
__attribute__((weak)) void qk_ucis_start_user(void) {
- unicode_input_start();
- register_hex(0x2328); // ⌨
- unicode_input_finish();
+ register_unicode(0x2328); // ⌨
}
__attribute__((weak)) void qk_ucis_success(uint8_t symbol_index) {}
@@ -51,10 +52,7 @@ static bool is_uni_seq(char *seq) {
__attribute__((weak)) void qk_ucis_symbol_fallback(void) {
for (uint8_t i = 0; i < qk_ucis_state.count - 1; i++) {
- uint8_t keycode = qk_ucis_state.codes[i];
- register_code(keycode);
- unregister_code(keycode);
- wait_ms(UNICODE_TYPE_DELAY);
+ tap_code(qk_ucis_state.codes[i]);
}
}
@@ -63,7 +61,6 @@ __attribute__((weak)) void qk_ucis_cancel(void) {}
void register_ucis(const uint32_t *code_points) {
for (int i = 0; i < UCIS_MAX_CODE_POINTS && code_points[i]; i++) {
register_unicode(code_points[i]);
- wait_ms(UNICODE_TYPE_DELAY);
}
}
@@ -94,9 +91,7 @@ bool process_ucis(uint16_t keycode, keyrecord_t *record) {
case KC_ENTER:
case KC_ESCAPE:
for (uint8_t i = 0; i < qk_ucis_state.count; i++) {
- register_code(KC_BACKSPACE);
- unregister_code(KC_BACKSPACE);
- wait_ms(UNICODE_TYPE_DELAY);
+ tap_code(KC_BACKSPACE);
}
if (keycode == KC_ESCAPE) {