aboutsummaryrefslogtreecommitdiff
path: root/users/dshields
diff options
context:
space:
mode:
Diffstat (limited to 'users/dshields')
-rw-r--r--users/dshields/config.h1
-rw-r--r--users/dshields/dshields.c43
-rw-r--r--users/dshields/dshields.h12
-rw-r--r--users/dshields/rules.mk15
4 files changed, 43 insertions, 28 deletions
diff --git a/users/dshields/config.h b/users/dshields/config.h
index 743f16f99..17eb98bd4 100644
--- a/users/dshields/config.h
+++ b/users/dshields/config.h
@@ -5,6 +5,7 @@
5#define ONESHOT_TAP_TOGGLE 2 5#define ONESHOT_TAP_TOGGLE 2
6#define ONESHOT_TIMEOUT 3000 6#define ONESHOT_TIMEOUT 3000
7#define RETRO_TAPPING 7#define RETRO_TAPPING
8#define BACKLIGHT_BREATHING
8 9
9#define MOUSEKEY_INTERVAL 20 10#define MOUSEKEY_INTERVAL 20
10#define MOUSEKEY_DELAY 0 11#define MOUSEKEY_DELAY 0
diff --git a/users/dshields/dshields.c b/users/dshields/dshields.c
index 6aff5c671..bc88cae56 100644
--- a/users/dshields/dshields.c
+++ b/users/dshields/dshields.c
@@ -1,30 +1,31 @@
1extern keymap_config_t keymap_config; 1#include "quantum.h"
2#include "dshields.h"
2 3
3/* uncomment to reset 4extern bool process_record_dynamic_macro(uint16_t keycode, keyrecord_t *record);
4void matrix_init_user(void) {
5 eeconfig_init();
6};
7*/
8 5
9bool process_record_user(uint16_t keycode, keyrecord_t *record) { 6bool process_record_user(uint16_t keycode, keyrecord_t *record) {
10 if (!process_record_dynamic_macro(keycode, record)) { 7 if (!process_record_dynamic_macro(keycode, record)) {
11 return false; 8 return false;
12 } 9 }
13 return true; 10 if (keycode == KC_ESC && record->event.pressed) {
14} 11 bool rc = true;
15 12 uint8_t mods = 0;
16// work in progress 13 if ((mods = get_oneshot_mods()) && !has_oneshot_mods_timed_out()) {
17uint32_t layer_state_set_user(uint32_t state) { 14 clear_oneshot_mods();
18 switch (biton32(state)) { 15 unregister_mods(mods);
19 case DEF: 16 rc = false;
20 set_all_leds_to(0,0,0); 17 }
21 break; 18 if ((mods = get_oneshot_locked_mods())) {
22 case FUN: 19 clear_oneshot_locked_mods();
23 // TODO light the fn keys 20 unregister_mods(mods);
24 // set_led_to(?, 0, 128, 0); 21 rc = false;
25 // set_led_to(?, 0, 128, 0); 22 }
26 break; 23 if (is_oneshot_layer_active()) {
24 layer_clear();
25 rc = false;
26 }
27 return rc;
27 } 28 }
28 return state; 29 return true;
29} 30}
30 31
diff --git a/users/dshields/dshields.h b/users/dshields/dshields.h
index c746e74fb..a65ccfea0 100644
--- a/users/dshields/dshields.h
+++ b/users/dshields/dshields.h
@@ -24,8 +24,18 @@
24#ifdef KEYBOARD_planck_light 24#ifdef KEYBOARD_planck_light
25 #define LGT_TOG RGB_TOG 25 #define LGT_TOG RGB_TOG
26 #define LGT_MOD RGB_MOD 26 #define LGT_MOD RGB_MOD
27#else 27 #define LGT_BRT _______
28#endif
29#ifdef KEYBOARD_planck_rev3
28 #define LGT_TOG BL_TOGG 30 #define LGT_TOG BL_TOGG
29 #define LGT_MOD BL_STEP 31 #define LGT_MOD BL_STEP
32 #define LGT_BRT BL_BRTG
33#endif
34#ifdef KEYBOARD_planck_rev6
35 #define LGT_TOG _______
36 #define LGT_MOD _______
37 #define LGT_BRT _______
30#endif 38#endif
31 39
40enum layers { DEF, LWR, RSE, FUN };
41enum keycodes { DYNAMIC_MACRO_RANGE = SAFE_RANGE };
diff --git a/users/dshields/rules.mk b/users/dshields/rules.mk
index a2bec4335..06f6e5e9f 100644
--- a/users/dshields/rules.mk
+++ b/users/dshields/rules.mk
@@ -1,9 +1,11 @@
1MOUSEKEY_ENABLE = yes # Mouse keys(+4700) 1SRC += dshields.c
2COMMAND_ENABLE = no # Commands for debug and configuration 2
3CONSOLE_ENABLE = no # Console for debug(+400) 3MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
4EXTRAKEY_ENABLE = no 4COMMAND_ENABLE = no # Commands for debug and configuration
5SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend 5CONSOLE_ENABLE = no # Console for debug(+400)
6API_SYSEX_ENABLE = no 6EXTRAKEY_ENABLE = no
7SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
8API_SYSEX_ENABLE = no
7 9
8ifeq ($(strip $(KEYBOARD)), planck/rev3) 10ifeq ($(strip $(KEYBOARD)), planck/rev3)
9 AUDIO_ENABLE = no 11 AUDIO_ENABLE = no
@@ -11,6 +13,7 @@ ifeq ($(strip $(KEYBOARD)), planck/rev3)
11 RGB_MATRIX_ENABLE = no 13 RGB_MATRIX_ENABLE = no
12endif 14endif
13ifeq ($(strip $(KEYBOARD)), planck/rev6) 15ifeq ($(strip $(KEYBOARD)), planck/rev6)
16 CFLAGS += -Wno-error=deprecated
14 EXTRALDFLAGS = -Wl,--build-id=none 17 EXTRALDFLAGS = -Wl,--build-id=none
15 AUDIO_ENABLE = no 18 AUDIO_ENABLE = no
16 BACKLIGHT_ENABLE = no 19 BACKLIGHT_ENABLE = no