unicodemap.h
958 bytes
1// Copyright 2023 QMK
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#pragma once
5
6#include <stdint.h>
7#include "progmem.h"
8
9/**
10 * \file
11 *
12 * \defgroup unicodemap Unicode Map
13 * \{
14 */
15
16extern const uint32_t unicode_map[] PROGMEM;
17
18/**
19 * \brief Get the index into the `unicode_map` array for the given keycode, respecting shift state for pair keycodes.
20 *
21 * \param keycode The Unicode Map keycode to get the index of.
22 *
23 * \return An index into the `unicode_map` array.
24 */
25uint8_t unicodemap_index(uint16_t keycode);
26
27/**
28 * \brief Get the code point for the given index in the `unicode_map` array.
29 *
30 * \param index The index into the `unicode_map` array.
31 *
32 * \return A Unicode code point value.
33 */
34uint32_t unicodemap_get_code_point(uint8_t index);
35
36/**
37 * \brief Send the code point for the given index in the `unicode_map` array.
38 *
39 * \param index The index into the `unicode_map` array.
40 */
41void register_unicodemap(uint8_t index);
42
43/** \} */