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
2018-09-22 17:43:28 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "quantum.h"
|
|
|
|
#include "process_keycode/process_tap_dance.h"
|
|
|
|
|
|
|
|
#define EECONFIG_USERSPACE (uint8_t *)20
|
|
|
|
|
2021-03-11 19:01:53 +01:00
|
|
|
#define SYMBOL MO(1)
|
|
|
|
#define MEDIA MO(2)
|
|
|
|
#define ARROW MO(3)
|
2019-03-14 20:04:59 +01:00
|
|
|
#define FUNCT MO(4)
|
|
|
|
#define KEEB MO(5)
|
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
2018-09-22 17:43:28 +02:00
|
|
|
|
|
|
|
#define MOD_CTL_MASK (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL))
|
|
|
|
#define MOD_GUI_MASK (MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI))
|
|
|
|
#define MOD_SFT_MASK (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT))
|
|
|
|
|
|
|
|
#define LED_FLASH_DELAY 150
|
|
|
|
|
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...
2018-09-26 00:38:04 +02:00
|
|
|
#define ACCEL_DELAY 500
|
|
|
|
#define DEACCEL_DELAY 500
|
|
|
|
|
|
|
|
#define INACTIVE_DELAY 250
|
|
|
|
#define SLEEP_DELAY 180000
|
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
2018-09-22 17:43:28 +02:00
|
|
|
|
2021-03-11 19:01:53 +01:00
|
|
|
#define HUE_MAX 254
|
|
|
|
|
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
2018-09-22 17:43:28 +02:00
|
|
|
enum {
|
|
|
|
_QWERTY = 0,
|
2021-03-11 19:01:53 +01:00
|
|
|
_SYMBOL,
|
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
2018-09-22 17:43:28 +02:00
|
|
|
_MEDIA,
|
2021-03-11 19:01:53 +01:00
|
|
|
_ARROW,
|
2019-03-14 20:04:59 +01:00
|
|
|
_FUNCT,
|
|
|
|
_KEEB,
|
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
2018-09-22 17:43:28 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
OS_MAC, // Don't assign values
|
|
|
|
OS_WIN,
|
|
|
|
OS_NIX,
|
|
|
|
_OS_COUNT,
|
|
|
|
} OS;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
uint16_t h;
|
|
|
|
uint8_t s;
|
|
|
|
uint8_t v;
|
|
|
|
} Color;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
no_flash = 0,
|
|
|
|
flash_off,
|
|
|
|
flash_on,
|
|
|
|
} flashState;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
add_fade = 0,
|
|
|
|
sub_fade,
|
|
|
|
} fadeState;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
active = 0,
|
|
|
|
inactive,
|
|
|
|
boot,
|
|
|
|
} activityState;
|
|
|
|
|
|
|
|
enum custom_keycodes {
|
|
|
|
M_PMOD = SAFE_RANGE,
|
|
|
|
M_SMOD,
|
|
|
|
M_OS,
|
2021-03-11 19:01:53 +01:00
|
|
|
M_DASH,
|
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
2018-09-22 17:43:28 +02:00
|
|
|
};
|
|
|
|
|
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...
2018-09-26 00:38:04 +02:00
|
|
|
void velocikey_accelerate(void);
|
|
|
|
void velocikey_decelerate(void);
|
|
|
|
uint8_t velocikey_match_speed(uint8_t minValue, uint8_t maxValue);
|
|
|
|
|
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
2018-09-22 17:43:28 +02:00
|
|
|
void set_color (Color new, bool update);
|
|
|
|
void save_color(Color to_save);
|
|
|
|
void reset_color(void);
|
|
|
|
|
|
|
|
Color mod_color(Color current_color, bool should_add, uint8_t change_amount);
|
|
|
|
|
|
|
|
void reverse_fade (void);
|
|
|
|
|
|
|
|
void check_state (void);
|
|
|
|
|
|
|
|
void fade_rgb (void);
|
|
|
|
|
|
|
|
void flash_rgb (void);
|
|
|
|
|
|
|
|
void set_os (uint8_t os, bool update);
|
|
|
|
|
|
|
|
void tap_key(uint8_t keycode);
|
|
|
|
|
|
|
|
void pri_mod(bool press);
|
|
|
|
|
|
|
|
void sec_mod(bool press);
|
|
|
|
|
2021-03-11 19:01:53 +01:00
|
|
|
void multi_tap(uint8_t num_of_chars, uint16_t keycode, bool use_shift);
|
|
|
|
|
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
2018-09-22 17:43:28 +02:00
|
|
|
void surround_type(uint8_t num_of_chars, uint16_t keycode, bool use_shift);
|
|
|
|
|
|
|
|
void long_keystroke(size_t num_of_keys, uint16_t keys[]);
|