863f06d1fb
into c8ceda461a
@ -0,0 +1,113 @@ | |||
{ | |||
"layouts": { | |||
"LAYOUT": { | |||
"layout": [ | |||
{ "matrix": [0, 1], "x": 2, "y": 0 }, | |||
{ "matrix": [0, 2], "x": 3, "y": 0 }, | |||
{ "matrix": [0, 3], "x": 4, "y": 0 }, | |||
{ "matrix": [0, 4], "x": 5, "y": 0 }, | |||
{ "matrix": [4, 4], "x": 8, "y": 0 }, | |||
{ "matrix": [4, 3], "x": 9, "y": 0 }, | |||
{ "matrix": [4, 2], "x": 10, "y": 0 }, | |||
{ "matrix": [4, 1], "x": 11, "y": 0 }, | |||
{ "matrix": [0, 0], "x": 0, "y": 1 }, | |||
{ "matrix": [1, 0], "x": 1, "y": 1 }, | |||
{ "matrix": [1, 1], "x": 2, "y": 1 }, | |||
{ "matrix": [1, 2], "x": 3, "y": 1 }, | |||
{ "matrix": [1, 3], "x": 4, "y": 1 }, | |||
{ "matrix": [1, 4], "x": 5, "y": 1 }, | |||
{ "matrix": [5, 4], "x": 8, "y": 1 }, | |||
{ "matrix": [5, 3], "x": 9, "y": 1 }, | |||
{ "matrix": [5, 2], "x": 10, "y": 1 }, | |||
{ "matrix": [5, 1], "x": 11, "y": 1 }, | |||
{ "matrix": [5, 0], "x": 12, "y": 1 }, | |||
{ "matrix": [4, 0], "x": 13, "y": 1 }, | |||
{ "matrix": [3, 0], "x": 0, "y": 2 }, | |||
{ "matrix": [2, 0], "x": 1, "y": 2 }, | |||
{ "matrix": [2, 1], "x": 2, "y": 2 }, | |||
{ "matrix": [2, 2], "x": 3, "y": 2 }, | |||
{ "matrix": [2, 3], "x": 4, "y": 2 }, | |||
{ "matrix": [2, 4], "x": 5, "y": 2 }, | |||
{ "matrix": [6, 4], "x": 8, "y": 2 }, | |||
{ "matrix": [6, 3], "x": 9, "y": 2 }, | |||
{ "matrix": [6, 2], "x": 10, "y": 2 }, | |||
{ "matrix": [6, 1], "x": 11, "y": 2 }, | |||
{ "matrix": [6, 0], "x": 12, "y": 2 }, | |||
{ "matrix": [7, 0], "x": 13, "y": 2 }, | |||
{ "matrix": [3, 2], "x": 4, "y": 3 }, | |||
{ "matrix": [3, 3], "x": 5, "y": 3 }, | |||
{ "matrix": [3, 4], "x": 6, "y": 3 }, | |||
{ "matrix": [7, 4], "x": 7, "y": 3 }, | |||
{ "matrix": [7, 3], "x": 8, "y": 3 }, | |||
{ "matrix": [7, 2], "x": 9, "y": 3 } | |||
] | |||
} | |||
}, | |||
"matrix_pins": { | |||
"cols": ["GP2", "GP3", "GP4", "GP5", "GP6"], | |||
"rows": ["GP28", "GP27", "GP26", "GP15"] | |||
}, | |||
"split":{ | |||
"bootmagic": { | |||
"matrix": [4, 0] | |||
} | |||
}, | |||
"backlight": { | |||
"pin": "GP14" | |||
}, | |||
"rgblight": { | |||
"led_count": 38, | |||
"split": true, | |||
"split_count": [19, 19] | |||
}, | |||
"rgb_matrix": { | |||
"split_count": [19, 19], | |||
"layout": [ | |||
{ "flags": 4, "matrix": [0, 4], "x": 71, "y": 6 }, | |||
{ "flags": 4, "matrix": [0, 3], "x": 57, "y": 4 }, | |||
{ "flags": 4, "matrix": [0, 2], "x": 42, "y": 0 }, | |||
{ "flags": 4, "matrix": [0, 1], "x": 28, "y": 4 }, | |||
{ "flags": 4, "matrix": [1, 1], "x": 28, "y": 21 }, | |||
{ "flags": 4, "matrix": [1, 0], "x": 14, "y": 24 }, | |||
{ "flags": 4, "matrix": [0, 0], "x": 0, "y": 24 }, | |||
{ "flags": 4, "matrix": [3, 0], "x": 0, "y": 41 }, | |||
{ "flags": 4, "matrix": [2, 0], "x": 14, "y": 41 }, | |||
{ "flags": 4, "matrix": [2, 1], "x": 28, "y": 37 }, | |||
{ "flags": 4, "matrix": [2, 2], "x": 42, "y": 33 }, | |||
{ "flags": 4, "matrix": [1, 2], "x": 42, "y": 16 }, | |||
{ "flags": 4, "matrix": [1, 3], "x": 57, "y": 21 }, | |||
{ "flags": 4, "matrix": [1, 4], "x": 71, "y": 22 }, | |||
{ "flags": 4, "matrix": [2, 4], "x": 71, "y": 39 }, | |||
{ "flags": 4, "matrix": [2, 3], "x": 57, "y": 37 }, | |||
{ "flags": 4, "matrix": [3, 2], "x": 55, "y": 57 }, | |||
{ "flags": 4, "matrix": [3, 3], "x": 71, "y": 59 }, | |||
{ "flags": 4, "matrix": [3, 4], "x": 87, "y": 64 }, | |||
{ "flags": 4, "matrix": [7, 4], "x": 137, "y": 64 }, | |||
{ "flags": 4, "matrix": [7, 3], "x": 153, "y": 59 }, | |||
{ "flags": 4, "matrix": [7, 2], "x": 168, "y": 57 }, | |||
{ "flags": 4, "matrix": [6, 3], "x": 167, "y": 37 }, | |||
{ "flags": 4, "matrix": [6, 4], "x": 153, "y": 39 }, | |||
{ "flags": 4, "matrix": [5, 4], "x": 153, "y": 22 }, | |||
{ "flags": 4, "matrix": [5, 3], "x": 167, "y": 21 }, | |||
{ "flags": 4, "matrix": [5, 2], "x": 181, "y": 13 }, | |||
{ "flags": 4, "matrix": [6, 2], "x": 181, "y": 33 }, | |||
{ "flags": 4, "matrix": [6, 1], "x": 196, "y": 37 }, | |||
{ "flags": 4, "matrix": [6, 0], "x": 210, "y": 41 }, | |||
{ "flags": 4, "matrix": [7, 0], "x": 224, "y": 41 }, | |||
{ "flags": 4, "matrix": [4, 0], "x": 224, "y": 24 }, | |||
{ "flags": 4, "matrix": [5, 0], "x": 210, "y": 24 }, | |||
{ "flags": 4, "matrix": [5, 1], "x": 196, "y": 21 }, | |||
{ "flags": 4, "matrix": [4, 1], "x": 196, "y": 4 }, | |||
{ "flags": 4, "matrix": [4, 2], "x": 182, "y": 0 }, | |||
{ "flags": 4, "matrix": [4, 3], "x": 167, "y": 4 }, | |||
{ "flags": 4, "matrix": [4, 4], "x": 153, "y": 6 } | |||
] | |||
} | |||
} |
@ -0,0 +1,8 @@ | |||
// Copyright 2023 zzeneg (@zzeneg) | |||
// SPDX-License-Identifier: GPL-2.0-or-later | |||
#pragma once | |||
#define LCD_DC_PIN GP27 | |||
#define LCD_RST_PIN GP12 | |||
#define BACKLIGHT_PWM_DRIVER PWMD6 |
@ -0,0 +1,120 @@ | |||
{ | |||
"layouts": { | |||
"LAYOUT": { | |||
"layout": [ | |||
{ "matrix": [0, 0], "x": 1, "y": 0 }, | |||
{ "matrix": [0, 1], "x": 2, "y": 0 }, | |||
{ "matrix": [0, 2], "x": 3, "y": 0 }, | |||
{ "matrix": [0, 3], "x": 4, "y": 0 }, | |||
{ "matrix": [0, 4], "x": 5, "y": 0 }, | |||
{ "matrix": [4, 4], "x": 8, "y": 0 }, | |||
{ "matrix": [4, 3], "x": 9, "y": 0 }, | |||
{ "matrix": [4, 2], "x": 10, "y": 0 }, | |||
{ "matrix": [4, 1], "x": 11, "y": 0 }, | |||
{ "matrix": [4, 0], "x": 12, "y": 0 }, | |||
{ "matrix": [3, 0], "x": 0, "y": 1 }, | |||
{ "matrix": [1, 0], "x": 1, "y": 1 }, | |||
{ "matrix": [1, 1], "x": 2, "y": 1 }, | |||
{ "matrix": [1, 2], "x": 3, "y": 1 }, | |||
{ "matrix": [1, 3], "x": 4, "y": 1 }, | |||
{ "matrix": [1, 4], "x": 5, "y": 1 }, | |||
{ "matrix": [5, 4], "x": 8, "y": 1 }, | |||
{ "matrix": [5, 3], "x": 9, "y": 1 }, | |||
{ "matrix": [5, 2], "x": 10, "y": 1 }, | |||
{ "matrix": [5, 1], "x": 11, "y": 1 }, | |||
{ "matrix": [5, 0], "x": 12, "y": 1 }, | |||
{ "matrix": [7, 0], "x": 13, "y": 1 }, | |||
{ "matrix": [3, 1], "x": 0, "y": 2 }, | |||
{ "matrix": [2, 0], "x": 1, "y": 2 }, | |||
{ "matrix": [2, 1], "x": 2, "y": 2 }, | |||
{ "matrix": [2, 2], "x": 3, "y": 2 }, | |||
{ "matrix": [2, 3], "x": 4, "y": 2 }, | |||
{ "matrix": [2, 4], "x": 5, "y": 2 }, | |||
{ "matrix": [6, 4], "x": 8, "y": 2 }, | |||
{ "matrix": [6, 3], "x": 9, "y": 2 }, | |||
{ "matrix": [6, 2], "x": 10, "y": 2 }, | |||
{ "matrix": [6, 1], "x": 11, "y": 2 }, | |||
{ "matrix": [6, 0], "x": 12, "y": 2 }, | |||
{ "matrix": [7, 1], "x": 13, "y": 2 }, | |||
{ "matrix": [3, 2], "x": 4, "y": 3 }, | |||
{ "matrix": [3, 3], "x": 5, "y": 3 }, | |||
{ "matrix": [3, 4], "x": 6, "y": 3 }, | |||
{ "matrix": [7, 4], "x": 7, "y": 3 }, | |||
{ "matrix": [7, 3], "x": 8, "y": 3 }, | |||
{ "matrix": [7, 2], "x": 9, "y": 3 } | |||
] | |||
} | |||
}, | |||
"matrix_pins": { | |||
"cols": ["GP2", "GP3", "GP4", "GP5", "GP6"], | |||
"rows": ["GP26", "GP15", "GP14", "GP13"] | |||
}, | |||
"bootmagic": { | |||
"matrix": [3, 0] | |||
}, | |||
"split":{ | |||
"bootmagic": { | |||
"matrix": [7, 0] | |||
} | |||
}, | |||
"backlight": { | |||
"pin": "GP28" | |||
}, | |||
"rgblight": { | |||
"led_count": 40, | |||
"split": true, | |||
"split_count": [20, 20] | |||
}, | |||
"rgb_matrix": { | |||
"split_count": [20, 20], | |||
"layout": [ | |||
{ "flags": 4, "matrix": [0, 4], "x": 71, "y": 6 }, | |||
{ "flags": 4, "matrix": [0, 3], "x": 57, "y": 4 }, | |||
{ "flags": 4, "matrix": [0, 2], "x": 42, "y": 0 }, | |||
{ "flags": 4, "matrix": [0, 1], "x": 28, "y": 4 }, | |||
{ "flags": 4, "matrix": [0, 0], "x": 14, "y": 9 }, | |||
{ "flags": 4, "matrix": [1, 0], "x": 14, "y": 25 }, | |||
{ "flags": 4, "matrix": [3, 0], "x": 0, "y": 21 }, | |||
{ "flags": 4, "matrix": [3, 1], "x": 0, "y": 37 }, | |||
{ "flags": 4, "matrix": [2, 0], "x": 14, "y": 42 }, | |||
{ "flags": 4, "matrix": [2, 1], "x": 28, "y": 37 }, | |||
{ "flags": 4, "matrix": [1, 1], "x": 28, "y": 21 }, | |||
{ "flags": 4, "matrix": [1, 2], "x": 42, "y": 16 }, | |||
{ "flags": 4, "matrix": [1, 3], "x": 57, "y": 21 }, | |||
{ "flags": 4, "matrix": [1, 4], "x": 71, "y": 22 }, | |||
{ "flags": 4, "matrix": [2, 4], "x": 71, "y": 39 }, | |||
{ "flags": 4, "matrix": [2, 3], "x": 57, "y": 37 }, | |||
{ "flags": 4, "matrix": [2, 2], "x": 42, "y": 33 }, | |||
{ "flags": 4, "matrix": [3, 2], "x": 55, "y": 57 }, | |||
{ "flags": 4, "matrix": [3, 3], "x": 71, "y": 59 }, | |||
{ "flags": 4, "matrix": [3, 4], "x": 87, "y": 64 }, | |||
{ "flags": 4, "matrix": [7, 4], "x": 137, "y": 64 }, | |||
{ "flags": 4, "matrix": [7, 3], "x": 153, "y": 59 }, | |||
{ "flags": 4, "matrix": [7, 2], "x": 168, "y": 57 }, | |||
{ "flags": 4, "matrix": [6, 2], "x": 181, "y": 33 }, | |||
{ "flags": 4, "matrix": [6, 3], "x": 167, "y": 37 }, | |||
{ "flags": 4, "matrix": [6, 4], "x": 153, "y": 39 }, | |||
{ "flags": 4, "matrix": [5, 4], "x": 153, "y": 22 }, | |||
{ "flags": 4, "matrix": [5, 3], "x": 167, "y": 21 }, | |||
{ "flags": 4, "matrix": [5, 2], "x": 181, "y": 16 }, | |||
{ "flags": 4, "matrix": [5, 1], "x": 196, "y": 21 }, | |||
{ "flags": 4, "matrix": [6, 1], "x": 196, "y": 37 }, | |||
{ "flags": 4, "matrix": [6, 0], "x": 210, "y": 42 }, | |||
{ "flags": 4, "matrix": [7, 1], "x": 224, "y": 37 }, | |||
{ "flags": 4, "matrix": [7, 0], "x": 224, "y": 21 }, | |||
{ "flags": 4, "matrix": [5, 0], "x": 210, "y": 25 }, | |||
{ "flags": 4, "matrix": [4, 0], "x": 210, "y": 9 }, | |||
{ "flags": 4, "matrix": [4, 1], "x": 196, "y": 4 }, | |||
{ "flags": 4, "matrix": [4, 2], "x": 182, "y": 0 }, | |||
{ "flags": 4, "matrix": [4, 3], "x": 167, "y": 4 }, | |||
{ "flags": 4, "matrix": [4, 4], "x": 153, "y": 6 } | |||
] | |||
} | |||
} |
@ -0,0 +1,6 @@ | |||
// Copyright 2022 zzeneg (@zzeneg) | |||
// SPDX-License-Identifier: GPL-2.0-or-later | |||
#pragma once | |||
#define SPLIT_TRANSACTION_IDS_USER RPC_ID_USER_HID_SYNC, RPC_ID_USER_CAPS_WORD_SYNC, RPC_ID_USER_LAYER_SYNC |
@ -0,0 +1,164 @@ | |||
// Copyright 2022 zzeneg (@zzeneg) | |||
// SPDX-License-Identifier: GPL-2.0-or-later | |||
#include QMK_KEYBOARD_H | |||
#include "../../../38keys/keymaps/hid/hid_display.h" | |||
#include "display.h" | |||
#include "raw_hid.h" | |||
#include "transactions.h" | |||
// Left-hand home row mods | |||
#define HOME_A LGUI_T(KC_A) | |||
#define HOME_S LALT_T(KC_S) | |||
#define HOME_D LCTL_T(KC_D) | |||
#define HOME_F LSFT_T(KC_F) | |||
// Right-hand home row mods | |||
#define HOME_J RSFT_T(KC_J) | |||
#define HOME_K RCTL_T(KC_K) | |||
#define HOME_L LALT_T(KC_L) | |||
#define HOME_SCLN RGUI_T(KC_SCLN) | |||
// bottom mods | |||
#define SYM_SPC LT(_SYMBOL, KC_SPC) | |||
#define NUM_TAB LT(_NUMBER, KC_TAB) | |||
#define FUNC_ESC LT(_FUNC, KC_ESC) | |||
#define FUNC_ENT LT(_FUNC, KC_ENT) | |||
#define NAV_BSPC LT(_NAV, KC_BSPC) | |||
#define RALT_DEL LALT_T(KC_DEL) | |||
// game layer mods | |||
#define LALT_EQL LALT_T(KC_EQL) | |||
#define LSFT_MINS LSFT_T(KC_MINS) | |||
#define LCTL_ESC LCTL_T(KC_ESC) | |||
#define LGUI_GRV LGUI_T(KC_GRV) | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
/* QWERTY | |||
* .----------------------------------. .----------------------------------. | |||
* | Q | W | E | R | T | | Y | U | I | O | P | | |||
* .------+------+------+------+------+------| |------+------+------+------+------+------. | |||
* | = | A | S | D | F | G | | H | J | K | L | ; | ' | | |||
* |------+------+------+------+------+------| |------+------+------+------+------+------| | |||
* | - | Z | X | C | V | B |--------. .--------| N | M | , | . | / | ` | | |||
* '-----------------------------------------/ / \ \-----------------------------------------' | |||
* | Esc | Tab | / Space / \ Enter \ | Bsps | Del | | |||
* |_FUNC | _NUM | /_SYMBOL/ \ _FUNC \ | _NAV | RAlt | | |||
* `-------------''-------' '-------''-------------' | |||
*/ | |||
// clang-format off | |||
[_QWERTY] = LAYOUT( | |||
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, | |||
KC_EQL, HOME_A, HOME_S, HOME_D, HOME_F, KC_G, KC_H, HOME_J, HOME_K, HOME_L, HOME_SCLN, KC_QUOT, | |||
KC_MINS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_GRV, | |||
FUNC_ESC, NUM_TAB, SYM_SPC, FUNC_ENT, NAV_BSPC, RALT_DEL | |||
), | |||
[_GAME] = LAYOUT( | |||
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, | |||
LALT_EQL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, | |||
LSFT_MINS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, LGUI_GRV, | |||
LCTL_ESC, NUM_TAB, SYM_SPC, FUNC_ENT, NAV_BSPC, RALT_DEL | |||
), | |||
[_NAV] = LAYOUT( | |||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, | |||
XXXXXXX, KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, | |||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, KC_INS, KC_APP, XXXXXXX, | |||
FUNC_ESC, NUM_TAB, SYM_SPC, XXXXXXX, _______, RALT_DEL | |||
), | |||
[_NUMBER] = LAYOUT( | |||
LSFT(KC_8), KC_7, KC_8, KC_9, KC_COMM, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | |||
LSFT(KC_EQL), KC_0, KC_4, KC_5, KC_6, KC_DOT, XXXXXXX, KC_RSFT, KC_RCTL, KC_LALT, KC_RGUI, XXXXXXX, | |||
LSFT(KC_MINS), KC_BSLS, KC_1, KC_2, KC_3, KC_SLSH, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | |||
KC_ENT, _______, TG(_GAME), FUNC_ENT, NAV_BSPC, RALT_DEL | |||
), | |||
[_SYMBOL] = LAYOUT( | |||
KC_GRV, LSFT(KC_7), LSFT(KC_8), LSFT(KC_9), LSFT(KC_GRV), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | |||
KC_LBRC, LSFT(KC_0), LSFT(KC_4), LSFT(KC_5), LSFT(KC_6), KC_RBRC, XXXXXXX, KC_RSFT, KC_RCTL, KC_LALT, KC_RGUI, XXXXXXX, | |||
LSFT(KC_LBRC), LSFT(KC_BSLS), LSFT(KC_1), LSFT(KC_2), LSFT(KC_3), LSFT(KC_RBRC), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | |||
MO(_SYS), KC_BSPC, _______, FUNC_ENT, NAV_BSPC, RALT_DEL | |||
), | |||
[_FUNC] = LAYOUT( | |||
KC_F12, KC_F7, KC_F8, KC_F9, KC_PSCR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | |||
KC_CAPS, KC_F11, KC_F4, KC_F5, KC_F6, KC_SCRL, XXXXXXX, KC_RSFT, KC_RCTL, KC_LALT, KC_RGUI, XXXXXXX, | |||
KC_NUM, KC_F10, KC_F1, KC_F2, KC_F3, KC_PAUS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | |||
_______, KC_MNXT, KC_MPLY, _______, XXXXXXX, MO(_SYS) | |||
), | |||
[_SYS] = LAYOUT( | |||
XXXXXXX, BL_DOWN, BL_UP, BL_TOGG, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, RGB_RMOD, XXXXXXX, | |||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, RGB_M_P, | |||
EH_LEFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, EH_RGHT, EH_RGHT, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, EH_LEFT, | |||
_______, QK_BOOT, _______, _______, QK_BOOT, _______ | |||
) | |||
// clang-format on | |||
}; | |||
/* Caps Word processing */ | |||
#ifdef CAPS_WORD_ENABLE | |||
void caps_word_set_user(bool active) { | |||
if (is_display_enabled()) { | |||
display_process_caps(active); | |||
} else if (is_keyboard_master() && !is_display_side()) { | |||
dprintf("RPC_ID_USER_CAPS_WORD_SYNC: %s\n", active ? "active" : "inactive"); | |||
transaction_rpc_send(RPC_ID_USER_CAPS_WORD_SYNC, 1, &active); | |||
} | |||
} | |||
#endif | |||
/* Active Layer processing */ | |||
layer_state_t layer_state_set_user(layer_state_t state) { | |||
if (is_display_enabled()) { | |||
display_process_layer_state(get_highest_layer(state)); | |||
} else if (is_keyboard_master() && !is_display_side()) { | |||
uint8_t layer = get_highest_layer(state); | |||
dprintf("RPC_ID_USER_LAYER_SYNC: %u\n", layer); | |||
transaction_rpc_send(RPC_ID_USER_LAYER_SYNC, 1, &layer); | |||
} | |||
return state; | |||
} | |||
/* Raw HID processing*/ | |||
void raw_hid_receive(uint8_t *data, uint8_t length) { | |||
dprintf("raw_hid_receive - received %u bytes \n", length); | |||
if (is_display_enabled()) { | |||
display_process_raw_hid_data(data, length); | |||
} else if (is_keyboard_master() && !is_display_side()) { | |||
dprint("RPC_ID_USER_HID_SYNC \n"); | |||
transaction_rpc_send(RPC_ID_USER_HID_SYNC, length, data); | |||
} | |||
} | |||
void hid_sync(uint8_t initiator2target_buffer_size, const void *initiator2target_buffer, uint8_t target2initiator_buffer_size, void *target2initiator_buffer) { | |||
if (is_display_enabled()) { | |||
display_process_raw_hid_data((uint8_t *)initiator2target_buffer, initiator2target_buffer_size); | |||
} | |||
} | |||
void layer_sync(uint8_t initiator2target_buffer_size, const void *initiator2target_buffer, uint8_t target2initiator_buffer_size, void *target2initiator_buffer) { | |||
if (is_display_enabled()) { | |||
display_process_layer_state(*(uint8_t *)initiator2target_buffer); | |||
} | |||
} | |||
void caps_word_sync(uint8_t initiator2target_buffer_size, const void *initiator2target_buffer, uint8_t target2initiator_buffer_size, void *target2initiator_buffer) { | |||
if (is_display_enabled()) { | |||
display_process_caps(*(bool *)initiator2target_buffer); | |||
} | |||
} | |||
void keyboard_post_init_user() { | |||
// sync received hid data | |||
transaction_register_rpc(RPC_ID_USER_HID_SYNC, hid_sync); | |||
// sync highest layer (a bit more performant than standard SPLIT_LAYER_STATE_ENABLE) | |||
transaction_register_rpc(RPC_ID_USER_LAYER_SYNC, layer_sync); | |||
// sync caps word state | |||
transaction_register_rpc(RPC_ID_USER_CAPS_WORD_SYNC, caps_word_sync); | |||
} |
@ -0,0 +1,5 @@ | |||
CAPS_WORD_ENABLE = yes | |||
RAW_ENABLE = yes | |||
SRC += ./../../../38keys/keymaps/hid/hid_display.c |
@ -0,0 +1,95 @@ | |||
{ | |||
"keyboard_name": "stront", | |||
"manufacturer": "zzeneg", | |||
"url": "https://github.com/zzeneg/stront", | |||
"maintainer": "zzeneg", | |||
"processor": "RP2040", | |||
"bootloader": "rp2040", | |||
"diode_direction": "COL2ROW", | |||
"split": { | |||
"enabled": true, | |||
"transport": { | |||
"sync": { | |||
"indicators": true, | |||
"matrix_state": true, | |||
"modifiers": true | |||
} | |||
} | |||
}, | |||
"encoder": { | |||
"rotary": [ | |||
{ | |||
"pin_a": "GP7", | |||
"pin_b": "GP8", | |||
"resolution": 4 | |||
} | |||
] | |||
}, | |||
"features": { | |||
"bootmagic": true, | |||
"console": false, | |||
"encoder": true, | |||
"backlight": true, | |||
"extrakey": true, | |||
"rgb_matrix": true, | |||
"nkro": false | |||
}, | |||
"ws2812": { | |||
"driver": "vendor", | |||
"pin": "GP29" | |||
}, | |||
"rgb_matrix": { | |||
"animations": { | |||
"alphas_mods": true, | |||
"gradient_up_down": true, | |||
"gradient_left_right": true, | |||
"breathing": true, | |||
"band_sat": true, | |||
"band_val": true, | |||
"band_pinwheel_sat": true, | |||
"band_pinwheel_val": true, | |||
"band_spiral_sat": true, | |||
"band_spiral_val": true, | |||
"cycle_all": true, | |||
"cycle_left_right": true, | |||
"cycle_up_down": true, | |||
"cycle_out_in": true, | |||
"cycle_out_in_dual": true, | |||
"rainbow_moving_chevron": true, | |||
"cycle_pinwheel": true, | |||
"cycle_spiral": true, | |||
"dual_beacon": true, | |||
"rainbow_beacon": true, | |||
"rainbow_pinwheels": true, | |||
"raindrops": true, | |||
"jellybean_raindrops": true, | |||
"hue_breathing": true, | |||
"hue_pendulum": true, | |||
"hue_wave": true, | |||
"pixel_fractal": true, | |||
"pixel_flow": true, | |||
"pixel_rain": true, | |||
"typing_heatmap": true, | |||
"digital_rain": true, | |||
"solid_reactive_simple": true, | |||
"solid_reactive": true, | |||
"solid_reactive_wide": true, | |||
"solid_reactive_multiwide": true, | |||
"solid_reactive_cross": true, | |||
"solid_reactive_multicross": true, | |||
"solid_reactive_nexus": true, | |||
"solid_reactive_multinexus": true, | |||
"splash": true, | |||
"multisplash": true, | |||
"solid_splash": true, | |||
"solid_multisplash": true | |||
}, | |||
"driver": "ws2812", | |||
"sleep": true | |||
}, | |||
"usb": { | |||
"device_version": "1.0.0", | |||
"pid": "0x0844", | |||
"vid": "0xFEED" | |||
} | |||
} |
@ -1,200 +0,0 @@ | |||
{ | |||
"keyboard_name": "stront", | |||
"manufacturer": "zzeneg", | |||
"url": "https://github.com/zzeneg/stront", | |||
"maintainer": "zzeneg", | |||
"layouts": { | |||
"LAYOUT": { | |||
"layout": [ | |||
{ "matrix": [0, 1], "x": 2, "y": 0 }, | |||
{ "matrix": [0, 2], "x": 3, "y": 0 }, | |||
{ "matrix": [0, 3], "x": 4, "y": 0 }, | |||
{ "matrix": [0, 4], "x": 5, "y": 0 }, | |||
{ "matrix": [4, 4], "x": 8, "y": 0 }, | |||
{ "matrix": [4, 3], "x": 9, "y": 0 }, | |||
{ "matrix": [4, 2], "x": 10, "y": 0 }, | |||
{ "matrix": [4, 1], "x": 11, "y": 0 }, | |||
{ "matrix": [0, 0], "x": 0, "y": 1 }, | |||
{ "matrix": [1, 0], "x": 1, "y": 1 }, | |||
{ "matrix": [1, 1], "x": 2, "y": 1 }, | |||
{ "matrix": [1, 2], "x": 3, "y": 1 }, | |||
{ "matrix": [1, 3], "x": 4, "y": 1 }, | |||
{ "matrix": [1, 4], "x": 5, "y": 1 }, | |||
{ "matrix": [5, 4], "x": 8, "y": 1 }, | |||
{ "matrix": [5, 3], "x": 9, "y": 1 }, | |||
{ "matrix": [5, 2], "x": 10, "y": 1 }, | |||
{ "matrix": [5, 1], "x": 11, "y": 1 }, | |||
{ "matrix": [5, 0], "x": 12, "y": 1 }, | |||
{ "matrix": [4, 0], "x": 13, "y": 1 }, | |||
{ "matrix": [3, 0], "x": 0, "y": 2 }, | |||
{ "matrix": [2, 0], "x": 1, "y": 2 }, | |||
{ "matrix": [2, 1], "x": 2, "y": 2 }, | |||
{ "matrix": [2, 2], "x": 3, "y": 2 }, | |||
{ "matrix": [2, 3], "x": 4, "y": 2 }, | |||
{ "matrix": [2, 4], "x": 5, "y": 2 }, | |||
{ "matrix": [6, 4], "x": 8, "y": 2 }, | |||
{ "matrix": [6, 3], "x": 9, "y": 2 }, | |||
{ "matrix": [6, 2], "x": 10, "y": 2 }, | |||
{ "matrix": [6, 1], "x": 11, "y": 2 }, | |||
{ "matrix": [6, 0], "x": 12, "y": 2 }, | |||
{ "matrix": [7, 0], "x": 13, "y": 2 }, | |||
{ "matrix": [3, 2], "x": 4, "y": 3 }, | |||
{ "matrix": [3, 3], "x": 5, "y": 3 }, | |||
{ "matrix": [3, 4], "x": 6, "y": 3 }, | |||
{ "matrix": [7, 4], "x": 7, "y": 3 }, | |||
{ "matrix": [7, 3], "x": 8, "y": 3 }, | |||
{ "matrix": [7, 2], "x": 9, "y": 3 } | |||
] | |||
} | |||
}, | |||
"processor": "RP2040", | |||
"bootloader": "rp2040", | |||
"diode_direction": "COL2ROW", | |||
"matrix_pins": { | |||
"cols": ["GP2", "GP3", "GP4", "GP5", "GP6"], | |||
"rows": ["GP28", "GP27", "GP26", "GP15"] | |||
}, | |||
"split": { | |||
"enabled": true, | |||
"transport": { | |||
"sync": { | |||
"indicators": true, | |||
"matrix_state": true, | |||
"modifiers": true | |||
} | |||
} | |||
}, | |||
"encoder": { | |||
"rotary": [ | |||
{ | |||
"pin_a": "GP7", | |||
"pin_b": "GP8", | |||
"resolution": 4 | |||
} | |||
] | |||
}, | |||
"features": { | |||
"bootmagic": true, | |||
"console": false, | |||
"encoder": true, | |||
"backlight": true, | |||
"extrakey": true, | |||
"rgb_matrix": true, | |||
"nkro": false | |||
}, | |||
"backlight": { | |||
"pin": "GP14" | |||
}, | |||
"ws2812": { | |||
"driver": "vendor", | |||
"pin": "GP29" | |||
}, | |||
"rgblight": { | |||
"led_count": 38, | |||
"split": true, | |||
"split_count": [19, 19] | |||
}, | |||
"rgb_matrix": { | |||
"animations": { | |||
"alphas_mods": true, | |||
"gradient_up_down": true, | |||
"gradient_left_right": true, | |||
"breathing": true, | |||
"band_sat": true, | |||
"band_val": true, | |||
"band_pinwheel_sat": true, | |||
"band_pinwheel_val": true, | |||
"band_spiral_sat": true, | |||
"band_spiral_val": true, | |||
"cycle_all": true, | |||
"cycle_left_right": true, | |||
"cycle_up_down": true, | |||
"cycle_out_in": true, | |||
"cycle_out_in_dual": true, | |||
"rainbow_moving_chevron": true, | |||
"cycle_pinwheel": true, | |||
"cycle_spiral": true, | |||
"dual_beacon": true, | |||
"rainbow_beacon": true, | |||
"rainbow_pinwheels": true, | |||
"raindrops": true, | |||
"jellybean_raindrops": true, | |||
"hue_breathing": true, | |||
"hue_pendulum": true, | |||
"hue_wave": true, | |||
"pixel_fractal": true, | |||
"pixel_flow": true, | |||
"pixel_rain": true, | |||
"typing_heatmap": true, | |||
"digital_rain": true, | |||
"solid_reactive_simple": true, | |||
"solid_reactive": true, | |||
"solid_reactive_wide": true, | |||
"solid_reactive_multiwide": true, | |||
"solid_reactive_cross": true, | |||
"solid_reactive_multicross": true, | |||
"solid_reactive_nexus": true, | |||
"solid_reactive_multinexus": true, | |||
"splash": true, | |||
"multisplash": true, | |||
"solid_splash": true, | |||
"solid_multisplash": true | |||
}, | |||
"driver": "ws2812", | |||
"led_count": 38, | |||
"split_count": [19, 19], | |||
"layout": [ | |||
{ "flags": 4, "matrix": [0, 4], "x": 71, "y": 7 }, | |||
{ "flags": 4, "matrix": [0, 3], "x": 57, "y": 5 }, | |||
{ "flags": 4, "matrix": [0, 2], "x": 44, "y": 0 }, | |||
{ "flags": 4, "matrix": [0, 1], "x": 27, "y": 5 }, | |||
{ "flags": 4, "matrix": [1, 1], "x": 29, "y": 22 }, | |||
{ "flags": 4, "matrix": [1, 0], "x": 14, "y": 26 }, | |||
{ "flags": 4, "matrix": [0, 0], "x": 0, "y": 26 }, | |||
{ "flags": 4, "matrix": [3, 0], "x": 2, "y": 43 }, | |||
{ "flags": 4, "matrix": [2, 0], "x": 16, "y": 43 }, | |||
{ "flags": 4, "matrix": [2, 1], "x": 30, "y": 38 }, | |||
{ "flags": 4, "matrix": [2, 2], "x": 44, "y": 33 }, | |||
{ "flags": 4, "matrix": [1, 2], "x": 44, "y": 17 }, | |||
{ "flags": 4, "matrix": [1, 3], "x": 57, "y": 22 }, | |||
{ "flags": 4, "matrix": [1, 4], "x": 71, "y": 24 }, | |||
{ "flags": 4, "matrix": [2, 4], "x": 71, "y": 40 }, | |||
{ "flags": 4, "matrix": [2, 3], "x": 57, "y": 38 }, | |||
{ "flags": 4, "matrix": [3, 2], "x": 56, "y": 57 }, | |||
{ "flags": 4, "matrix": [3, 3], "x": 71, "y": 59 }, | |||
{ "flags": 4, "matrix": [3, 4], "x": 85, "y": 64 }, | |||
{ "flags": 4, "matrix": [7, 4], "x": 139, "y": 64 }, | |||
{ "flags": 4, "matrix": [7, 3], "x": 153, "y": 59 }, | |||
{ "flags": 4, "matrix": [7, 2], "x": 168, "y": 57 }, | |||
{ "flags": 4, "matrix": [6, 3], "x": 167, "y": 38 }, | |||
{ "flags": 4, "matrix": [6, 4], "x": 153, "y": 40 }, | |||
{ "flags": 4, "matrix": [5, 4], "x": 153, "y": 24 }, | |||
{ "flags": 4, "matrix": [5, 3], "x": 167, "y": 22 }, | |||
{ "flags": 4, "matrix": [5, 2], "x": 180, "y": 17 }, | |||
{ "flags": 4, "matrix": [6, 2], "x": 180, "y": 33 }, | |||
{ "flags": 4, "matrix": [6, 1], "x": 194, "y": 38 }, | |||
{ "flags": 4, "matrix": [6, 0], "x": 208, "y": 43 }, | |||
{ "flags": 4, "matrix": [7, 0], "x": 222, "y": 43 }, | |||
{ "flags": 4, "matrix": [4, 0], "x": 224, "y": 26 }, | |||
{ "flags": 4, "matrix": [5, 0], "x": 210, "y": 26 }, | |||
{ "flags": 4, "matrix": [5, 1], "x": 195, "y": 22 }, | |||
{ "flags": 4, "matrix": [4, 1], "x": 197, "y": 5 }, | |||
{ "flags": 4, "matrix": [4, 2], "x": 180, "y": 0 }, | |||
{ "flags": 4, "matrix": [4, 3], "x": 167, "y": 5 }, | |||
{ "flags": 4, "matrix": [4, 4], "x": 153, "y": 7 } | |||
], | |||
"sleep": true | |||
}, | |||
"usb": { | |||
"device_version": "1.0.0", | |||
"pid": "0x0844", | |||
"vid": "0xFEED" | |||
} | |||
} |
@ -1,15 +0,0 @@ | |||
// Copyright 2023 zzeneg (@zzeneg) | |||
// SPDX-License-Identifier: GPL-2.0-or-later | |||
#pragma once | |||
#include_next <lv_conf.h> | |||
#undef LV_FONT_DEFAULT | |||
#define LV_FONT_DEFAULT &lv_font_montserrat_20 | |||
#undef LV_FONT_MONTSERRAT_20 | |||
#define LV_FONT_MONTSERRAT_20 1 | |||
#undef LV_FONT_MONTSERRAT_28 | |||
#define LV_FONT_MONTSERRAT_28 0 |
@ -1 +0,0 @@ | |||
POINTING_DEVICE_DRIVER = cirque_pinnacle_i2c |
@ -1,45 +1,53 @@ | |||
# stront | |||
![stront](https://i.imgur.com/FOPnWhch.jpg) | |||
![stront](https://i.imgur.com/Tu0XLeeh.jpg) | |||
Split keyboard with 38 keys, LCD display and Cirque trackpad. | |||
Split modular keyboard with 38 or 40 keys, LCD display and Cirque/Azoteq touchpads. | |||
- Keyboard Maintainer: [zzeneg](https://github.com/zzeneg) | |||
- Hardware Supported: Stront PCBs, Waveshare RP2040 Zero | |||
- Hardware Availability: [GitHub](https://github.com/zzeneg/stront) | |||
Make example for this keyboard (after setting up your build environment): | |||
Make examples for this keyboard (after setting up your build environment): | |||
make stront:default | |||
make stront/38keys:default | |||
make stront/40keys:default | |||
Flashing example for this keyboard: | |||
Flashing examples for this keyboard: | |||
make stront:default:flash | |||
make stront/38keys:default:flash | |||
make stront/40keys:default:flash | |||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). | |||
## Hardware versions | |||
There are two versions - `stront/38keys` (default) and `stront/40keys`. Make sure to use the correct version for your hardware. | |||
## Module configuration | |||
**stront** is a modular keyboard with a lot of supported modules out of the box and potentially any VIK module. It's not possible to pre-compile a firmware for any possible hardware permutation, so it's the responsibility of the end user to configure it properly. Please see main `config.h` and `rules.mk` for available options and comments. You can easily set up your own pointing device and display. | |||
## Keymaps | |||
- `default` - sample keymap with home row mods. Not recommended for longer use - create your own. | |||
- `hid` - default keymap with HID support. Requires additional software running on computer, see https://github.com/zzeneg/qmk-hid-host. | |||
- `i2c` - default keymap with I2C Cirque instead of default SPI | |||
- `zzeneg` - my highly customized layout, you can use as a reference | |||
Keymaps have [EE_HANDS](https://docs.qmk.fm/#/feature_split_keyboard?id=handedness-by-eeprom) enabled, so any side can be master (though using side with touchpad as master is recommended). You have to specify left/right side by flashing with different commands: | |||
`qmk flash -kb stront -km default -bl uf2-split-left` | |||
`qmk flash -kb stront/38keys -km default -bl uf2-split-left` or `qmk flash -kb stront/40keys -km default -bl uf2-split-left` | |||
or | |||
and | |||
`qmk flash -kb stront -km default -bl uf2-split-right` | |||
`qmk flash -kb stront/38keys -km default -bl uf2-split-right` or `qmk flash -kb stront/40keys -km default -bl uf2-split-right` | |||
If your keyboard is flashed already, you can do it by pressing key combinations - hold inner thumb key, then hold outer thumb key to activate SYSTEM layer. Now press outer bottom pinky key for left side or inner bottom index key for right side. See [keymap](./keymaps/default/keymap.c) for better understanding. Reconnect the keyboard to apply changes. | |||
If your keyboard is flashed already (or you use WSL), you can specify the correct side by pressing key combinations - hold inner thumb key, then hold outer thumb key to activate SYSTEM layer. Now press outer bottom pinky key for left side or inner bottom index key for right side. See [keymap](./keymaps/default/keymap.c) or build guide for better understanding. Reconnect the keyboard to apply changes. | |||
## Bootloader | |||
Enter the bootloader in 2 ways: | |||
- **Bootmagic reset**: Hold down the key at (0,0) in the matrix (outer top pinky key) and plug in the keyboard | |||
- **Bootmagic reset**: Hold down top outer pinky key and plug in the keyboard | |||
- **Keycode in layout**: Press the key mapped to `QK_BOOT` - by default you need to hold inner thumb key, then hold outer thumb key and press middle thumb key (see [keymap.c](./keymaps/default/keymap.c) for details). It's a complicated combination to avoid accidental activations. | |||
RP2040 Zero has physical boot/reset buttons but they are unaccessible after the keyboards is assembled, so always keep a `QK_BOOT` key and/or bootmagic feature in your keymaps. | |||
RP2040 Zero has physical boot/reset buttons but they are not accessible after the keyboards is assembled, so always keep a `QK_BOOT` key and/or bootmagic feature in your keymaps. |
@ -1,11 +1,19 @@ | |||
SERIAL_DRIVER = vendor | |||
POINTING_DEVICE_ENABLE = yes | |||
# choose pointing device driver: | |||
POINTING_DEVICE_DRIVER = cirque_pinnacle_spi | |||
# POINTING_DEVICE_DRIVER = cirque_pinnacle_i2c | |||
# POINTING_DEVICE_DRIVER = azoteq_iqs5xx | |||
QUANTUM_PAINTER_ENABLE = yes | |||
QUANTUM_PAINTER_DRIVERS += st7789_spi | |||
QUANTUM_PAINTER_LVGL_INTEGRATION = yes | |||
# choose one display driver: | |||
QUANTUM_PAINTER_DRIVERS = st7789_spi # rectangular display | |||
# QUANTUM_PAINTER_DRIVERS = gc9a01_spi # round display | |||
SRC += lvgl_helpers.c \ | |||
display.c | |||
DEFAULT_FOLDER = stront/38keys |