Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dilemma 3x5+3 configs. #42

Merged
merged 6 commits into from
Apr 5, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 58 additions & 37 deletions keyboards/bastardkb/dilemma/3x5_3/3x5_3.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,60 +22,55 @@
/**
* LEDs index.
*
* 0 - 17 Underglow 36 - 53 Underglow
* ╭────────────────────╮ ╭────────────────────╮
* 2 3 8 9 12 30 27 26 21 20
* 22 21 20 19 18 54 55 56 57 58
* ├────────────────────┤ ├────────────────────┤
* 1 4 7 10 13 31 28 25 22 19
* 23 24 25 26 27 63 62 61 60 59
* ├────────────────────┤ ├────────────────────┤
* 0 5 6 11 14 32 29 24 23 18
* 32 31 30 29 28 64 65 66 67 68
* ╰────────────────────╯ ╰────────────────────╯
* 15 16 17 35 34 33
* 33 34 35 71 70 69
* ╰────────────╯ ╰────────────╯
*/
// clang-format off
#ifdef RGB_MATRIX_ENABLE
led_config_t g_led_config = { {
/* Key Matrix to LED index. */
// Left split.
{ 2, 3, 8, 9, 12 }, // Top row
{ 1, 4, 7, 10, 13 }, // Middle row
{ 0, 5, 6, 11, 14 }, // Bottom row
{ 17, NO_LED, 15, 16, NO_LED }, // Thumb cluster
{ 22, 21, 20, 19, 18 }, // Top row
{ 23, 24, 25, 26, 27 }, // Middle row
{ 32, 31, 30, 29, 28 }, // Bottom row
{ 34, 35, 33, NO_LED, NO_LED }, // Thumb cluster
// Right split.
{ 20, 21, 26, 27, 30 }, // Top row
{ 19, 22, 25, 28, 31 }, // Middle row
{ 18, 23, 24, 29, 32 }, // Bottom row
{ 35, NO_LED, 33, 34, NO_LED }, // Thumb cluster
{ 58, 57, 56, 55, 54 }, // Top row
{ 59, 60, 61, 62, 63 }, // Middle row
{ 68, 67, 66, 65, 64 }, // Bottom row
{ 70, 71, 69, NO_LED, NO_LED }, // Thumb cluster
}, {
/* LED index to physical position. */
// Left split underglow.
/* index=0 */ { 0, 0 }, { 0, 0 }, { 0, 0 }, // col 1 (left most)
/* index=3 */ { 0, 0 }, { 0, 0 }, { 0, 0 }, // col 2
/* index=6 */ { 0, 0 }, { 0, 0 }, { 0, 0 },
/* index=9 */ { 0, 0 }, { 0, 0 }, { 0, 0 },
/* index=12 */ { 0, 0 }, { 0, 0 }, { 0, 0 },
/* index=15 */ { 0, 0 }, { 0, 0 }, { 0, 0 }, // Thumb cluster
/* index=0 */ { 82, 0 }, { 60, 0 }, { 22, 0 }, { 15, 0 }, // Top 4
/* index=4 */ { 0, 25 }, { 0, 40 }, { 0, 55 }, // Pinky edge 3
/* index=7 */ { 15, 45 }, { 30, 45 }, { 35, 60 }, { 55, 62 }, // Bottom 8
/* index=11 */ { 72, 64 }, { 90, 64 }, { 98, 47 }, { 107, 40 },
/* index=15 */ { 110, 33 }, { 110, 19 }, { 110, 5 }, // Inner edge 3
// Left split per-key.
/* index=18 */ { 0, 42 }, { 0, 21 }, { 0, 0 }, // col 1 (left most)
/* index=21 */ { 18, 0 }, { 18, 21 }, { 18, 42 }, // col 2
/* index=24 */ { 36, 42 }, { 36, 21 }, { 36, 0 },
/* index=27 */ { 54, 0 }, { 54, 21 }, { 54, 42 },
/* index=30 */ { 72, 0 }, { 72, 21 }, { 72, 42 },
/* index=33 */ { 72, 64 }, { 90, 64 }, { 108, 64 }, // Thumb cluster
// Right split per-key.
/* index=36 */ { 0, 0 }, { 0, 0 }, { 0, 0 }, // col 10 (right most)
/* index=39 */ { 0, 0 }, { 0, 0 }, { 0, 0 }, // col 9
/* index=42 */ { 0, 0 }, { 0, 0 }, { 0, 0 },
/* index=45 */ { 0, 0 }, { 0, 0 }, { 0, 0 },
/* index=48 */ { 0, 0 }, { 0, 0 }, { 0, 0 },
/* index=51 */ { 0, 0 }, { 0, 0 }, { 0, 0 }, // Thumb cluster
/* index=18 */ { 73, 11 }, { 56, 9 }, { 39, 5 }, { 22, 10 }, { 5, 15 }, // row 1 (left most) 90, 107
/* index=23 */ { 5, 30 }, { 22, 25 }, { 39, 20 }, { 56, 24 }, { 73, 26 }, // row 2 (middle)
/* index=28 */ { 73, 41 }, { 56, 39 }, { 39, 35 }, { 22, 25 }, { 5, 45 }, // row 3 (left most)
/* index=33 */ { 45, 51 }, { 64, 53 }, { 81, 60 }, // Thumb cluster
// Right split underglow.
/* index=54 */ { 224, 42 }, { 224, 21 }, { 224, 0 }, // col 10 (right most)
/* index=57 */ { 206, 0 }, { 206, 21 }, { 206, 42 }, // col 9
/* index=60 */ { 188, 42 }, { 188, 21 }, { 188, 0 },
/* index=63 */ { 170, 0 }, { 170, 21 }, { 170, 42 },
/* index=66 */ { 152, 0 }, { 152, 21 }, { 152, 42 },
/* index=69 */ { 152, 64 }, { 134, 64 }, { 116, 64 }, // Thumb cluster
/* index=36 */ { 142, 0 }, { 164, 0 }, { 202, 0 }, { 209, 0 }, // Top 4
/* index=40 */ { 224, 25 }, { 224, 40 }, { 224, 55 }, // Pinky edge 3
/* index=43 */ { 209, 45 }, { 194, 45 }, { 189, 60 }, { 169, 62 }, // Bottom 8
/* index=47 */ { 152, 64 }, { 134, 64 }, { 126, 47 }, { 117, 40 },
/* index=51 */ { 114, 33 }, { 114, 19 }, { 114, 5 }, // Inner edge 3
// Right split per-key.
/* index=54 */ { 151, 11 }, { 168, 9 }, { 185, 5 }, { 202, 10 }, { 219, 15 }, // row 1 (right most) 117 134
/* index=59 */ { 219, 30 }, { 202, 25 }, { 185, 20 }, { 168, 24 }, { 151, 26 }, // row 2 (middle)
/* index=64 */ { 151, 41 }, { 168, 39 }, { 185, 35 }, { 202, 25 }, { 219, 45 }, // row 3 (right most)
/* index=69 */ { 179, 51 }, { 160, 53 }, { 143, 60 }, // Thumb cluster
}, {
/* LED index to flag. */
// Left split underglow.
Expand Down Expand Up @@ -109,3 +104,29 @@ led_config_t g_led_config = { {
} };
#endif
// clang-format on

#ifdef ENCODER_ENABLE
bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_user(index, clockwise)) {
return false;
}
// 0 is left-half encoder,
// 1 is right-half encoder
if (index == 0) {
// Mouse Scroll
if (clockwise) {
tap_code(KC_MS_WH_DOWN);
} else {
tap_code(KC_MS_WH_UP);
}
} else if (index == 1) {
// Volume control
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
}
return true;
}
#endif
12 changes: 12 additions & 0 deletions keyboards/bastardkb/dilemma/3x5_3/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
#define CRC8_USE_TABLE
#define CRC8_OPTIMIZE_SPEED

/* Encoders. */
#define ENCODERS_PAD_A { GP25 }
#define ENCODERS_PAD_B { GP24 }

/* Cirque trackpad over SPI. */
#define SPI_SCK_PIN GP22
#define SPI_MOSI_PIN GP23
Expand All @@ -55,6 +59,10 @@
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP17

/* Bootmagic. */
#define BOOTMAGIC_LITE_ROW_RIGHT 4
#define BOOTMAGIC_LITE_COLUMN_RIGHT 0

/* RGB settings. */
#define RGBLED_NUM 72
#define RGBLED_SPLIT \
Expand All @@ -68,6 +76,7 @@
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255
# define RGB_DISABLE_WHEN_USB_SUSPENDED
# define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS

// Startup values.
# define RGB_MATRIX_DEFAULT_HUE 0
Expand Down Expand Up @@ -110,6 +119,9 @@
# define ENABLE_RGB_MATRIX_HUE_BREATHING
# define ENABLE_RGB_MATRIX_HUE_PENDULUM
# define ENABLE_RGB_MATRIX_HUE_WAVE
# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
# define ENABLE_RGB_MATRIX_PIXEL_FLOW
# define ENABLE_RGB_MATRIX_PIXEL_RAIN
# define ENABLE_RGB_MATRIX_TYPING_HEATMAP
# define ENABLE_RGB_MATRIX_DIGITAL_RAIN
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
Expand Down
2 changes: 1 addition & 1 deletion keyboards/bastardkb/dilemma/3x5_3/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"keyboard_name": "Dilemma (3x5+3) Assembled",
"usb": {
"device_version": "2.0.0",
"pid": "0x1835"
"pid": "0x1836"
},
"split": {
"soft_serial_pin": "GP1"
Expand Down
42 changes: 42 additions & 0 deletions keyboards/bastardkb/dilemma/3x5_3/keymaps/via/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/**
* Copyright 2021 Charly Delay <[email protected]> (@0xcharly)
casuanoob marked this conversation as resolved.
Show resolved Hide resolved
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once

#ifdef VIA_ENABLE
/* VIA configuration. */
# define DYNAMIC_KEYMAP_LAYER_COUNT 6
#endif // VIA_ENABLE

/**
* \brief Prevent normal rollover on alphas from accidentally triggering mods.
*
* Ignores key presses that interrupt a mod-tap. Must-have for Home Row mod.
*
* Without `IGNORE_MOD_TAP_INTERRUPT`, within `TAPPING_TERM`:
* Mod(a)🠗 e🠗 Mod(a)🠕 e🠕 ➞ Mod+e
* With `IGNORE_MOD_TAP_INTERRUPT`, within `TAPPING_TERM`:
* Mod(a)🠗 e🠗 Mod(a)🠕 e🠕 ➞ ae
*/
#define IGNORE_MOD_TAP_INTERRUPT

/* Charybdis-specific features. */

#ifdef POINTING_DEVICE_ENABLE
// Automatically enable the pointer layer when moving the trackpad.
//#define POINTING_DEVICE_AUTO_MOUSE_ENABLE
//#define AUTO_MOUSE_DEFAULT_LAYER 3
#endif // POINTING_DEVICE_ENABLE
casuanoob marked this conversation as resolved.
Show resolved Hide resolved
Loading