]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
process_unicode: Add get_unicode_input_mode()
authorGergely Nagy <algernon@madhouse-project.org>
Wed, 31 Aug 2016 06:21:52 +0000 (08:21 +0200)
committerGergely Nagy <algernon@madhouse-project.org>
Wed, 31 Aug 2016 06:21:52 +0000 (08:21 +0200)
There may be cases where one would like to know the current Unicode
input mode, without having to keep track of it themselves. Add a
function that does just this.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
quantum/process_keycode/process_unicode.c
quantum/process_keycode/process_unicode.h

index 06c1694f2e7b1753f714998a6a8ae758df610263..a5d7dca21eeb2fe145ba34c717dc0b98a341642e 100644 (file)
@@ -18,6 +18,10 @@ void set_unicode_input_mode(uint8_t os_target)
   input_mode = os_target;
 }
 
+uint8_t get_unicode_input_mode(void) {
+  return input_mode;
+}
+
 __attribute__((weak))
 void unicode_input_start (void) {
   switch(input_mode) {
index 02ce3dd7e05c4dadef3443536872419c5fc4f214..27f8072ee66256fb6c8807b543b9b41716864904 100644 (file)
@@ -13,6 +13,7 @@
 #endif
 
 void set_unicode_input_mode(uint8_t os_target);
+uint8_t get_unicode_input_mode(void);
 void unicode_input_start(void);
 void unicode_input_finish(void);
 void register_hex(uint16_t hex);