summaryrefslogtreecommitdiffstats
path: root/users/dshields
diff options
context:
space:
mode:
Diffstat (limited to 'users/dshields')
-rw-r--r--users/dshields/config.h57
-rw-r--r--users/dshields/dshields.c26
-rw-r--r--users/dshields/dshields.h42
-rw-r--r--users/dshields/rules.mk32
4 files changed, 157 insertions, 0 deletions
diff --git a/users/dshields/config.h b/users/dshields/config.h
new file mode 100644
index 0000000000..aa10814763
--- /dev/null
+++ b/users/dshields/config.h
@@ -0,0 +1,57 @@
+#pragma once
+
+#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
+#define USB_MAX_POWER_CONSUMPTION 100
+#define ONESHOT_TAP_TOGGLE 2
+#define ONESHOT_TIMEOUT 3000
+#define RETRO_TAPPING
+#define BACKLIGHT_BREATHING
+#define DYNAMIC_MACRO_NO_NESTING
+
+#define MOUSEKEY_INTERVAL 20
+#define MOUSEKEY_DELAY 0
+#define MOUSEKEY_TIME_TO_MAX 40
+#define MOUSEKEY_MAX_SPEED 7
+#define MOUSEKEY_WHEEL_DELAY 0
+
+#define DISABLE_RGB_MATRIX_ALPHAS_MODS
+#define DISABLE_RGB_MATRIX_BREATHING
+#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
+#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
+#define DISABLE_RGB_MATRIX_BAND_SAT
+#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
+#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL
+#define DISABLE_RGB_MATRIX_BAND_VAL
+#define DISABLE_RGB_MATRIX_CYCLE_ALL
+#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
+#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN
+#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
+#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL
+#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL
+#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
+#define DISABLE_RGB_MATRIX_DUAL_BEACON
+#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
+#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
+#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
+#define DISABLE_RGB_MATRIX_SOLID_REACTIVE
+#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
+#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
+#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
+#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
+#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
+#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
+#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
+#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
+#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
+#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
+#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
+#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
+#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
+#define DISABLE_RGB_MATRIX_SOLID_SPLASH
+#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
+#define DISABLE_RGB_MATRIX_SOLID_SPLASH
+#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
+#define DISABLE_RGB_MATRIX_SPLASH
+#define DISABLE_RGB_MATRIX_MULTISPLASH
+#define DISABLE_RGB_MATRIX_SPLASH
+#define DISABLE_RGB_MATRIX_MULTISPLASH
diff --git a/users/dshields/dshields.c b/users/dshields/dshields.c
new file mode 100644
index 0000000000..8f432a317c
--- /dev/null
+++ b/users/dshields/dshields.c
@@ -0,0 +1,26 @@
+#include "quantum.h"
+#include "dshields.h"
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ if (keycode == KC_ESC && record->event.pressed) {
+ bool rc = true;
+ uint8_t mods = 0;
+ if ((mods = get_oneshot_mods()) && !has_oneshot_mods_timed_out()) {
+ clear_oneshot_mods();
+ unregister_mods(mods);
+ rc = false;
+ }
+ if ((mods = get_oneshot_locked_mods())) {
+ clear_oneshot_locked_mods();
+ unregister_mods(mods);
+ rc = false;
+ }
+ if (is_oneshot_layer_active()) {
+ layer_clear();
+ rc = false;
+ }
+ return rc;
+ }
+ return true;
+}
+
diff --git a/users/dshields/dshields.h b/users/dshields/dshields.h
new file mode 100644
index 0000000000..e1aa07a5db
--- /dev/null
+++ b/users/dshields/dshields.h
@@ -0,0 +1,42 @@
+#pragma once
+
+// one-shot layer keys
+#define OSL_RSE OSL(RSE)
+#define OSL_LWR OSL(LWR)
+#define OSL_FUN OSL(FUN)
+
+// one-shot modifier keys
+#define OSMLCTL OSM(MOD_LCTL)
+#define OSMRCTL OSM(MOD_RCTL)
+#define OSMLALT OSM(MOD_LALT)
+#define OSMRALT OSM(MOD_RALT)
+#define OSMLSFT OSM(MOD_LSFT)
+#define OSMRSFT OSM(MOD_RSFT)
+
+// mod-tap keys
+#define MT_SPC SFT_T(KC_SPC)
+
+// LED/RGB controls
+#ifdef KEYBOARD_planck_light
+ #define LGT_TOG RGB_TOG
+ #define LGT_MOD RGB_MOD
+ #define LGT_BRT _______
+ #define LGT_INC RGB_HUI
+ #define LGT_DEC RGB_HUD
+#endif
+#ifdef KEYBOARD_planck_rev3
+ #define LGT_TOG BL_TOGG
+ #define LGT_MOD BL_STEP
+ #define LGT_BRT BL_BRTG
+ #define LGT_INC BL_INC
+ #define LGT_DEC BL_DEC
+#endif
+#ifdef KEYBOARD_planck_rev6
+ #define LGT_TOG _______
+ #define LGT_MOD _______
+ #define LGT_BRT _______
+ #define LGT_INC _______
+ #define LGT_DEC _______
+#endif
+
+enum layers { DEF, LWR, RSE, FUN };
diff --git a/users/dshields/rules.mk b/users/dshields/rules.mk
new file mode 100644
index 0000000000..abfbe5e40e
--- /dev/null
+++ b/users/dshields/rules.mk
@@ -0,0 +1,32 @@
+SRC += dshields.c
+
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+COMMAND_ENABLE = no # Commands for debug and configuration
+CONSOLE_ENABLE = no # Console for debug(+400)
+EXTRAKEY_ENABLE = no
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+API_SYSEX_ENABLE = no
+SPACE_CADET_ENABLE = no
+LEADER_ENABLE = no
+DYNAMIC_MACRO_ENABLE = yes
+
+LINK_TIME_OPTIMIZATION_ENABLE = yes
+
+ifeq ($(strip $(KEYBOARD)), planck/rev3)
+ AUDIO_ENABLE = no
+ BACKLIGHT_ENABLE = yes
+ RGB_MATRIX_ENABLE = no
+endif
+ifeq ($(strip $(KEYBOARD)), planck/rev6)
+ CFLAGS += -Wno-error=deprecated
+ EXTRALDFLAGS = -Wl,--build-id=none
+ AUDIO_ENABLE = no
+ BACKLIGHT_ENABLE = no
+ RGB_MATRIX_ENABLE = no
+endif
+ifeq ($(strip $(KEYBOARD)), planck/light)
+ AUDIO_ENABLE = yes
+ BACKLIGHT_ENABLE = no
+ RGB_MATRIX_ENABLE = yes
+endif
+