2
0

edvorakjp.h 1.6 KB

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