arkag.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. #pragma once
  2. #include QMK_KEYBOARD_H
  3. #define EECONFIG_USERSPACE (uint8_t *)20
  4. #define SYMBOL MO(_SYMBOL)
  5. #define MEDIA MO(_MEDIA)
  6. #define ARROW MO(_ARROW)
  7. #define FUNCT MO(_FUNCT)
  8. #define KEEB MO(_KEEB)
  9. #define HITBOX TT(_HITBOX)
  10. #define LED_FLASH_DELAY 150
  11. #define ACCEL_DELAY 500
  12. #define DEACCEL_DELAY 500
  13. #define INACTIVE_DELAY 250
  14. #define SLEEP_DELAY 180000
  15. #define HUE_MAX 254
  16. enum {
  17. _QWERTY = 0,
  18. _SYMBOL,
  19. _MEDIA,
  20. _ARROW,
  21. _FUNCT,
  22. _KEEB,
  23. _HITBOX,
  24. };
  25. typedef enum {
  26. OS_MAC, // Don't assign values
  27. OS_WIN,
  28. OS_NIX,
  29. _OS_COUNT,
  30. } OS;
  31. typedef struct {
  32. uint16_t h;
  33. uint8_t s;
  34. uint8_t v;
  35. } Color;
  36. typedef enum {
  37. no_flash = 0,
  38. flash_off,
  39. flash_on,
  40. } flashState;
  41. typedef enum {
  42. add_fade = 0,
  43. sub_fade,
  44. } fadeState;
  45. typedef enum {
  46. active = 0,
  47. inactive,
  48. boot,
  49. } activityState;
  50. enum custom_keycodes {
  51. M_PMOD = SAFE_RANGE,
  52. M_SMOD,
  53. M_OS,
  54. M_DASH,
  55. M_USSR,
  56. };
  57. void velocikey_accelerate(void);
  58. void velocikey_decelerate(void);
  59. uint8_t velocikey_match_speed(uint8_t minValue, uint8_t maxValue);
  60. void set_color (Color new, bool update);
  61. void save_color(Color to_save);
  62. void reset_color(void);
  63. Color mod_color(Color current_color, bool should_add, uint8_t change_amount);
  64. void reverse_fade (void);
  65. void check_state (void);
  66. void fade_rgb (void);
  67. void flash_rgb (void);
  68. void set_os (uint8_t os, bool update);
  69. void tap_key(uint8_t keycode);
  70. void pri_mod(bool press);
  71. void sec_mod(bool press);
  72. void meh_hyper(bool press);
  73. void multi_tap(uint8_t num_of_chars, uint16_t keycode, bool use_shift);
  74. void surround_type(uint8_t num_of_chars, uint16_t keycode, bool use_shift);
  75. void pair_surround_type(uint8_t num_of_chars, uint16_t keycode, bool use_shift);
  76. void long_keystroke(size_t num_of_keys, uint16_t keys[]);