From ed4fd6da83391f7bb52181591ad4fff696531072 Mon Sep 17 00:00:00 2001 From: plodah Date: Sat, 7 Dec 2024 00:49:57 +0000 Subject: [PATCH] Fixup Sofle to point of compiling --- keyboards/sofle/keymaps/plodah/config.h | 35 +++++++++++++++++++++++++ keyboards/sofle/keymaps/plodah/keymap.c | 25 ++++++++++++++++-- 2 files changed, 58 insertions(+), 2 deletions(-) diff --git a/keyboards/sofle/keymaps/plodah/config.h b/keyboards/sofle/keymaps/plodah/config.h index 085d5844d9f..2a1357b8d75 100644 --- a/keyboards/sofle/keymaps/plodah/config.h +++ b/keyboards/sofle/keymaps/plodah/config.h @@ -2,6 +2,41 @@ // SPDX-License-Identifier: GPL-2.0-or-later #pragma once +#include "plodah.h" + +// #define KC_PL_QFTR +// #define KC_PL_QRGB +#define KC_PL_QVER + +#ifdef PRODUCT + #undef PRODUCT +#endif // PRODUCT +#define PRODUCT "Sofle | plodahc" + +#define PLODAH_KNOB_ENHANCEMENTS_ENABLE +#define PLODAH_ALTTAB_ENHANCEMENTS_FORCE_NDE +// #define PLODAH_BORING_LAYER 1 + + +#if defined(DEFERRED_EXEC_ENABLE) + #define PLODAH_MSJIGGLER_ENABLED + #define PLODAH_MSJIGGLER_INTRO + // #define PLODAH_MSJIGGLER_INTRO_TIMEOUT 1200 + // #define PLODAH_MSJIGGLER_PATTERN 1 + // #define PLODAH_MSJIGGLER_AUTOSTOP + #define PLODAH_MSJIGGLER_INDICATOR_RGBINDEX 43 + #define PLODAH_MSJIGGLER_INDICATOR_HSV 0x0B, 0xFF, 0xFF +#endif // DEFERRED_EXEC_ENABLE + + +#define BOOTMAGIC_ROW 0 +#define BOOTMAGIC_COLUMN 0 + +#ifdef DYNAMIC_KEYMAP_LAYER_COUNT + #pragma message("DYNAMIC_KEYMAP_LAYER_COUNT") + #undef DYNAMIC_KEYMAP_LAYER_COUNT +#endif +#define DYNAMIC_KEYMAP_LAYER_COUNT 6 #define TRI_LAYER_LOWER_LAYER 2 #define TRI_LAYER_UPPER_LAYER 3 diff --git a/keyboards/sofle/keymaps/plodah/keymap.c b/keyboards/sofle/keymaps/plodah/keymap.c index 3dda3a25cbc..6cb78e9331f 100644 --- a/keyboards/sofle/keymaps/plodah/keymap.c +++ b/keyboards/sofle/keymaps/plodah/keymap.c @@ -4,11 +4,22 @@ enum sofle_layers { _QWERTY, + _COLEMAK, _LOWER, _RAISE, _ADJUST, }; +enum keymap_keycodes { + PL_ALTTAB = QK_USER_0, + PL_ALTSTAB, + PL_ENC_CCW, + PL_ENC_CW, + PL_ENC_PRS, + PL_MSJG, + PL_QVER, +}; + #define KC_QWERTY PDF(_QWERTY) #define KC_COLEMAK PDF(_COLEMAK) @@ -96,9 +107,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_RAISE] = LAYOUT( _______, _______ , _______ , _______ , _______ , _______, _______, _______ , _______, _______ , _______ ,_______, - _______, KC_INS, KC_PSCR, KC_APP, XXXXXXX, XXXXXXX, KC_PGUP, KC_PRVWD, KC_UP, KC_NXTWD,C(KC_BSPC), KC_BSPC, + _______, KC_INS, KC_PSCR, KC_APP, XXXXXXX, XXXXXXX, KC_PGUP, XXXXXXX, KC_UP, XXXXXXX,C(KC_BSPC), KC_BSPC, _______, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_CAPS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_BSPC, - _______, C(KC_Z), C(KC_X), C(KC_C), C(KC_V), XXXXXXX, _______, _______, XXXXXXX, KC_LSTRT, XXXXXXX, KC_LEND, XXXXXXX, _______, + _______, C(KC_Z), C(KC_X), C(KC_C), C(KC_V), XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), /* ADJUST @@ -123,3 +134,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; + +#if defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [_QWERTY] = {ENCODER_CCW_CW(PL_ENC_CCW, PL_ENC_CW), ENCODER_CCW_CW(PL_ENC_CCW, PL_ENC_CW)}, + [_COLEMAK] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU)}, + [_LOWER] = {ENCODER_CCW_CW(PL_ENC_CCW, PL_ENC_CW), ENCODER_CCW_CW(PL_ENC_CCW, PL_ENC_CW)}, + [_RAISE] = {ENCODER_CCW_CW(PL_ENC_CCW, PL_ENC_CW), ENCODER_CCW_CW(PL_ENC_CCW, PL_ENC_CW)}, + [_ADJUST] = {ENCODER_CCW_CW(PL_ENC_CCW, PL_ENC_CW), ENCODER_CCW_CW(PL_ENC_CCW, PL_ENC_CW)} +}; +#endif // defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE)