summaryrefslogtreecommitdiffstats
path: root/keyboards/planck
diff options
context:
space:
mode:
authorDaniel Shields <daniel.shields@bcs.org>2018-08-31 17:12:37 +0200
committerDrashna Jaelre <drashna@live.com>2018-08-31 17:12:37 +0200
commitf9eedd7ce741f15a1d5ff7327cb44d3979a46e35 (patch)
tree8e770d177b770aeb4b70410c4f4cba588440ed44 /keyboards/planck
parent2cd80f84a416153cb17bc4543477be0d708e6f0f (diff)
downloadqmk_firmware-f9eedd7ce741f15a1d5ff7327cb44d3979a46e35.tar.gz
qmk_firmware-f9eedd7ce741f15a1d5ff7327cb44d3979a46e35.tar.xz
Keymap: Add backlight controls for Planck Light in dshields keymap (#3801)
Diffstat (limited to 'keyboards/planck')
-rw-r--r--keyboards/planck/keymaps/dshields/keymap.c10
-rw-r--r--keyboards/planck/keymaps/dshields/rules.mk16
2 files changed, 20 insertions, 6 deletions
diff --git a/keyboards/planck/keymaps/dshields/keymap.c b/keyboards/planck/keymaps/dshields/keymap.c
index 86443d671..a39dc5e77 100644
--- a/keyboards/planck/keymaps/dshields/keymap.c
+++ b/keyboards/planck/keymaps/dshields/keymap.c
@@ -8,6 +8,14 @@ enum planck_keycodes { DYNAMIC_MACRO_RANGE = SAFE_RANGE };
#include "dynamic_macro.h"
+#ifdef KEYBOARD_planck_light
+ #define LGT_TOG RGB_TOG
+ #define LGT_MOD RGB_MOD
+#else
+ #define LGT_TOG BL_TOGG
+ #define LGT_MOD BL_STEP
+#endif
+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Default
* ,-----------------------------------------------------------------------------------.
@@ -74,7 +82,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[FUN] = LAYOUT_planck_grid(
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, RESET, KC_DEL, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 ,
KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, _______, _______, _______, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R,
- BL_TOGG, BL_STEP, _______, _______, _______, DM_STRT, DM_STOP, _______, _______, KC_BTN1, KC_BTN2, KC_BTN3,
+ LGT_TOG, LGT_MOD, _______, _______, _______, DM_STRT, DM_STOP, _______, _______, KC_BTN1, KC_BTN2, KC_BTN3,
_______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R
)
};
diff --git a/keyboards/planck/keymaps/dshields/rules.mk b/keyboards/planck/keymaps/dshields/rules.mk
index a084c67de..8799c78f0 100644
--- a/keyboards/planck/keymaps/dshields/rules.mk
+++ b/keyboards/planck/keymaps/dshields/rules.mk
@@ -3,11 +3,17 @@ ifndef QUANTUM_DIR
endif
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
-COMMAND_ENABLE = yes # Commands for debug and configuration
+COMMAND_ENABLE = no # Commands for debug and configuration
CONSOLE_ENABLE = no # Console for debug(+400)
-BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
-# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
-AUDIO_ENABLE = no
API_SYSEX_ENABLE = no
-BOOTLOADER = qmk-dfu
+
+ifneq (,$(findstring planck/light,$(KEYBOARD)))
+ AUDIO_ENABLE = yes
+ BACKLIGHT_ENABLE = no
+ RGB_MATRIX_ENABLE = yes
+else
+ AUDIO_ENABLE = no
+ BACKLIGHT_ENABLE = yes
+ RGB_MATRIX_ENABLE = no
+endif