You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.4 KiB

  1. /* Copyright 2019-2021 Konstantin Đorđević <vomindoraan@gmail.com>
  2. *
  3. * This program is free software: you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License as published by
  5. * the Free Software Foundation, either version 2 of the License, or
  6. * (at your option) any later version.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #pragma once
  17. #include "quantum.h"
  18. #define FOREACH_UNICODE(M) \
  19. M(COMMA, 0x002C) \
  20. M(L_PAREN, 0x0028) \
  21. M(R_PAREN, 0x0029) \
  22. M(EQUALS, 0x003D) \
  23. M(TIMES, 0x00D7) \
  24. M(DIVIDE, 0x00F7) \
  25. M(MINUS, 0x2212)
  26. #define UC_KEYCODE(name, code) name = UC(code),
  27. #define UCM_NAME(name, code) UCM_ ## name,
  28. #define UCM_ENTRY(name, code) [UCM_ ## name] = code,
  29. #define UCM_KEYCODE(name, code) name = X(UCM_ ## name),
  30. #if defined(UNICODE_ENABLE)
  31. enum unicode_keycodes {
  32. FOREACH_UNICODE(UC_KEYCODE)
  33. };
  34. #elif defined(UNICODEMAP_ENABLE)
  35. enum unicode_names {
  36. FOREACH_UNICODE(UCM_NAME)
  37. };
  38. extern const uint32_t PROGMEM unicode_map[];
  39. enum unicode_keycodes {
  40. FOREACH_UNICODE(UCM_KEYCODE)
  41. };
  42. #endif