summaryrefslogtreecommitdiffstats
path: root/keyboards/thevankeyboards/minivan/keymaps/josjoha/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/thevankeyboards/minivan/keymaps/josjoha/keymap.c')
-rw-r--r--keyboards/thevankeyboards/minivan/keymaps/josjoha/keymap.c61
1 files changed, 43 insertions, 18 deletions
diff --git a/keyboards/thevankeyboards/minivan/keymaps/josjoha/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/josjoha/keymap.c
index 035cdfdb3b..09a9b7d93d 100644
--- a/keyboards/thevankeyboards/minivan/keymaps/josjoha/keymap.c
+++ b/keyboards/thevankeyboards/minivan/keymaps/josjoha/keymap.c
@@ -118,8 +118,8 @@ enum {
enum {
_NORMAL_, // BASE layer is _DEF_BASE
_FULL_, // BASE layer is _ALT_BASE
-# ifdef DVORAK_DESCRAMBLE_HALF // not used with other keymaps
- _HALF_, // BASE layer is _ALT_BASE For DVORAK_DESCRAMBLE_HALF keymap: does *not* re-compute letters in Unicode
+# ifdef DVORAK_DESCRAMBLE // not used with other keymaps
+ _HALF_, // BASE layer is _ALT_BASE For DVORAK_DESCRAMBLE keymap: does *not* re-compute letters in Unicode
// This is for different Unicode encodings than “Control+U+HEX” (Linux). It will go through what is set on _RAR
# endif
};
@@ -350,7 +350,8 @@ void indicate_base (void) {
led2r = 100; // purple
led2b = 100;
}
-# ifdef DVORAK_DESCRAMBLE_HALF // not used with other keymaps
+
+# ifdef DVORAK_DESCRAMBLE // not used with other keymaps
else if (_HALF_ == alternate) { // alternate mode, 1 (normal unicode)
led0r = 100; // purple
led0b = 100;
@@ -359,6 +360,7 @@ void indicate_base (void) {
led2b = 100;
}
# endif
+
else if (_FULL_ == alternate) { // alternate mode, 1 (recomputed unicode for DVORAK_DESCRAMBLE)
led0r = 100; // purple
led0b = 100;
@@ -471,7 +473,13 @@ void set_led_colors_ (layer_state_t state) {
// Alternate BASE layer (alternate)
else if (layer_state_cmp (state, _ALT_BASE)) {
-# if !defined(BASE_NUMPAD__ALT_BASE) // Normal led colors for ‛regular’ base layers like Dvorak, Qwerty.
+# ifdef LEDS_OFF_BASE_ALT // Alternative Base leds off (always)
+
+ rgblight_disable_noeeprom ();
+
+# else // do use leds on Alternative Base layer
+
+# if !defined(BASE_NUMPAD__ALT_BASE) // Normal led colors for ‛regular’ base layers like Dvorak, Qwerty.
if (capslock) {
led2r = 255; // Brighter version to indicate capslock
@@ -482,32 +490,34 @@ void set_led_colors_ (layer_state_t state) {
led2g = color_ddl; //
led2b = color_ddl; //
}
+ middle_led_control (HSV_TEAL); // seems to be the same as CYAN/AZURE, conflicts with _ACC
-# else // BASE_NUMPAD__ALT_BASE: numpad on Alternate Base, which should show the state of NumLock
+# else // Numpad configured on Alternate Base, which should show the state of NumLock
// This is a copy of the _PAD led colors, but less bright
if (numlock) {
led0b = 80; // Blue for the numbers part
led2g = 80; // Green for the navigation part
}else{
- led0g = 80; // reversed
- led2b = 80; //
+ led2b = 80; // reversed
+ led0g = 80; //
}
- middle_led_control (60, 20, 100); // yellow (low saturation)
+ middle_led_control (60, 20, 100); // light-blue
-# endif
+# endif // BASE_NUMPAD__ALT_BASE
+
+# endif // LEDS_OFF_BASE_ALT
- middle_led_control (HSV_TEAL); // seems to be the same as CYAN/AZURE, conflicts with _ACC
}
// Default layer (generally), normal BASE layer
else if (layer_state_cmp (state, _DEF_BASE)) { // letters
-# ifdef LEDS_OFF_BASE_DEF
- led0r = 0; // All leds off when in Default Base
- led0g = 0; //
- led0b = 0; //
+# ifdef LEDS_OFF_BASE_DEF // Default Base leds off (always)
+
rgblight_disable_noeeprom ();
-# else
+
+# else // Do use leds on Default Base
+
if (capslock) {
led0r = 255; // Brighter version to indicate capslock
led0g = 255; //
@@ -517,16 +527,18 @@ void set_led_colors_ (layer_state_t state) {
led0g = 28; //
led0b = 28; //
}
-
middle_led_control (HSV_TEAL);
+
# endif // LEDS_OFF_BASE_DEF
+
}
//---
+ // pushes the configuration
setrgb (led0r, led0g, led0b, (LED_TYPE *)&led[0]); // Led 0
setrgb (led2r, led2g, led2b, (LED_TYPE *)&led[2]); // Led 2
- isolate_rgblight_set ();
+ isolate_rgblight_set (); // Activates the led color change, after on/off check.
# endif //RGBLIGHT_ENABLE
}
@@ -1090,13 +1102,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
, MORE_key1
# endif
- , KC_DEL , KC_ENT , _______
+ , KC_DEL , KC_ENT
+
+# ifndef SPACE_LEFT__ENTER_RIGHT // standard, layer switch on Base
+ , _______
+# else // reversed
+ , KC_PGUP
+# endif
+
# ifdef TRANSMINIVAN_MIDLEFT
, TRANS_MIDLEFT
# endif
+
+# ifndef SPACE_LEFT__ENTER_RIGHT // standard
, KC_PGUP
+# else // reversed, layer switch on Base
+ , _______
+# endif
+
# ifdef TRANSMINIVAN_RIGHTSIDE
, TRANS_RIGHT