From 81594c7883deefedbcd317c72c1b1f1d32e65cd7 Mon Sep 17 00:00:00 2001 From: coderkun Date: Sun, 21 Aug 2016 21:02:18 +0200 Subject: [PATCH] =?UTF-8?q?Drop=20method=20to=20set=20Unicode=20input=20ke?= =?UTF-8?q?y=20and=20declare=20start=20and=20finish=20methods=20as=20?= =?UTF-8?q?=E2=80=9Cweak=E2=80=9D=20instead?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- quantum/process_keycode/process_unicode.c | 12 ++++-------- quantum/process_keycode/process_unicode.h | 5 ----- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c index 422217b6d..a1be8d2fc 100644 --- a/quantum/process_keycode/process_unicode.c +++ b/quantum/process_keycode/process_unicode.c @@ -1,7 +1,6 @@ #include "process_unicode.h" static uint8_t input_mode; -static uint16_t linux_key = UNICODE_LNX_KEY; uint16_t hex_to_keycode(uint8_t hex) { @@ -19,11 +18,7 @@ void set_unicode_input_mode(uint8_t os_target) input_mode = os_target; } -void set_unicode_input_key_lnx(uint16_t key) -{ - linux_key = key; -} - +__attribute__((weak)) void unicode_input_start (void) { switch(input_mode) { case UC_OSX: @@ -32,8 +27,8 @@ void unicode_input_start (void) { case UC_LNX: register_code(KC_LCTL); register_code(KC_LSFT); - register_code(linux_key); - unregister_code(linux_key); + register_code(KC_U); + unregister_code(KC_U); unregister_code(KC_LSFT); unregister_code(KC_LCTL); break; @@ -46,6 +41,7 @@ void unicode_input_start (void) { wait_ms(UNICODE_TYPE_DELAY); } +__attribute__((weak)) void unicode_input_finish (void) { switch(input_mode) { case UC_OSX: diff --git a/quantum/process_keycode/process_unicode.h b/quantum/process_keycode/process_unicode.h index 60a116ab7..85364e8eb 100644 --- a/quantum/process_keycode/process_unicode.h +++ b/quantum/process_keycode/process_unicode.h @@ -8,16 +8,11 @@ #define UC_WIN 2 #define UC_BSD 3 -#ifndef UNICODE_LNX_KEY -#define UNICODE_LNX_KEY KC_A -#endif - #ifndef UNICODE_TYPE_DELAY #define UNICODE_TYPE_DELAY 10 #endif void set_unicode_input_mode(uint8_t os_target); -void set_unicode_input_key_lnx(uint16_t linux_key); void unicode_input_start(void); void unicode_input_finish(void); void register_hex(uint16_t hex);