qmk

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.z3bra.org/qmk.git
Log | Files | Refs | Submodules | LICENSE

arkag.h (2932B)


      1 #pragma once
      2 
      3 #include "quantum.h"
      4 #include "process_keycode/process_tap_dance.h"
      5 
      6 #define EECONFIG_USERSPACE (uint8_t *)20
      7 
      8 #define LRALT       TD(TD_LALT_RALT)
      9 #define QUOTE       TD(TD_SING_DOUB)
     10 #define GRAVE       TD(TD_GRV_3GRV)
     11 #define OBRACK      TD(TD_BRCK_PARN_O)
     12 #define CBRACK      TD(TD_BRCK_PARN_C)
     13 #define THREE       TD(TD_3_GRV_ACT)
     14 #define STRIKE      TD(TD_STRK_SHOT)
     15 #define HYPHEN      TD(TD_HYPH_UNDR)
     16 #define CEDILLA     TD(TD_C_CED)
     17 #define GAME        TD(TD_GAME)
     18 
     19 #define RAISE       MO(1)
     20 #define LOWER       MO(2)
     21 #define MEDIA       MO(3)
     22 #define FUNCT       MO(4)
     23 #define KEEB        MO(5)
     24 
     25 #define MOD_CTL_MASK (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL))
     26 #define MOD_GUI_MASK (MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI))
     27 #define MOD_SFT_MASK (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT))
     28 
     29 #define LED_FLASH_DELAY       150
     30 
     31 #define ACCEL_DELAY           500
     32 #define DEACCEL_DELAY         500
     33 
     34 #define INACTIVE_DELAY        250
     35 #define SLEEP_DELAY           180000
     36 
     37 enum {
     38   _QWERTY = 0,
     39   _RAISE,
     40   _LOWER,
     41   _MEDIA,
     42   _FUNCT,
     43   _KEEB,
     44   _GAMING,
     45 };
     46 
     47 typedef enum {
     48   OS_MAC, // Don't assign values
     49   OS_WIN,
     50   OS_NIX,
     51   _OS_COUNT,
     52 } OS;
     53 
     54 typedef struct {
     55   uint16_t  h;
     56   uint8_t   s;
     57   uint8_t   v;
     58 } Color;
     59 
     60 typedef enum {
     61   no_flash = 0,
     62   flash_off,
     63   flash_on,
     64 } flashState;
     65 
     66 typedef enum {
     67   add_fade = 0,
     68   sub_fade,
     69 } fadeState;
     70 
     71 typedef enum {
     72   active = 0,
     73   inactive,
     74   sleeping,
     75   boot,
     76 } activityState;
     77 
     78 enum custom_keycodes {
     79   M_PMOD = SAFE_RANGE,
     80   M_SMOD,
     81   M_OS,
     82   M_SFT,
     83   M_SPC,
     84 };
     85 
     86 enum tapdances {
     87   TD_3_GRV_ACT = 0,
     88   TD_C_CED,
     89   TD_GRV_3GRV,
     90   TD_SLSH_HTTP,
     91   TD_SING_DOUB,
     92   TD_HYPH_UNDR,
     93   TD_SPECIAL,
     94   TD_BRCK_PARN_O,
     95   TD_BRCK_PARN_C,
     96   TD_LALT_RALT,
     97   TD_GAME,
     98 };
     99 
    100 void velocikey_accelerate(void);
    101 void velocikey_decelerate(void);
    102 uint8_t velocikey_match_speed(uint8_t minValue, uint8_t maxValue);
    103 
    104 void set_color (Color new, bool update);
    105 void save_color(Color to_save);
    106 void reset_color(void);
    107 
    108 Color mod_color(Color current_color, bool should_add, uint8_t change_amount);
    109 
    110 void reverse_fade (void);
    111 
    112 void check_state (void);
    113 
    114 void fade_rgb (void);
    115 
    116 void flash_rgb (void);
    117 
    118 void set_os (uint8_t os, bool update);
    119 
    120 void tap_key(uint8_t keycode);
    121 
    122 void pri_mod(bool press);
    123 
    124 void sec_mod(bool press);
    125 
    126 void surround_type(uint8_t num_of_chars, uint16_t keycode, bool use_shift);
    127 
    128 void long_keystroke(size_t num_of_keys, uint16_t keys[]);
    129 
    130 void dance_grv (qk_tap_dance_state_t *state, void *user_data);
    131 void dance_quot (qk_tap_dance_state_t *state, void *user_data);
    132 void dance_strk (qk_tap_dance_state_t *state, void *user_data);
    133 void dance_3 (qk_tap_dance_state_t *state, void *user_data);
    134 void dance_c (qk_tap_dance_state_t *state, void *user_data);
    135 void dance_game (qk_tap_dance_state_t *state, void *user_data);
    136 
    137 int cur_dance (qk_tap_dance_state_t *state);
    138 void spc_finished (qk_tap_dance_state_t *state, void *user_data);
    139 void spc_reset (qk_tap_dance_state_t *state, void *user_data);