Keymap: Add backlight controls for Planck Light in dshields keymap (#3801)

This commit is contained in:
Daniel Shields 2018-08-31 16:12:37 +01:00 committed by Drashna Jaelre
parent 2cd80f84a4
commit f9eedd7ce7
2 changed files with 20 additions and 6 deletions

View file

@ -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
)
};

View file

@ -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