2021-09-19 11:47:40 -07:00
|
|
|
/* Copyright 2019-2021 Konstantin Đorđević <vomindoraan@gmail.com>
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2019-01-14 09:09:47 -08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "quantum.h"
|
|
|
|
|
2019-02-11 14:21:41 -08:00
|
|
|
#define FOREACH_UNICODE(M) \
|
2019-05-06 08:41:45 -07:00
|
|
|
M(COMMA, 0x002C) \
|
|
|
|
M(L_PAREN, 0x0028) \
|
|
|
|
M(R_PAREN, 0x0029) \
|
|
|
|
M(EQUALS, 0x003D) \
|
|
|
|
M(TIMES, 0x00D7) \
|
|
|
|
M(DIVIDE, 0x00F7) \
|
|
|
|
M(MINUS, 0x2212)
|
2019-02-11 14:21:41 -08:00
|
|
|
|
|
|
|
#define UC_KEYCODE(name, code) name = UC(code),
|
|
|
|
|
2019-02-11 15:18:52 -08:00
|
|
|
#define UCM_NAME(name, code) UCM_ ## name,
|
|
|
|
#define UCM_ENTRY(name, code) [UCM_ ## name] = code,
|
2023-06-01 09:25:08 -07:00
|
|
|
#define UCM_KEYCODE(name, code) name = UM(UCM_ ## name),
|
2019-02-11 14:21:41 -08:00
|
|
|
|
|
|
|
#if defined(UNICODE_ENABLE)
|
2019-02-17 19:34:55 -08:00
|
|
|
enum unicode_keycodes {
|
2019-05-06 08:41:45 -07:00
|
|
|
FOREACH_UNICODE(UC_KEYCODE)
|
2019-02-17 19:34:55 -08:00
|
|
|
};
|
2019-02-11 14:21:41 -08:00
|
|
|
#elif defined(UNICODEMAP_ENABLE)
|
2019-02-17 19:34:55 -08:00
|
|
|
enum unicode_names {
|
2019-05-06 08:41:45 -07:00
|
|
|
FOREACH_UNICODE(UCM_NAME)
|
2019-02-17 19:34:55 -08:00
|
|
|
};
|
2019-02-11 14:21:41 -08:00
|
|
|
|
2022-12-31 16:54:12 -08:00
|
|
|
extern const uint32_t unicode_map[] PROGMEM;
|
2019-02-11 14:21:41 -08:00
|
|
|
|
2019-02-17 19:34:55 -08:00
|
|
|
enum unicode_keycodes {
|
2019-05-06 08:41:45 -07:00
|
|
|
FOREACH_UNICODE(UCM_KEYCODE)
|
2019-02-17 19:34:55 -08:00
|
|
|
};
|
2019-02-11 14:21:41 -08:00
|
|
|
#endif
|