summaryrefslogtreecommitdiff
path: root/quantum/unicode/unicodemap.h
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2023-08-29 21:24:43 +1000
committerNick Brassel <nick@tzarc.org>2023-08-29 21:24:43 +1000
commit31a91add168c956655ace8ec4cf9750db1e2cfc6 (patch)
tree12cea9b5f8e769f9611a31cbaede9537edad71cc /quantum/unicode/unicodemap.h
parentf07490bc092e365ba03dc685b3fc30ad0bf0b752 (diff)
parentedaf8a87ef3164f8986b0a8eb171d4879b45414c (diff)
Merge branch 'develop'
Diffstat (limited to 'quantum/unicode/unicodemap.h')
-rw-r--r--quantum/unicode/unicodemap.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/quantum/unicode/unicodemap.h b/quantum/unicode/unicodemap.h
new file mode 100644
index 0000000000..00d2aec8fa
--- /dev/null
+++ b/quantum/unicode/unicodemap.h
@@ -0,0 +1,43 @@
+// Copyright 2023 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include <stdint.h>
+#include "progmem.h"
+
+/**
+ * \file
+ *
+ * \defgroup unicodemap Unicode Map
+ * \{
+ */
+
+extern const uint32_t unicode_map[] PROGMEM;
+
+/**
+ * \brief Get the index into the `unicode_map` array for the given keycode, respecting shift state for pair keycodes.
+ *
+ * \param keycode The Unicode Map keycode to get the index of.
+ *
+ * \return An index into the `unicode_map` array.
+ */
+uint8_t unicodemap_index(uint16_t keycode);
+
+/**
+ * \brief Get the code point for the given index in the `unicode_map` array.
+ *
+ * \param index The index into the `unicode_map` array.
+ *
+ * \return A Unicode code point value.
+ */
+uint32_t unicodemap_get_code_point(uint8_t index);
+
+/**
+ * \brief Send the code point for the given index in the `unicode_map` array.
+ *
+ * \param index The index into the `unicode_map` array.
+ */
+void register_unicodemap(uint8_t index);
+
+/** \} */