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.

110 lines
2.0 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: 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: 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
  1. #pragma once
  2. #include QMK_KEYBOARD_H
  3. #define EECONFIG_USERSPACE (uint8_t *)20
  4. #define SYMBOL MO(1)
  5. #define MEDIA MO(2)
  6. #define ARROW MO(3)
  7. #define FUNCT MO(4)
  8. #define KEEB MO(5)
  9. #define L_BIT_MEH MOD_BIT(KC_LCTL) | MOD_BIT(KC_LALT) | MOD_BIT(KC_LSFT)
  10. #define L_BIT_HYPR MOD_BIT(KC_LCTL) | MOD_BIT(KC_LGUI) | MOD_BIT(KC_LALT) | MOD_BIT(KC_LSFT)
  11. #define LED_FLASH_DELAY 150
  12. #define ACCEL_DELAY 500
  13. #define DEACCEL_DELAY 500
  14. #define INACTIVE_DELAY 250
  15. #define SLEEP_DELAY 180000
  16. #define HUE_MAX 254
  17. enum {
  18. _QWERTY = 0,
  19. _SYMBOL,
  20. _MEDIA,
  21. _ARROW,
  22. _FUNCT,
  23. _KEEB,
  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. M_EHYPR,
  57. M_LMHYP,
  58. M_SFTY,
  59. M_AEST,
  60. };
  61. void velocikey_accelerate(void);
  62. void velocikey_decelerate(void);
  63. uint8_t velocikey_match_speed(uint8_t minValue, uint8_t maxValue);
  64. void set_color (Color new, bool update);
  65. void save_color(Color to_save);
  66. void reset_color(void);
  67. Color mod_color(Color current_color, bool should_add, uint8_t change_amount);
  68. void reverse_fade (void);
  69. void check_state (void);
  70. void fade_rgb (void);
  71. void flash_rgb (void);
  72. void set_os (uint8_t os, bool update);
  73. void tap_key(uint8_t keycode);
  74. void pri_mod(bool press);
  75. void sec_mod(bool press);
  76. void meh_hyper(bool press);
  77. void multi_tap(uint8_t num_of_chars, uint16_t keycode, bool use_shift);
  78. void surround_type(uint8_t num_of_chars, uint16_t keycode, bool use_shift);
  79. void pair_surround_type(uint8_t num_of_chars, uint16_t keycode, bool use_shift);
  80. void long_keystroke(size_t num_of_keys, uint16_t keys[]);