summaryrefslogtreecommitdiffstats
path: root/users/wanleg/wanleg.c
diff options
context:
space:
mode:
authorwanleg <32079073+wanleg@users.noreply.github.com>2019-05-01 20:29:00 -0700
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>2019-05-01 20:29:00 -0700
commit588b2329cbe3b521475c62d5641c713430d8f188 (patch)
tree55b08b3d8dc4af083a5c6d276e33458798ab4bc0 /users/wanleg/wanleg.c
parent6fa88d981c237f19839b2cc4ca4a0d44f84d2043 (diff)
Wanleg tuneup / additions (#5752)
* change split keyboard tapping term in userspace * fix 5x15 layout numpad movement * minor changes for Nori setup * edit based on 40percentclub refactor change * fix gherkin due to refactor * kbd6x wanleg keymap * kbd6x edits * kbd6x tweak * fn / backlight layer * fix jj40 rgb hex issue * wanleg gherkin lighting * 4x12 layout cleanup * move kbd6x to new kbdfans directory * minor edit related to new kbdfans directory * mac layout for kbd6x * gherkin flip option * tweak tapping term on lets_split * edit for keebio board coalescing * update user readme with git hints * wanleg miniaxe keymap * testing Permissive Hold instead of Mod Tap Interrupt * wiring names * kbd6x keymap * change default backlight behaviour on kbd6x * userspace underglow * userspace underglow * underglow tweaks * user readme update * more layer underglow tweaks * fix userspace for non-underglow-enabled boards * readme edits * readme edits * readme edits * readme edits * Update readme.md * Update readme.md * readme edits * readme edits * update keymap picture
Diffstat (limited to 'users/wanleg/wanleg.c')
-rw-r--r--users/wanleg/wanleg.c41
1 files changed, 39 insertions, 2 deletions
diff --git a/users/wanleg/wanleg.c b/users/wanleg/wanleg.c
index 274c74f728..aa7b1c9a4c 100644
--- a/users/wanleg/wanleg.c
+++ b/users/wanleg/wanleg.c
@@ -6,20 +6,30 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
- print("mode just switched to qwerty and this is a huge string\n");
set_single_persistent_default_layer(_QW);
+ #if defined(RGBLIGHT_ENABLE)
+ rgblight_sethsv_noeeprom(0,0,128);
+ rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING);
+ #endif
}
return false;
break;
case GHERKIN:
if (record->event.pressed) {
set_single_persistent_default_layer(_GK);
+ #if defined(RGBLIGHT_ENABLE)
+ rgblight_sethsv_noeeprom(128,255,64);
+ #endif
}
return false;
break;
case gGHERKIN:
if (record->event.pressed) {
set_single_persistent_default_layer(gGK);
+ #if defined(RGBLIGHT_ENABLE)
+ rgblight_sethsv_noeeprom(128,255,128);
+ rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT);
+ #endif
}
return false;
break;
@@ -113,6 +123,17 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return false;
break;
+ //on RESET, underglow red if present
+ case RESET:
+ if (record->event.pressed) {
+ #if defined(RGBLIGHT_ENABLE)
+ rgblight_enable_noeeprom(); // enables Rgb, without saving settings
+ rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
+ rgblight_sethsv_noeeprom_red();
+ #endif
+ }
+ return true; // Let QMK send the press/release events as normal
+ break;
}
return true;
}
@@ -128,6 +149,7 @@ void matrix_init_keymap(void) {}
// Call user matrix init, then call the keymap's init function
void matrix_init_user(void) {
+//turn off pro micro LEDs
#if defined(KEYBOARD_lets_split_rev2)
DDRD &= ~(1<<5);
PORTD &= ~(1<<5);
@@ -135,5 +157,20 @@ void matrix_init_user(void) {
DDRB &= ~(1<<0);
PORTB &= ~(1<<0);
#endif
+
+//disable backlight breathing for keyboard using random flashing RGB LEDs for backlight
+//(breathing provides insufficient power to integrated LED IC)
+#if defined(KEYBOARD_kbdfans_kbd6x) && defined(BACKLIGHT_BREATHING)
+ breathing_disable();
+#endif
matrix_init_keymap();
-} \ No newline at end of file
+}
+
+//at end of firmware startup process, change powerup default layer and underglow colour for kbd6x
+void keyboard_post_init_user(void) {
+ #if defined(KEYBOARD_kbdfans_kbd6x)
+ set_single_persistent_default_layer(_QW);
+ rgblight_mode_noeeprom(RGBLIGHT_MODE_SNAKE + 5);
+ rgblight_sethsv_noeeprom(0,0,128);
+ #endif
+}