summaryrefslogtreecommitdiff
path: root/users
diff options
context:
space:
mode:
Diffstat (limited to 'users')
-rw-r--r--users/danielo515/combo.c44
-rw-r--r--users/danielo515/config.h4
-rw-r--r--users/danielo515/process_records.c247
-rw-r--r--users/danielo515/process_records.h94
-rw-r--r--users/stanrc85/rgblight_layers.c38
-rw-r--r--users/stanrc85/rules.mk18
-rw-r--r--users/stanrc85/stanrc85.c36
-rw-r--r--users/stanrc85/startup_fanfare.c43
8 files changed, 296 insertions, 228 deletions
diff --git a/users/danielo515/combo.c b/users/danielo515/combo.c
index 1c84143772..b33cb838bc 100644
--- a/users/danielo515/combo.c
+++ b/users/danielo515/combo.c
@@ -6,31 +6,39 @@ enum combos {
UI_COM,
IO_COM,
QW_COM,
- COM_SLS,
+ DOT_SLS,
COM_DOT,
M_COMM,
N_M,
OP_COM,
+ M_CM_DOT,
};
-const uint16_t PROGMEM ui_combo[] = {KC_U, KC_I, COMBO_END};
-const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END};
-const uint16_t PROGMEM yu_combo[] = {KC_Y, KC_U, COMBO_END};
-const uint16_t PROGMEM io_combo[] = {KC_I, KC_O, COMBO_END};
-const uint16_t PROGMEM qw_combo[] = {KC_Q, KC_W, COMBO_END};
-const uint16_t PROGMEM com_sls[] = {KC_COMMA, KC_SLSH, COMBO_END};
-const uint16_t PROGMEM com_dot[] = {KC_COMMA, KC_DOT, COMBO_END};
-const uint16_t PROGMEM m_comm[] = {KC_M,KC_COMMA, COMBO_END};
-const uint16_t PROGMEM n_m[] = {KC_N, KC_M,COMBO_END};
+const uint16_t PROGMEM ui_combo[] = {KC_U, KC_I, COMBO_END};
+const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END};
+const uint16_t PROGMEM yu_combo[] = {KC_Y, KC_U, COMBO_END};
+const uint16_t PROGMEM io_combo[] = {KC_I, KC_O, COMBO_END};
+const uint16_t PROGMEM qw_combo[] = {KC_Q, KC_W, COMBO_END};
+const uint16_t PROGMEM dot_sls[] = {KC_DOT, KC_SLSH, COMBO_END};
+const uint16_t PROGMEM com_dot[] = {KC_COMMA, KC_DOT, COMBO_END};
+const uint16_t PROGMEM m_comm[] = {KC_M, KC_COMMA, COMBO_END};
+const uint16_t PROGMEM n_m[] = {KC_N, KC_M, COMBO_END};
+const uint16_t PROGMEM o_p_combo[] = {KC_O, KC_P, COMBO_END};
+const uint16_t PROGMEM m_cm_dot_combo[] = {KC_M, KC_COMMA, KC_DOT, COMBO_END};
combo_t key_combos[COMBO_COUNT] = {
- [JK_ESC] = COMBO(jk_combo, KC_ESC),
- [YU_COM] = COMBO(yu_combo, KC_CIRC),
- [UI_COM] = COMBO(ui_combo, KC_DLR),
- [IO_COM] = COMBO(io_combo, KC_TILD),
+ [JK_ESC] = COMBO(jk_combo, KC_ESC),
+ [YU_COM] = COMBO(yu_combo, KC_AMPR),
+ [UI_COM] = COMBO(ui_combo, KC_CIRC),
+ [IO_COM] = COMBO(io_combo, KC_TILD),
+ [DOT_SLS] = COMBO(dot_sls, KC_EXLM),
+ [COM_DOT] = COMBO(com_dot, KC_QUES),
+ [N_M] = COMBO(n_m, KC_DLR),
+ [OP_COM] = COMBO(o_p_combo, KC_HASH),
+ // m + , = {
+ [M_COMM] = COMBO(m_comm, KC_LCBR),
+ // m + , + . = }
+ // [M_CM_DOT] = COMBO(m_cm_dot_combo, KC_RCBR),
+ // Right hand side combos
[QW_COM] = COMBO(qw_combo, KC_AT),
- [COM_SLS] = COMBO(com_sls, KC_QUES),
- [COM_DOT] = COMBO(com_dot, KC_QUES),
- [M_COMM] = COMBO(m_comm, KC_ESC),
- [N_M] = COMBO(n_m, KC_DLR),
};
diff --git a/users/danielo515/config.h b/users/danielo515/config.h
index fb2472645c..d7efcd5367 100644
--- a/users/danielo515/config.h
+++ b/users/danielo515/config.h
@@ -1,8 +1,8 @@
#pragma once
#if defined(COMBO_ENABLE)
- #define COMBO_COUNT 9
- #define COMBO_TERM 40
+# define COMBO_COUNT 11
+# define COMBO_TERM 25
#endif // !COMBO_ENABLE
// Timeout settings for leader key
#undef LEADER_TIMEOUT
diff --git a/users/danielo515/process_records.c b/users/danielo515/process_records.c
index b1a8b92552..22a46789ad 100644
--- a/users/danielo515/process_records.c
+++ b/users/danielo515/process_records.c
@@ -4,11 +4,11 @@ extern bool onMac;
// ======== INCREMENTAL MACROS STUFF =============
#define MAX_INCREMENTAL_MACRO 20
#define TAP_ROTATION_TIMEOUT 400
-uint16_t latest_kc = 0;
+uint16_t latest_kc = 0;
uint16_t latest_rotation = 0;
-int key_count = 0;
+int key_count = 0;
-const char incremental_macros[][MAX_INCREMENTAL_MACRO] = { "String1"SS_TAP(X_HOME)"X-", "String2"SS_TAP(X_HOME) };
+const char incremental_macros[][MAX_INCREMENTAL_MACRO] = {"String1" SS_TAP(X_HOME) "X-", "String2" SS_TAP(X_HOME)};
bool process_incremental_macro(uint16_t kc) {
if (kc < INC_MACROS_START || kc > INC_MACROS_END) {
@@ -44,124 +44,157 @@ void refresh_incremental_macros(uint16_t kc) {
}
// Send control or GUI depending if we are on windows or mac
bool CMD(uint16_t kc) {
- if(onMac){ tap_code16(LGUI(kc)); } else { tap_code16(LCTL(kc)); }
+ if (onMac) {
+ tap_code16(LGUI(kc));
+ } else {
+ tap_code16(LCTL(kc));
+ }
return false;
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
bool pressed = record->event.pressed;
- if(pressed){
+ if (pressed) {
refresh_incremental_macros(keycode);
- if(process_incremental_macro(keycode)){
+ if (process_incremental_macro(keycode)) {
return false;
}
switch (keycode) {
case MAC_TGL:
- onMac = !onMac;
- onMac ? SEND_STRING("On mac") : SEND_STRING("Not on MAC");
- return false;
+ onMac = !onMac;
+ onMac ? SEND_STRING("On mac") : SEND_STRING("Not on MAC");
+ return false;
}
}
switch (keycode) {
- case QWERTY:
- if (record->event.pressed) {
- #ifdef AUDIO_ENABLE
- PLAY_SONG(tone_qwerty);
- #endif
- layer_on(_QWERTY);
- }
- return false;
- case LOWER:
- if (record->event.pressed) {
- layer_on(_LOWER);
- } else {
- layer_off(_LOWER);
- }
- return false;
- case RAISE:
- if (record->event.pressed) {
- layer_on(_RAISE);
- } else {
- layer_off(_RAISE);
- }
- return false;
- case ADJUST:
- if (record->event.pressed) {
- layer_on(_ADJUST);
- } else {
- layer_off(_ADJUST);
- }
- return false;
- // == Macros START ===
- case IARROW: if (record->event.pressed) SEND_STRING("<-"); return false;
- case ARROW: if (record->event.pressed) SEND_STRING("->"); return false;
- case F_ARROW: if (record->event.pressed) SEND_STRING("=>"); return false;
- case GREP: if (record->event.pressed) SEND_STRING(" | grep "); return false;
- case CLN_EQ: if (record->event.pressed) SEND_STRING(":="); return false;
- // == Macros END ===
- // == Multi Os START ===
- case KC_HOME:// make the home behave the same on OSX
- if (record->event.pressed && onMac) {
- SEND_STRING(SS_LCTRL("a"));
- return false;
- }
- case KC_END:// make the end behave the same on OSX
- if (record->event.pressed && onMac) {
- tap_code16(C(KC_E));
- return false;
- }
- case AC_A:// Accent á
- if (record->event.pressed) SEND_STRING(SS_LALT("e") "a"); return false;
- case AC_E:// Accent é
- if (record->event.pressed) SEND_STRING(SS_LALT("e") "e"); return false;
- case AC_I:// Accent í
- if (record->event.pressed) SEND_STRING(SS_LALT("e") "i"); return false;
- case AC_O:// Accent ó
- if (record->event.pressed) SEND_STRING(SS_LALT("e") "o"); return false;
- case CUT: if (record->event.pressed) return CMD(KC_X);
- case COPY:
- if (record->event.pressed) {
- onMac ? SEND_STRING(SS_LGUI("c")) : SEND_STRING(SS_LCTRL("c"));
- }
- return false;
- case PASTE:
- if (record->event.pressed) {
- onMac ? SEND_STRING(SS_LGUI("v")) : SEND_STRING(SS_LCTRL("v"));
- }
- return false;
- case SAVE:
- if (record->event.pressed) {
- onMac ? SEND_STRING(SS_LGUI("s")) : SEND_STRING(SS_LCTRL("s"));
- }
- return false;
- case UNDO:
- if (record->event.pressed) {
- onMac ? SEND_STRING(SS_LGUI("z")) : SEND_STRING(SS_LCTRL("z"));
- }
- return false;
- case FIND:
- if (record->event.pressed) {
- onMac ? SEND_STRING(SS_LGUI("f")) : SEND_STRING(SS_LCTRL("f"));
- }
- return false;
- case CHG_LAYOUT:
- if (record->event.pressed) {
- onMac ? SEND_STRING(SS_LCTRL(" ")) : SEND_STRING(SS_LCTRL("f"));
- }
- return false;
- // == Multi Os END ===
+ case QWERTY:
+ if (record->event.pressed) {
+#ifdef AUDIO_ENABLE
+ PLAY_SONG(tone_qwerty);
+#endif
+ layer_on(_QWERTY);
+ }
+ return false;
+ case LOWER:
+ if (record->event.pressed) {
+ layer_on(_LOWER);
+ } else {
+ layer_off(_LOWER);
+ }
+ return false;
+ case RAISE:
+ if (record->event.pressed) {
+ layer_on(_RAISE);
+ } else {
+ layer_off(_RAISE);
+ }
+ return false;
+ case ADJUST:
+ if (record->event.pressed) {
+ layer_on(_ADJUST);
+ } else {
+ layer_off(_ADJUST);
+ }
+ return false;
+ // == Macros START ===
+ case IARROW:
+ if (record->event.pressed) SEND_STRING("<-");
+ return false;
+ case ARROW:
+ if (record->event.pressed) SEND_STRING("->");
+ return false;
+ case F_ARROW:
+ if (record->event.pressed) SEND_STRING("=>");
+ return false;
+ case GREP:
+ if (record->event.pressed) SEND_STRING(" | grep ");
+ return false;
+ case CLN_EQ:
+ if (record->event.pressed) SEND_STRING(":=");
+ return false;
+ // == Macros END ===
+ // == Multi Os START ===
+ case KC_HOME: // make the home behave the same on OSX
+ if (record->event.pressed && onMac) {
+ SEND_STRING(SS_LCTRL("a"));
+ return false;
+ }
+ case KC_END: // make the end behave the same on OSX
+ if (record->event.pressed && onMac) {
+ tap_code16(C(KC_E));
+ return false;
+ }
+ case AC_A: // Accent á
+ if (record->event.pressed) SEND_STRING(SS_LALT("e") "a");
+ return false;
+ case AC_E: // Accent é
+ if (record->event.pressed) SEND_STRING(SS_LALT("e") "e");
+ return false;
+ case AC_I: // Accent í
+ if (record->event.pressed) SEND_STRING(SS_LALT("e") "i");
+ return false;
+ case AC_O: // Accent ó
+ if (record->event.pressed) SEND_STRING(SS_LALT("e") "o");
+ return false;
+ case CUT:
+ if (record->event.pressed) return CMD(KC_X);
+ case COPY:
+ if (record->event.pressed) {
+ onMac ? SEND_STRING(SS_LGUI("c")) : SEND_STRING(SS_LCTRL("c"));
+ }
+ return false;
+ case PASTE:
+ if (record->event.pressed) {
+ onMac ? SEND_STRING(SS_LGUI("v")) : SEND_STRING(SS_LCTRL("v"));
+ }
+ return false;
+ case SAVE:
+ if (record->event.pressed) {
+ onMac ? SEND_STRING(SS_LGUI("s")) : SEND_STRING(SS_LCTRL("s"));
+ }
+ return false;
+ case UNDO:
+ if (record->event.pressed) {
+ onMac ? SEND_STRING(SS_LGUI("z")) : SEND_STRING(SS_LCTRL("z"));
+ }
+ return false;
+ case REDO:
+ if (record->event.pressed) {
+ onMac ? SEND_STRING(SS_LGUI(SS_LSFT("z"))) : SEND_STRING(SS_LCTRL("y"));
+ }
+ return false;
+ case FIND:
+ if (record->event.pressed) {
+ onMac ? SEND_STRING(SS_LGUI("f")) : SEND_STRING(SS_LCTRL("f"));
+ }
+ return false;
+ case WIN_TO_RIGHT:
+ if (record->event.pressed) {
+ onMac ? tap_code16(SGUI(A(KC_RIGHT))) : tap_code16(G(KC_RIGHT));
+ }
+ return false;
+ case WIN_TO_LEFT:
+ if (record->event.pressed) {
+ onMac ? tap_code16(SGUI(A(KC_LEFT))) : tap_code16(G(KC_LEFT));
+ }
+ return false;
+ case CHG_LAYOUT:
+ if (record->event.pressed) {
+ onMac ? SEND_STRING(SS_LCTRL(" ")) : SEND_STRING(SS_LCTRL("f"));
+ }
+ return false;
+ // == Multi Os END ===
#ifdef RGBLIGHT_ENABLE
- case RGB_SLD:
- if (record->event.pressed) { rgblight_mode(1); }
- return false;
- break;
- //First time alt + tab, and alt stays sticky. Next press we just send tab. Any other key releases the alt
+ case RGB_SLD:
+ if (record->event.pressed) {
+ rgblight_mode(1);
+ }
+ return false;
+ break;
+ // First time alt + tab, and alt stays sticky. Next press we just send tab. Any other key releases the alt
#endif
- }
-// =============== ALT_TAB single key handling
- return process_alt_tab(keycode, record);
+ }
+ // =============== ALT_TAB single key handling
+ return process_alt_tab(keycode, record);
};
-
-
-
diff --git a/users/danielo515/process_records.h b/users/danielo515/process_records.h
index c994511a5f..0efd690d40 100644
--- a/users/danielo515/process_records.h
+++ b/users/danielo515/process_records.h
@@ -1,35 +1,36 @@
#pragma once
#include "quantum.h"
-enum custom_keycodes
-{
- EPRM = SAFE_RANGE,
- RGB_SLD,
+enum custom_keycodes {
+ RGB_SLD = SAFE_RANGE,
ALT_TAB,
QWERTY,
SYM,
NAV,
ADJUST,
-// Macros
+ // Macros
ARROW,
IARROW,
CLN_EQ,
F_ARROW,
GREP,
-// Accented characters
+ // Accented characters
AC_A,
AC_E,
AC_I,
AC_O,
-// Custom multi-os key-codes
+ // Custom multi-os key-codes
CUT,
COPY,
PASTE,
SAVE,
UNDO,
+ REDO,
CHG_LAYOUT,
FIND,
-// OTHER OLD STUFF
+ WIN_TO_LEFT,
+ WIN_TO_RIGHT,
+ // OTHER OLD STUFF
LOWER,
RAISE,
MAC_TGL,
@@ -57,48 +58,49 @@ enum layers {
};
//===== Function letters
-# define FN_F LT(_F,KC_F)
-# define FN_D LT(_D,KC_D)
-# define FN_S LT(_S,KC_S)
-# define FN_A LT(_A,KC_A)
-# define FN_K LT(_K,KC_K)
-# define FN_J LT(_J,KC_J)
-# define KC_FN_D FN_D
-# define KC_FN_S FN_S
-# define KC_FN_F FN_F
+#define FN_F LT(_F, KC_F)
+#define FN_D LT(_D, KC_D)
+#define FN_S LT(_S, KC_S)
+#define FN_A LT(_A, KC_A)
+#define FN_K LT(_K, KC_K)
+#define FN_J LT(_J, KC_J)
+#define KC_FN_D FN_D
+#define KC_FN_S FN_S
+#define KC_FN_F FN_F
-# define KC_MACROS OSL(_MACROS)
+#define KC_MACROS OSL(_MACROS)
-
-# define KC_E_COLN LSFT(KC_DOT)
-# define KC_E_EQL ES_EQL
-# define KC_GUI OSM(MOD_RGUI)
-# define KC_R_NUB S(KC_NUBS)
-# define KC_E_LT KC_NUBS
-# define KC_E_GT S(KC_NUBS)
-# define KC_E_TILD ES_TILD
-# define KC_E_MINS ES_MINS
-# define KC_E_OVRR ES_OVRR
-# define KC_E_APOS ES_APOS
-# define KC_E_IEXL ES_IEXL
+#define KC_E_COLN LSFT(KC_DOT)
+#define KC_E_EQL ES_EQL
+#define KC_GUI OSM(MOD_RGUI)
+#define KC_R_NUB S(KC_NUBS)
+#define KC_E_LT KC_NUBS
+#define KC_E_GT S(KC_NUBS)
+#define KC_E_TILD ES_TILD
+#define KC_E_MINS ES_MINS
+#define KC_E_OVRR ES_OVRR
+#define KC_E_APOS ES_APOS
+#define KC_E_IEXL ES_IEXL
//========== Short hand for complex key combinations
-# define WIN_LEFT_HALF LALT(LGUI(KC_LEFT))
-# define WIN_RIGHT_HALF LALT(LGUI(KC_RIGHT))
-# define WIN_TO_LEFT LALT(LSFT( LGUI(KC_LEFT) ))
-# define WIN_TO_RIGHT LALT(LSFT( LGUI(KC_RIGHT) ))
-# define ALL_WIN LCTL(KC_DOWN)
-# define EXPOSE LGUI(KC_DOWN)
+#define WIN_LEFT_HALF LALT(LGUI(KC_LEFT))
+#define WIN_RIGHT_HALF LALT(LGUI(KC_RIGHT))
+#define ALL_WIN LCTL(KC_DOWN)
+#define EXPOSE LGUI(KC_DOWN)
// ========== Modifiers!!
-# define SHIFT OSM(MOD_LSFT)
+#define SHIFT OSM(MOD_LSFT)
//=============== tap for key hold for mod
-# define HYPR_H HYPR_T(KC_H)
-# define CTL_K RCTL_T(KC_K)
-# define ALT_J ALT_T(KC_J)
-# define SFT_MINS LSFT_T(KC_MINS) // tap - hold shift
-# define CMD_QUOT GUI_T(KC_QUOTE) // tap ' hold cmd
+#define HYPR_H HYPR_T(KC_H)
+#define CTL_K RCTL_T(KC_K)
+#define ALT_J ALT_T(KC_J)
+#define SFT_MINS LSFT_T(KC_MINS) // tap - hold shift
+#define CMD_MINS GUI_T(KC_MINS) // tap - hold cmd
+#define CMD_QUOT GUI_T(KC_QUOTE) // tap ' hold cmd
+#define SFT_QUOT LSFT_T(KC_QUOTE) // tap ' hold shift
//=============== Movement modified
-# define CTL_LEFT LCTL(KC_LEFT)
-# define CTL_RIGHT LCTL(KC_RIGHT)
+#define CTL_LEFT LCTL(KC_LEFT)
+#define CTL_RIGHT LCTL(KC_RIGHT)
-# define SFT_LEFT LSFT(KC_LEFT)
-# define SFT_RIGHT LSFT(KC_RIGHT)
+#define SFT_LEFT LSFT(KC_LEFT)
+#define SFT_RIGHT LSFT(KC_RIGHT)
+#define SFT_LEFT_END LGUI(LSFT(KC_LEFT))
+#define SFT_RIGHT_END LGUI(LSFT(KC_RIGHT))
diff --git a/users/stanrc85/rgblight_layers.c b/users/stanrc85/rgblight_layers.c
index 780555e7b5..1fbd541498 100644
--- a/users/stanrc85/rgblight_layers.c
+++ b/users/stanrc85/rgblight_layers.c
@@ -3,44 +3,7 @@
static uint8_t middle = 0;
static uint8_t bottom = 0;
-const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS(
- {3, 2, HSV_RED},
- {10, 2, HSV_RED}
-);
-
-const rgblight_segment_t PROGMEM my_layer1_layer[] = RGBLIGHT_LAYER_SEGMENTS(
- {3, 1, HSV_GREEN},
- {11, 1, HSV_GREEN}
-);
-
-const rgblight_segment_t PROGMEM my_layer2_layer[] = RGBLIGHT_LAYER_SEGMENTS(
- {3, 1, HSV_BLUE},
- {11, 1, HSV_BLUE}
-);
-
-const rgblight_segment_t PROGMEM my_layer3_layer[] = RGBLIGHT_LAYER_SEGMENTS(
- {3, 1, HSV_WHITE},
- {11, 1, HSV_WHITE}
-);
-
-// Now define the array of layers. Later layers take precedence
-const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
- my_capslock_layer,
- my_layer1_layer,
- my_layer2_layer,
- my_layer3_layer
-);
-
-void keyboard_post_init_user(void) {
- // Enable the LED layers
- rgblight_layers = my_rgb_layers;
-}
-
layer_state_t layer_state_set_user(layer_state_t state) {
- // Both layers will light up if both kb layers are active
- rgblight_set_layer_state(1, layer_state_cmp(state, 1));
- rgblight_set_layer_state(2, layer_state_cmp(state, 2));
- rgblight_set_layer_state(3, layer_state_cmp(state, 3));
middle = bottom = 0;
switch (get_highest_layer(state)) {
case _FN1_60:
@@ -60,7 +23,6 @@ layer_state_t layer_state_set_user(layer_state_t state) {
}
bool led_update_user(led_t led_state) {
- //rgblight_set_layer_state(0, led_state.caps_lock);
writePin(INDICATOR_PIN_0, !led_state.caps_lock);
writePin(INDICATOR_PIN_1, !middle);
writePin(INDICATOR_PIN_2, !bottom);
diff --git a/users/stanrc85/rules.mk b/users/stanrc85/rules.mk
index 5c572c0af3..54f0f76260 100644
--- a/users/stanrc85/rules.mk
+++ b/users/stanrc85/rules.mk
@@ -10,24 +10,10 @@ NKRO_ENABLE = no
SRC += stanrc85.c
-ifeq ($(strip $(KEYBOARD)), 1upkeyboards/1up60hse)
- SRC += layer_rgb.c
- VIA_ENABLE = yes
- LTO_ENABLE = yes
-endif
-ifeq ($(strip $(KEYBOARD)), dz60)
- SRC += layer_rgb.c
- VIA_ENABLE = yes
- LTO_ENABLE = yes
-endif
-ifeq ($(strip $(KEYBOARD)), projectkb/alice/rev1)
- SRC += rgblight_layers.c
- VIA_ENABLE = yes
- LTO_ENABLE = no
- VELOCIKEY_ENABLE=yes
-endif
ifeq ($(strip $(KEYBOARD)), projectkb/alice/rev2)
SRC += rgblight_layers.c
+ SRC += startup_fanfare.c
+ OPT_DEFS += -DHAS_INDICATORS
VIA_ENABLE = yes
LTO_ENABLE = no
VELOCIKEY_ENABLE=yes
diff --git a/users/stanrc85/stanrc85.c b/users/stanrc85/stanrc85.c
index c1aaad1a1a..2dbd41974b 100644
--- a/users/stanrc85/stanrc85.c
+++ b/users/stanrc85/stanrc85.c
@@ -44,8 +44,42 @@ void ctl_copy_reset (qk_tap_dance_state_t *state, void *user_data) {
}
}
+#if defined(HAS_INDICATORS)
+ static uint8_t led_user = 0;
+#endif
+
+void lock_unlock (qk_tap_dance_state_t *state, void *user_data) {
+ td_state = cur_dance(state);
+ switch (td_state) {
+ case SINGLE_TAP: // Ctl + Alt + Del to unlock workstation
+ tap_code16(KC_CAD);
+ #if defined(HAS_INDICATORS)
+ led_user = 0;
+ writePin(INDICATOR_PIN_0, !led_user);
+ wait_ms(200);
+ writePin(INDICATOR_PIN_1, !led_user);
+ wait_ms(200);
+ writePin(INDICATOR_PIN_2, !led_user);
+ #endif
+ break;
+ case SINGLE_HOLD:
+ break;
+ case DOUBLE_TAP: //Lock workstation
+ tap_code16(KC_LOCK);
+ #if defined(HAS_INDICATORS)
+ led_user = 1;
+ writePin(INDICATOR_PIN_2, !led_user);
+ wait_ms(200);
+ writePin(INDICATOR_PIN_1, !led_user);
+ wait_ms(200);
+ writePin(INDICATOR_PIN_0, !led_user);
+ #endif
+ break;
+ }
+}
+
qk_tap_dance_action_t tap_dance_actions[] = {
- [TD_WIN] = ACTION_TAP_DANCE_DOUBLE(KC_CAD, KC_LOCK),
+ [TD_WIN] = ACTION_TAP_DANCE_FN(lock_unlock),
[TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_GRV),
[TD_RCTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ctl_copy_finished, ctl_copy_reset)
};
diff --git a/users/stanrc85/startup_fanfare.c b/users/stanrc85/startup_fanfare.c
new file mode 100644
index 0000000000..507d9e389c
--- /dev/null
+++ b/users/stanrc85/startup_fanfare.c
@@ -0,0 +1,43 @@
+#include "stanrc85.h"
+
+static uint8_t top = 0;
+static uint8_t middle = 0;
+static uint8_t bottom = 0;
+
+static bool is_enabled = true;
+static bool is_rgblight_startup = true;
+static uint16_t rgblight_startup_loop_timer;
+
+void matrix_scan_user(void) {
+ // Boot up "fanfare"
+ if (is_rgblight_startup && is_keyboard_master()) {
+ if (timer_elapsed(rgblight_startup_loop_timer) > 10) {
+ static uint8_t counter;
+ counter++;
+ if (counter == 1) {
+ top = 1;
+ writePin(INDICATOR_PIN_0, !top);
+ wait_ms(200);
+ top = 0;
+ writePin(INDICATOR_PIN_0, !top);
+ }
+ if (counter == 2) {
+ middle = 1;
+ writePin(INDICATOR_PIN_1, !middle);
+ wait_ms(200);
+ middle = 0;
+ writePin(INDICATOR_PIN_1, !middle);
+ }
+ if (counter == 3) {
+ bottom = 1;
+ writePin(INDICATOR_PIN_2, !bottom);
+ wait_ms(200);
+ bottom = 0;
+ writePin(INDICATOR_PIN_2, !bottom);
+ }
+ if (counter == 4) {
+ is_enabled = is_rgblight_startup = false;
+ }
+ }
+ }
+}