edvorakjp.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #ifndef EDVORAKJP
  2. #define EDVORAKJP
  3. #include "quantum.h"
  4. #include "action_layer.h"
  5. #define EECONFIG_EDVORAK (uint8_t *)20
  6. extern keymap_config_t keymap_config;
  7. enum edvorakjp_layers {
  8. _EDVORAK = 0,
  9. _EDVORAKJ1,
  10. _EDVORAKJ2,
  11. _QWERTY,
  12. _LOWER,
  13. _RAISE,
  14. _ADJUST,
  15. _EXTRA,
  16. };
  17. enum edvorakjp_keycodes {
  18. EDVORAK = SAFE_RANGE,
  19. QWERTY,
  20. LOWER,
  21. RAISE,
  22. KC_MAC,
  23. KC_WIN,
  24. KC_EXTON,
  25. KC_EXTOFF,
  26. KC_JPN,
  27. KC_ENG,
  28. KC_AI,
  29. KC_OU,
  30. KC_EI,
  31. KC_ANN,
  32. KC_ONN,
  33. KC_ENN,
  34. KC_INN,
  35. KC_UNN,
  36. NEW_SAFE_RANGE
  37. };
  38. enum tap_dance_code {
  39. TD_LOWER = 0,
  40. TD_RAISE
  41. };
  42. // base
  43. void dvorakj_layer_off(void);
  44. void matrix_init_user(void);
  45. void matrix_init_keymap(void);
  46. uint32_t layer_state_set_user(uint32_t state);
  47. uint32_t layer_state_set_keymap(uint32_t state);
  48. bool process_record_user(uint16_t keycode, keyrecord_t *record);
  49. bool process_record_keymap(uint16_t keycode, keyrecord_t *record);
  50. // status
  51. void edvorakjp_status_init(void);
  52. bool get_enable_jp_extra_layer(void);
  53. void set_enable_jp_extra_layer(bool new_state);
  54. bool get_enable_kc_lang(void);
  55. void set_enable_kc_lang(bool new_state);
  56. bool get_japanese_mode(void);
  57. void set_japanese_mode(bool new_state);
  58. /*
  59. * Each process_record_* methods defined here are
  60. * return false if processed, or return true if not processed.
  61. * You can add your original macros in process_record_keymap() in keymap.c.
  62. */
  63. bool process_record_edvorakjp_ext(uint16_t keycode, keyrecord_t *record);
  64. bool process_record_edvorakjp_swap_scln(uint16_t keycode, keyrecord_t *record);
  65. bool process_record_edvorakjp_config(uint16_t keycode, keyrecord_t *record);
  66. bool process_record_layer(uint16_t keycode, keyrecord_t *record);
  67. bool process_record_ime(uint16_t keycode, keyrecord_t *record);
  68. #endif // EDVORAKJP