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.

139 lines
2.9 KiB

Keymap: Arkag Userspace and MechMini2 Layout (#3958) * deleting arkag branch, forcibly moving changes over to master * fade_color function added, not tested * added half functions some stuff * surround_type function implemented and working. * added flashing function and removed fading, flashing supports infinite flashing along with controlled number flashes * added a fade state machine and functionality * build optimizations, changed fade to bounce between bounds rather than roll over, added a HALMAK layout * changes to sleep breath function, changed how I will switch to HALMAK * support for halmak added * support for activity detection added, condensed fading and flashing state machines, removed support for HALMAK and COLEMAK because arkag is stupid * changed sleep and inactive behaviors, now the color shifting reverses on state change, yay! save_color and reset_color are made to enable layer color changing to look cooler. * reformatted some if statements in state detection * changes to force fade to pause on boot, or plug in. * Attempting to move over to userspace, pushing to repository for help * userspace stuff.... * userspace stuff.... * layout changes, working userspace, Removed left side shift and replaced it with a MT() for LSFT and SPC. Userspace seems to be working properly now! HURRAY * Layout change Removed space/shift and reset modifiers to what they were originally. Added homerow modifiers. * Removed excessive tabs in files * Moved mods on homerow around... * changes recommended by @drashna
5 years ago
Keymap: Arkag Userspace and MechMini2 Layout (#3958) * deleting arkag branch, forcibly moving changes over to master * fade_color function added, not tested * added half functions some stuff * surround_type function implemented and working. * added flashing function and removed fading, flashing supports infinite flashing along with controlled number flashes * added a fade state machine and functionality * build optimizations, changed fade to bounce between bounds rather than roll over, added a HALMAK layout * changes to sleep breath function, changed how I will switch to HALMAK * support for halmak added * support for activity detection added, condensed fading and flashing state machines, removed support for HALMAK and COLEMAK because arkag is stupid * changed sleep and inactive behaviors, now the color shifting reverses on state change, yay! save_color and reset_color are made to enable layer color changing to look cooler. * reformatted some if statements in state detection * changes to force fade to pause on boot, or plug in. * Attempting to move over to userspace, pushing to repository for help * userspace stuff.... * userspace stuff.... * layout changes, working userspace, Removed left side shift and replaced it with a MT() for LSFT and SPC. Userspace seems to be working properly now! HURRAY * Layout change Removed space/shift and reset modifiers to what they were originally. Added homerow modifiers. * Removed excessive tabs in files * Moved mods on homerow around... * changes recommended by @drashna
5 years ago
Keymap: Arkag Userspace and MechMini2 Layout (#3958) * deleting arkag branch, forcibly moving changes over to master * fade_color function added, not tested * added half functions some stuff * surround_type function implemented and working. * added flashing function and removed fading, flashing supports infinite flashing along with controlled number flashes * added a fade state machine and functionality * build optimizations, changed fade to bounce between bounds rather than roll over, added a HALMAK layout * changes to sleep breath function, changed how I will switch to HALMAK * support for halmak added * support for activity detection added, condensed fading and flashing state machines, removed support for HALMAK and COLEMAK because arkag is stupid * changed sleep and inactive behaviors, now the color shifting reverses on state change, yay! save_color and reset_color are made to enable layer color changing to look cooler. * reformatted some if statements in state detection * changes to force fade to pause on boot, or plug in. * Attempting to move over to userspace, pushing to repository for help * userspace stuff.... * userspace stuff.... * layout changes, working userspace, Removed left side shift and replaced it with a MT() for LSFT and SPC. Userspace seems to be working properly now! HURRAY * Layout change Removed space/shift and reset modifiers to what they were originally. Added homerow modifiers. * Removed excessive tabs in files * Moved mods on homerow around... * changes recommended by @drashna
5 years ago
Keymap: Velocikey implemented at userspace, readme is more helpful (#3974) * deleting arkag branch, forcibly moving changes over to master * fade_color function added, not tested * added half functions some stuff * surround_type function implemented and working. * added flashing function and removed fading, flashing supports infinite flashing along with controlled number flashes * added a fade state machine and functionality * build optimizations, changed fade to bounce between bounds rather than roll over, added a HALMAK layout * changes to sleep breath function, changed how I will switch to HALMAK * support for halmak added * support for activity detection added, condensed fading and flashing state machines, removed support for HALMAK and COLEMAK because arkag is stupid * changed sleep and inactive behaviors, now the color shifting reverses on state change, yay! save_color and reset_color are made to enable layer color changing to look cooler. * reformatted some if statements in state detection * changes to force fade to pause on boot, or plug in. * Attempting to move over to userspace, pushing to repository for help * userspace stuff.... * userspace stuff.... * layout changes, working userspace, Removed left side shift and replaced it with a MT() for LSFT and SPC. Userspace seems to be working properly now! HURRAY * Layout change Removed space/shift and reset modifiers to what they were originally. Added homerow modifiers. * Removed excessive tabs in files * Moved mods on homerow around... * changes recommended by @drashna * removed homerow mods, more flashy lighting! * changed delays for lighting. * velocikey code retro fit into userspace to match typing speed currently "working" but isn't as reactive as I want. * Readme and other documentation hidden throughout code * Added a pretty picture * pretty picture actually added * More readme updates * Velocikey now working inside my userspace! * Changed repo macro and fixed readme * Removed media layer, moved media control to LAZY layer * fixed more merge issues when I had to merge...
5 years ago
Keymap: Arkag Userspace and MechMini2 Layout (#3958) * deleting arkag branch, forcibly moving changes over to master * fade_color function added, not tested * added half functions some stuff * surround_type function implemented and working. * added flashing function and removed fading, flashing supports infinite flashing along with controlled number flashes * added a fade state machine and functionality * build optimizations, changed fade to bounce between bounds rather than roll over, added a HALMAK layout * changes to sleep breath function, changed how I will switch to HALMAK * support for halmak added * support for activity detection added, condensed fading and flashing state machines, removed support for HALMAK and COLEMAK because arkag is stupid * changed sleep and inactive behaviors, now the color shifting reverses on state change, yay! save_color and reset_color are made to enable layer color changing to look cooler. * reformatted some if statements in state detection * changes to force fade to pause on boot, or plug in. * Attempting to move over to userspace, pushing to repository for help * userspace stuff.... * userspace stuff.... * layout changes, working userspace, Removed left side shift and replaced it with a MT() for LSFT and SPC. Userspace seems to be working properly now! HURRAY * Layout change Removed space/shift and reset modifiers to what they were originally. Added homerow modifiers. * Removed excessive tabs in files * Moved mods on homerow around... * changes recommended by @drashna
5 years ago
Keymap: Arkag Userspace and MechMini2 Layout (#3958) * deleting arkag branch, forcibly moving changes over to master * fade_color function added, not tested * added half functions some stuff * surround_type function implemented and working. * added flashing function and removed fading, flashing supports infinite flashing along with controlled number flashes * added a fade state machine and functionality * build optimizations, changed fade to bounce between bounds rather than roll over, added a HALMAK layout * changes to sleep breath function, changed how I will switch to HALMAK * support for halmak added * support for activity detection added, condensed fading and flashing state machines, removed support for HALMAK and COLEMAK because arkag is stupid * changed sleep and inactive behaviors, now the color shifting reverses on state change, yay! save_color and reset_color are made to enable layer color changing to look cooler. * reformatted some if statements in state detection * changes to force fade to pause on boot, or plug in. * Attempting to move over to userspace, pushing to repository for help * userspace stuff.... * userspace stuff.... * layout changes, working userspace, Removed left side shift and replaced it with a MT() for LSFT and SPC. Userspace seems to be working properly now! HURRAY * Layout change Removed space/shift and reset modifiers to what they were originally. Added homerow modifiers. * Removed excessive tabs in files * Moved mods on homerow around... * changes recommended by @drashna
5 years ago
Keymap: Arkag Userspace and MechMini2 Layout (#3958) * deleting arkag branch, forcibly moving changes over to master * fade_color function added, not tested * added half functions some stuff * surround_type function implemented and working. * added flashing function and removed fading, flashing supports infinite flashing along with controlled number flashes * added a fade state machine and functionality * build optimizations, changed fade to bounce between bounds rather than roll over, added a HALMAK layout * changes to sleep breath function, changed how I will switch to HALMAK * support for halmak added * support for activity detection added, condensed fading and flashing state machines, removed support for HALMAK and COLEMAK because arkag is stupid * changed sleep and inactive behaviors, now the color shifting reverses on state change, yay! save_color and reset_color are made to enable layer color changing to look cooler. * reformatted some if statements in state detection * changes to force fade to pause on boot, or plug in. * Attempting to move over to userspace, pushing to repository for help * userspace stuff.... * userspace stuff.... * layout changes, working userspace, Removed left side shift and replaced it with a MT() for LSFT and SPC. Userspace seems to be working properly now! HURRAY * Layout change Removed space/shift and reset modifiers to what they were originally. Added homerow modifiers. * Removed excessive tabs in files * Moved mods on homerow around... * changes recommended by @drashna
5 years ago
Keymap: Arkag Userspace and MechMini2 Layout (#3958) * deleting arkag branch, forcibly moving changes over to master * fade_color function added, not tested * added half functions some stuff * surround_type function implemented and working. * added flashing function and removed fading, flashing supports infinite flashing along with controlled number flashes * added a fade state machine and functionality * build optimizations, changed fade to bounce between bounds rather than roll over, added a HALMAK layout * changes to sleep breath function, changed how I will switch to HALMAK * support for halmak added * support for activity detection added, condensed fading and flashing state machines, removed support for HALMAK and COLEMAK because arkag is stupid * changed sleep and inactive behaviors, now the color shifting reverses on state change, yay! save_color and reset_color are made to enable layer color changing to look cooler. * reformatted some if statements in state detection * changes to force fade to pause on boot, or plug in. * Attempting to move over to userspace, pushing to repository for help * userspace stuff.... * userspace stuff.... * layout changes, working userspace, Removed left side shift and replaced it with a MT() for LSFT and SPC. Userspace seems to be working properly now! HURRAY * Layout change Removed space/shift and reset modifiers to what they were originally. Added homerow modifiers. * Removed excessive tabs in files * Moved mods on homerow around... * changes recommended by @drashna
5 years ago
Keymap: Velocikey implemented at userspace, readme is more helpful (#3974) * deleting arkag branch, forcibly moving changes over to master * fade_color function added, not tested * added half functions some stuff * surround_type function implemented and working. * added flashing function and removed fading, flashing supports infinite flashing along with controlled number flashes * added a fade state machine and functionality * build optimizations, changed fade to bounce between bounds rather than roll over, added a HALMAK layout * changes to sleep breath function, changed how I will switch to HALMAK * support for halmak added * support for activity detection added, condensed fading and flashing state machines, removed support for HALMAK and COLEMAK because arkag is stupid * changed sleep and inactive behaviors, now the color shifting reverses on state change, yay! save_color and reset_color are made to enable layer color changing to look cooler. * reformatted some if statements in state detection * changes to force fade to pause on boot, or plug in. * Attempting to move over to userspace, pushing to repository for help * userspace stuff.... * userspace stuff.... * layout changes, working userspace, Removed left side shift and replaced it with a MT() for LSFT and SPC. Userspace seems to be working properly now! HURRAY * Layout change Removed space/shift and reset modifiers to what they were originally. Added homerow modifiers. * Removed excessive tabs in files * Moved mods on homerow around... * changes recommended by @drashna * removed homerow mods, more flashy lighting! * changed delays for lighting. * velocikey code retro fit into userspace to match typing speed currently "working" but isn't as reactive as I want. * Readme and other documentation hidden throughout code * Added a pretty picture * pretty picture actually added * More readme updates * Velocikey now working inside my userspace! * Changed repo macro and fixed readme * Removed media layer, moved media control to LAZY layer * fixed more merge issues when I had to merge...
5 years ago
Keymap: Arkag Userspace and MechMini2 Layout (#3958) * deleting arkag branch, forcibly moving changes over to master * fade_color function added, not tested * added half functions some stuff * surround_type function implemented and working. * added flashing function and removed fading, flashing supports infinite flashing along with controlled number flashes * added a fade state machine and functionality * build optimizations, changed fade to bounce between bounds rather than roll over, added a HALMAK layout * changes to sleep breath function, changed how I will switch to HALMAK * support for halmak added * support for activity detection added, condensed fading and flashing state machines, removed support for HALMAK and COLEMAK because arkag is stupid * changed sleep and inactive behaviors, now the color shifting reverses on state change, yay! save_color and reset_color are made to enable layer color changing to look cooler. * reformatted some if statements in state detection * changes to force fade to pause on boot, or plug in. * Attempting to move over to userspace, pushing to repository for help * userspace stuff.... * userspace stuff.... * layout changes, working userspace, Removed left side shift and replaced it with a MT() for LSFT and SPC. Userspace seems to be working properly now! HURRAY * Layout change Removed space/shift and reset modifiers to what they were originally. Added homerow modifiers. * Removed excessive tabs in files * Moved mods on homerow around... * changes recommended by @drashna
5 years ago
Keymap: Arkag Userspace and MechMini2 Layout (#3958) * deleting arkag branch, forcibly moving changes over to master * fade_color function added, not tested * added half functions some stuff * surround_type function implemented and working. * added flashing function and removed fading, flashing supports infinite flashing along with controlled number flashes * added a fade state machine and functionality * build optimizations, changed fade to bounce between bounds rather than roll over, added a HALMAK layout * changes to sleep breath function, changed how I will switch to HALMAK * support for halmak added * support for activity detection added, condensed fading and flashing state machines, removed support for HALMAK and COLEMAK because arkag is stupid * changed sleep and inactive behaviors, now the color shifting reverses on state change, yay! save_color and reset_color are made to enable layer color changing to look cooler. * reformatted some if statements in state detection * changes to force fade to pause on boot, or plug in. * Attempting to move over to userspace, pushing to repository for help * userspace stuff.... * userspace stuff.... * layout changes, working userspace, Removed left side shift and replaced it with a MT() for LSFT and SPC. Userspace seems to be working properly now! HURRAY * Layout change Removed space/shift and reset modifiers to what they were originally. Added homerow modifiers. * Removed excessive tabs in files * Moved mods on homerow around... * changes recommended by @drashna
5 years ago
  1. #pragma once
  2. #include "quantum.h"
  3. #include "process_keycode/process_tap_dance.h"
  4. #define EECONFIG_USERSPACE (uint8_t *)20
  5. #define LRALT TD(TD_LALT_RALT)
  6. #define QUOTE TD(TD_SING_DOUB)
  7. #define GRAVE TD(TD_GRV_3GRV)
  8. #define OBRACK TD(TD_BRCK_PARN_O)
  9. #define CBRACK TD(TD_BRCK_PARN_C)
  10. #define THREE TD(TD_3_GRV_ACT)
  11. #define STRIKE TD(TD_STRK_SHOT)
  12. #define HYPHEN TD(TD_HYPH_UNDR)
  13. #define CEDILLA TD(TD_C_CED)
  14. #define GAME TD(TD_GAME)
  15. #define RAISE MO(1)
  16. #define LOWER MO(2)
  17. #define MEDIA MO(3)
  18. #define FUNCT MO(4)
  19. #define KEEB MO(5)
  20. #define MOD_CTL_MASK (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL))
  21. #define MOD_GUI_MASK (MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI))
  22. #define MOD_SFT_MASK (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT))
  23. #define LED_FLASH_DELAY 150
  24. #define ACCEL_DELAY 500
  25. #define DEACCEL_DELAY 500
  26. #define INACTIVE_DELAY 250
  27. #define SLEEP_DELAY 180000
  28. enum {
  29. _QWERTY = 0,
  30. _RAISE,
  31. _LOWER,
  32. _MEDIA,
  33. _FUNCT,
  34. _KEEB,
  35. _GAMING,
  36. };
  37. typedef enum {
  38. OS_MAC, // Don't assign values
  39. OS_WIN,
  40. OS_NIX,
  41. _OS_COUNT,
  42. } OS;
  43. typedef struct {
  44. uint16_t h;
  45. uint8_t s;
  46. uint8_t v;
  47. } Color;
  48. typedef enum {
  49. no_flash = 0,
  50. flash_off,
  51. flash_on,
  52. } flashState;
  53. typedef enum {
  54. add_fade = 0,
  55. sub_fade,
  56. } fadeState;
  57. typedef enum {
  58. active = 0,
  59. inactive,
  60. sleeping,
  61. boot,
  62. } activityState;
  63. enum custom_keycodes {
  64. M_PMOD = SAFE_RANGE,
  65. M_SMOD,
  66. M_OS,
  67. M_SFT,
  68. M_SPC,
  69. };
  70. enum tapdances {
  71. TD_3_GRV_ACT = 0,
  72. TD_C_CED,
  73. TD_GRV_3GRV,
  74. TD_SLSH_HTTP,
  75. TD_SING_DOUB,
  76. TD_HYPH_UNDR,
  77. TD_SPECIAL,
  78. TD_BRCK_PARN_O,
  79. TD_BRCK_PARN_C,
  80. TD_LALT_RALT,
  81. TD_GAME,
  82. };
  83. void velocikey_accelerate(void);
  84. void velocikey_decelerate(void);
  85. uint8_t velocikey_match_speed(uint8_t minValue, uint8_t maxValue);
  86. void set_color (Color new, bool update);
  87. void save_color(Color to_save);
  88. void reset_color(void);
  89. Color mod_color(Color current_color, bool should_add, uint8_t change_amount);
  90. void reverse_fade (void);
  91. void check_state (void);
  92. void fade_rgb (void);
  93. void flash_rgb (void);
  94. void set_os (uint8_t os, bool update);
  95. void tap_key(uint8_t keycode);
  96. void pri_mod(bool press);
  97. void sec_mod(bool press);
  98. void surround_type(uint8_t num_of_chars, uint16_t keycode, bool use_shift);
  99. void long_keystroke(size_t num_of_keys, uint16_t keys[]);
  100. void dance_grv (qk_tap_dance_state_t *state, void *user_data);
  101. void dance_quot (qk_tap_dance_state_t *state, void *user_data);
  102. void dance_strk (qk_tap_dance_state_t *state, void *user_data);
  103. void dance_3 (qk_tap_dance_state_t *state, void *user_data);
  104. void dance_c (qk_tap_dance_state_t *state, void *user_data);
  105. void dance_game (qk_tap_dance_state_t *state, void *user_data);
  106. int cur_dance (qk_tap_dance_state_t *state);
  107. void spc_finished (qk_tap_dance_state_t *state, void *user_data);
  108. void spc_reset (qk_tap_dance_state_t *state, void *user_data);