process_unicode: Introduce a slight delay
When entering unicode codes, use some delay, so the OS has time to process the information. This is not needed on all systems, but some seem to require it. Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
This commit is contained in:
parent
43d08629cf
commit
e8845f0daf
@ -37,6 +37,7 @@ void unicode_input_start (void) {
|
|||||||
unregister_code(KC_PPLS);
|
unregister_code(KC_PPLS);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
wait_ms(UNICODE_TYPE_DELAY);
|
||||||
}
|
}
|
||||||
|
|
||||||
void unicode_input_finish (void) {
|
void unicode_input_finish (void) {
|
||||||
@ -109,6 +110,7 @@ void qk_ucis_symbol_fallback (void) {
|
|||||||
uint8_t code = qk_ucis_state.codes[i];
|
uint8_t code = qk_ucis_state.codes[i];
|
||||||
register_code(code);
|
register_code(code);
|
||||||
unregister_code(code);
|
unregister_code(code);
|
||||||
|
wait_ms(UNICODE_TYPE_DELAY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,6 +137,7 @@ void register_ucis(const char *hex) {
|
|||||||
if (kc) {
|
if (kc) {
|
||||||
register_code (kc);
|
register_code (kc);
|
||||||
unregister_code (kc);
|
unregister_code (kc);
|
||||||
|
wait_ms (UNICODE_TYPE_DELAY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -172,6 +175,7 @@ bool process_ucis (uint16_t keycode, keyrecord_t *record) {
|
|||||||
for (i = qk_ucis_state.count; i > 0; i--) {
|
for (i = qk_ucis_state.count; i > 0; i--) {
|
||||||
register_code (KC_BSPC);
|
register_code (KC_BSPC);
|
||||||
unregister_code (KC_BSPC);
|
unregister_code (KC_BSPC);
|
||||||
|
wait_ms(UNICODE_TYPE_DELAY);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (keycode == KC_ESC) {
|
if (keycode == KC_ESC) {
|
||||||
|
@ -8,6 +8,10 @@
|
|||||||
#define UC_WIN 2
|
#define UC_WIN 2
|
||||||
#define UC_BSD 3
|
#define UC_BSD 3
|
||||||
|
|
||||||
|
#ifndef UNICODE_TYPE_DELAY
|
||||||
|
#define UNICODE_TYPE_DELAY 10
|
||||||
|
#endif
|
||||||
|
|
||||||
void set_unicode_input_mode(uint8_t os_target);
|
void set_unicode_input_mode(uint8_t os_target);
|
||||||
void unicode_input_start(void);
|
void unicode_input_start(void);
|
||||||
void unicode_input_finish(void);
|
void unicode_input_finish(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user