From 86a21ca40a90296fb096be4925809621fe686e60 Mon Sep 17 00:00:00 2001 From: Joe Wasson Date: Thu, 12 Apr 2018 09:37:09 -0700 Subject: [PATCH] Updates for Zeal60 --- users/talljoe/config.h | 2 ++ users/talljoe/rules.mk | 2 ++ users/talljoe/talljoe.c | 6 +++--- users/talljoe/talljoe.h | 32 ++++++++++++++++++++++++++++---- 4 files changed, 35 insertions(+), 7 deletions(-) diff --git a/users/talljoe/config.h b/users/talljoe/config.h index fcc3fe6610..15bbde6bcd 100644 --- a/users/talljoe/config.h +++ b/users/talljoe/config.h @@ -4,4 +4,6 @@ #define PREVENT_STUCK_MODIFIERS #define IGNORE_MOD_TAP_INTERRUPT +#define RESET_LAYER 15 + #endif // !USERSPACE_CONFIG_H diff --git a/users/talljoe/rules.mk b/users/talljoe/rules.mk index 701fbaa2a9..4f8c62128e 100644 --- a/users/talljoe/rules.mk +++ b/users/talljoe/rules.mk @@ -3,3 +3,5 @@ SRC += talljoe.c ifneq ("$(wildcard users/$(KEYMAP)/config.h)","") CONFIG_H += users/$(KEYMAP)/config.h endif + +EXTRAFLAGS+=-flto diff --git a/users/talljoe/talljoe.c b/users/talljoe/talljoe.c index a61ef261df..49d70c425f 100644 --- a/users/talljoe/talljoe.c +++ b/users/talljoe/talljoe.c @@ -56,9 +56,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, KC_BSPC, KC_0, KC_PDOT, KC_PCMM, KC_RCTL, KC_PTT ), // Adjust layer is on the split-shift key; or NAV+Enter (for non-split keyboards) [_ADJUST] = LAYOUT( - MO_RST , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_DEL , - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TG_ADJ , + MO_RST , FX(1) , FX(2) , FX(3) , FX(4) , FX(5) , FX(6) , FX(7) , FX(8) , FX(9) , FX(10) , BR_DEC , BR_INC , XXXXXXX, MO_RST , + XXXXXXX, H1_INC , S1_INC , H2_INC , S2_INC , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DFAULTS, EF_DEC , EF_INC , KC_DEL , + XXXXXXX, H1_DEC , S1_DEC , H2_DEC , S2_DEC , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TG_ADJ , TG_NKRO, LY_QWER, LY_WORK, LY_NRMN, LY_DVRK, LY_CLMK, XXXXXXX, XXXXXXX, XXXXXXX, KC_MAKE, TG_GAME, KC_RSFT, XXXXXXX, MO_RST , AG_NORM, AG_SWAP, XXXXXXX, BL_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_CAPS), // To Reset hit FN + ` + Esc diff --git a/users/talljoe/talljoe.h b/users/talljoe/talljoe.h index c6e69ea356..c4b33ec769 100644 --- a/users/talljoe/talljoe.h +++ b/users/talljoe/talljoe.h @@ -3,6 +3,14 @@ #include "quantum.h" +enum userspace_custom_keycodes { + KC_MAKE = SAFE_RANGE, // can always be here + DFAULTS, + TOGGLE_BACKLIGHT, + EFFECT, + EFFECT_END = EFFECT + 10 +}; + enum layers { _BASE = 0, _WORKMAN, @@ -13,7 +21,7 @@ enum layers { _NAV, _NUM, _ADJUST, - _RESET, + _RESET = RESET_LAYER, }; #define _______ KC_TRNS @@ -38,6 +46,7 @@ enum layers { #define TG_NKRO MAGIC_TOGGLE_NKRO #define KC_PTT KC_F24 #define MS_MID KC_MS_BTN3 +#define FX(x) (EFFECT + x) #define US_CAPS CTL_T(KC_ESC) #define US_QUOT MT(MOD_RCTL, KC_QUOT) @@ -64,8 +73,23 @@ enum layers { #error "Unsupported space count:" SPACE_COUNT #endif -enum userspace_custom_keycodes { - KC_MAKE = SAFE_RANGE, // can always be here -}; +#ifndef ZEAL_RGB + #define BR_INC KC_NO + #define BR_DEC KC_NO + #define EF_INC KC_NO + #define EF_DEC KC_NO + #define ES_INC KC_NO + #define ES_DEC KC_NO + #define H1_INC KC_NO + #define H1_DEC KC_NO + #define S1_INC KC_NO + #define S1_DEC KC_NO + #define H2_INC KC_NO + #define H2_DEC KC_NO + #define S2_INC KC_NO + #define S2_DEC KC_NO + #define FN_MO13 KC_NO + #define FN_MO2 KC_NO +#endif #endif