aboutsummaryrefslogtreecommitdiff
path: root/waffle
diff options
context:
space:
mode:
Diffstat (limited to 'waffle')
-rw-r--r--waffle/combos.h12
-rw-r--r--waffle/rules.mk2
-rw-r--r--waffle/tapping.c1
-rw-r--r--waffle/waffle.c36
-rw-r--r--waffle/waffle.h2
5 files changed, 19 insertions, 34 deletions
diff --git a/waffle/combos.h b/waffle/combos.h
index f823d4c..9fbfdef 100644
--- a/waffle/combos.h
+++ b/waffle/combos.h
@@ -2,20 +2,18 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
-#define CMB(name, action, ...) C_##name,
+#define CMB(name, action, ...) name,
enum combos {
#include "combos.def"
- COMBO_LENGTH
};
#undef CMB
-uint16_t COMBO_LEN = COMBO_LENGTH;
-#define CMB(name, action, ...) const uint16_t PROGMEM name##_combo[] = {__VA_ARGS__, COMBO_END};
+#define CMB(name, action, ...) uint16_t const name##_combo[] PROGMEM = {__VA_ARGS__, COMBO_END};
#include "combos.def"
#undef CMB
-combo_t key_combos[COMBO_LENGTH] = {
-#define CMB(name, action, ...) COMBO(name##_combo, action),
+#define CMB(name, action, ...) [name] = COMBO(name##_combo, action),
+combo_t key_combos[] = {
#include "combos.def"
-#undef CMB
};
+#undef CMB
diff --git a/waffle/rules.mk b/waffle/rules.mk
index caa8e8e..37c913c 100644
--- a/waffle/rules.mk
+++ b/waffle/rules.mk
@@ -14,7 +14,7 @@ CONSOLE_ENABLE = no
DEBOUNCE_TYPE = asym_eager_defer_pk
INTROSPECTION_KEYMAP_C = waffle.c
-SRC += waffle.c tapping.c
+SRC += tapping.c
ifeq ($(strip $(OLED_ENABLE)), yes)
SRC += oled.c
diff --git a/waffle/tapping.c b/waffle/tapping.c
index 2c7e93e..ab9e9d4 100644
--- a/waffle/tapping.c
+++ b/waffle/tapping.c
@@ -27,6 +27,7 @@ uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
case TD(CBRKT):
case TD(BRKT):
case TD(BSLS_PIPE):
+ case TD(SPC_QUAD):
return TAPPING_TERM + 60;
default:
return TAPPING_TERM;
diff --git a/waffle/waffle.c b/waffle/waffle.c
index 64e28d1..dccb7a5 100644
--- a/waffle/waffle.c
+++ b/waffle/waffle.c
@@ -47,6 +47,11 @@ __attribute__ ((weak)) void keyboard_post_init_user(void) {
rgblight_sethsv_noeeprom(HSV_CYAN);
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
#endif
+#ifdef RGB_MATRIX_ENABLE
+ rgb_matrix_enable_noeeprom();
+ rgb_matrix_sethsv_noeeprom(HSV_CYAN);
+ rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR);
+#endif
#ifdef CONSOLE_ENABLE
debug_keyboard = true;
debug_enable = true;
@@ -59,31 +64,12 @@ __attribute__ ((weak)) void keyboard_post_init_user(void) {
#endif
}
-#if !defined (ENCODER_MAP_ENABLE) && defined (ENCODER_ENABLE)
-bool encoder_update_user(uint8_t index, bool clockwise) {
- if (index == 0) {
- switch (get_highest_layer(layer_state)) {
- case _LOWER:
-#ifdef RGB_MATRIX_ENABLE
- clockwise ? rgb_matrix_increase_hue_noeeprom() : rgb_matrix_decrease_hue_noeeprom();
-#endif
- break;
- default:
- clockwise ? tap_code_delay(KC_VOLU, 20) : tap_code_delay(KC_VOLD, 20);
- }
- } else if (index == 1) {
- switch (get_highest_layer(layer_state)) {
- case _LOWER:
-#ifdef RGB_MATRIX_ENABLE
- clockwise ? rgb_matrix_increase_sat_noeeprom() : rgb_matrix_decrease_sat_noeeprom();
-#endif
- break;
- default:
- clockwise ? tap_code(KC_MNXT) : tap_code(KC_MPRV);
- }
- }
- return false;
-}
+#ifdef ENCODER_MAP_ENABLE
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
+ [_BASE] = {{ KC_VOLU, KC_VOLD }, { KC_MNXT, KC_MPRV }},
+ [_LOWER] = {{ RGB_SAI, RGB_SAD }, { RGB_HUI, RGB_HUD }},
+ [_RAISE] = {{ C(KC_LEFT), C(KC_RGHT) }, { C(S(KC_TAB)), C(KC_TAB) }}
+};
#endif
#ifdef POINTING_DEVICE_DRIVER_pimoroni_trackball
diff --git a/waffle/waffle.h b/waffle/waffle.h
index d87d730..7082eea 100644
--- a/waffle/waffle.h
+++ b/waffle/waffle.h
@@ -75,7 +75,7 @@ enum unicode_mode {
#define H_S UC(0x262D) //☭
#define STAR UC(0x2605) //★
#define ESCLWR LT(_LOWER, KC_ESC)
-#define LWRSPC LT(_LOWER, QSPC)
+#define LWRSPC LT(_LOWER, KC_SPC)
#define RSEBSP LT(_RAISE, KC_BSPC)
#define HRML(k1,k2,k3,k4) LALT_T(k1),LGUI_T(k2),LCTL_T(k3),LSFT_T(k4)
#define HRMR(k1,k2,k3,k4) RSFT_T(k1),RCTL_T(k2),RGUI_T(k3),RALT_T(k4)