Compare commits
2
Commits
9d2531efd3
...
354fb7ca3f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
354fb7ca3f
|
||
|
|
e7faaf3376
|
@@ -0,0 +1,8 @@
|
||||
// Copyright 2024 rootiest
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
// Always resolve combo keycodes from BASE (layer 0) so the
|
||||
// COMM+DOT+SLSH fallback combo fires regardless of the active layer.
|
||||
#define COMBO_ONLY_FROM_LAYER 0
|
||||
@@ -108,6 +108,15 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
|
||||
|
||||
// clang-format on
|
||||
|
||||
// Combos -----------------------------------------------------------------
|
||||
// COMM + DOT + SLSH → TO(BASE): emergency fallback to base layer.
|
||||
// COMBO_ONLY_FROM_LAYER 0 (config.h) ensures these keycodes are always
|
||||
// resolved from BASE so the combo fires regardless of the active layer.
|
||||
const uint16_t PROGMEM fallback_combo[] = {KC_COMM, KC_DOT, KC_SLSH, COMBO_END};
|
||||
combo_t key_combos[] = {
|
||||
COMBO(fallback_combo, TO(BASE)),
|
||||
};
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
chord_init();
|
||||
// Use the Linux unicode input method (Ctrl+Shift+U → hex → Enter).
|
||||
@@ -169,6 +178,35 @@ void matrix_scan_user(void) {
|
||||
chord_scan();
|
||||
}
|
||||
|
||||
// RGB Matrix Indicators --------------------------------------------------
|
||||
// ESC key (LED index 0) shows which layer is active at a glance.
|
||||
// BASE stays dark; each FN/control layer gets a distinct colour.
|
||||
#if defined(RGB_MATRIX_ENABLE)
|
||||
bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case FN1:
|
||||
RGB_MATRIX_INDICATOR_SET_COLOR(0, 0, 128, 255); // blue
|
||||
break;
|
||||
case FN2:
|
||||
RGB_MATRIX_INDICATOR_SET_COLOR(0, 0, 220, 80); // green
|
||||
break;
|
||||
case FN3:
|
||||
RGB_MATRIX_INDICATOR_SET_COLOR(0, 255, 120, 0); // orange
|
||||
break;
|
||||
case FN4:
|
||||
RGB_MATRIX_INDICATOR_SET_COLOR(0, 180, 0, 255); // purple
|
||||
break;
|
||||
case KEEB_CTL:
|
||||
RGB_MATRIX_INDICATOR_SET_COLOR(0, 255, 0, 0); // red
|
||||
break;
|
||||
default: // BASE — keep ESC dark
|
||||
RGB_MATRIX_INDICATOR_SET_COLOR(0, 0, 0, 0);
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif // RGB_MATRIX_ENABLE
|
||||
|
||||
// Tap Dance definitions
|
||||
tap_dance_action_t tap_dance_actions[] = {
|
||||
// Tap once for Home, twice for End
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
VIA_ENABLE = yes
|
||||
TAP_DANCE_ENABLE = yes
|
||||
UNICODE_ENABLE = yes
|
||||
COMBO_ENABLE = yes
|
||||
SRC += chord_unicode.c
|
||||
|
||||
Reference in New Issue
Block a user