manna-harbour_miryoku.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // Copyright 2022 Manna Harbour
  2. // https://github.com/manna-harbour/miryoku
  3. // 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/>.
  4. #pragma once
  5. #include "miryoku_babel/miryoku_layer_selection.h"
  6. #include "miryoku_babel/miryoku_layer_list.h"
  7. enum miryoku_layers {
  8. #define MIRYOKU_X(LAYER, STRING) U_##LAYER,
  9. MIRYOKU_LAYER_LIST
  10. #undef MIRYOKU_X
  11. };
  12. #define U_MACRO_VA_ARGS(macro, ...) macro(__VA_ARGS__)
  13. #if !defined (MIRYOKU_MAPPING)
  14. #define MIRYOKU_MAPPING LAYOUT_miryoku
  15. #endif
  16. #define U_NP KC_NO // key is not present
  17. #define U_NA KC_NO // present but not available for use
  18. #define U_NU KC_NO // available but not used
  19. #if defined (MIRYOKU_CLIPBOARD_FUN)
  20. #define U_RDO KC_AGIN
  21. #define U_PST KC_PSTE
  22. #define U_CPY KC_COPY
  23. #define U_CUT KC_CUT
  24. #define U_UND KC_UNDO
  25. #elif defined (MIRYOKU_CLIPBOARD_MAC)
  26. #define U_RDO SCMD(KC_Z)
  27. #define U_PST LCMD(KC_V)
  28. #define U_CPY LCMD(KC_C)
  29. #define U_CUT LCMD(KC_X)
  30. #define U_UND LCMD(KC_Z)
  31. #elif defined (MIRYOKU_CLIPBOARD_WIN)
  32. #define U_RDO C(KC_Y)
  33. #define U_PST C(KC_V)
  34. #define U_CPY C(KC_C)
  35. #define U_CUT C(KC_X)
  36. #define U_UND C(KC_Z)
  37. #else
  38. #define U_RDO KC_AGIN
  39. #define U_PST S(KC_INS)
  40. #define U_CPY C(KC_INS)
  41. #define U_CUT S(KC_DEL)
  42. #define U_UND KC_UNDO
  43. #endif