Evgenii Vilkov 1 week ago
committed by GitHub
parent
commit
460495a5ab
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
29 changed files with 758 additions and 372 deletions
  1. +3
    -3
      keyboards/stront/38keys/config.h
  2. +113
    -0
      keyboards/stront/38keys/keyboard.json
  3. +1
    -1
      keyboards/stront/38keys/keymaps/default/keymap.c
  4. +0
    -1
      keyboards/stront/38keys/keymaps/hid/config.h
  5. +24
    -31
      keyboards/stront/38keys/keymaps/hid/hid_display.c
  6. +1
    -5
      keyboards/stront/38keys/keymaps/hid/hid_display.h
  7. +7
    -30
      keyboards/stront/38keys/keymaps/hid/keymap.c
  8. +0
    -0
      keyboards/stront/38keys/keymaps/hid/rules.mk
  9. +2
    -2
      keyboards/stront/38keys/mcuconf.h
  10. +8
    -0
      keyboards/stront/40keys/config.h
  11. +120
    -0
      keyboards/stront/40keys/keyboard.json
  12. +26
    -26
      keyboards/stront/40keys/keymaps/default/keymap.c
  13. +6
    -0
      keyboards/stront/40keys/keymaps/hid/config.h
  14. +164
    -0
      keyboards/stront/40keys/keymaps/hid/keymap.c
  15. +5
    -0
      keyboards/stront/40keys/keymaps/hid/rules.mk
  16. +3
    -2
      keyboards/stront/40keys/mcuconf.h
  17. +30
    -10
      keyboards/stront/config.h
  18. +15
    -17
      keyboards/stront/display.c
  19. +1
    -0
      keyboards/stront/halconf.h
  20. +95
    -0
      keyboards/stront/info.json
  21. +0
    -200
      keyboards/stront/keyboard.json
  22. +0
    -15
      keyboards/stront/keymaps/hid/lv_conf.h
  23. +0
    -1
      keyboards/stront/keymaps/i2c/rules.mk
  24. +83
    -5
      keyboards/stront/lv_conf.h
  25. +3
    -3
      keyboards/stront/mcuconf.h
  26. +22
    -14
      keyboards/stront/readme.md
  27. +9
    -1
      keyboards/stront/rules.mk
  28. +16
    -5
      keyboards/stront/stront.c
  29. +1
    -0
      keyboards/stront/stront.h

keyboards/stront/keymaps/i2c/config.h → keyboards/stront/38keys/config.h View File

@ -3,6 +3,6 @@
#pragma once
#define I2C_DRIVER I2CD1
#define I2C1_SDA_PIN GP10
#define I2C1_SCL_PIN GP11
#define LCD_DC_PIN GP12
#define LCD_RST_PIN GP13
#define BACKLIGHT_PWM_DRIVER PWMD7

+ 113
- 0
keyboards/stront/38keys/keyboard.json View File

@ -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 }
]
}
}

keyboards/stront/keymaps/i2c/keymap.c → keyboards/stront/38keys/keymaps/default/keymap.c View File

@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* .---------------------------. .---------------------------.
* | W | E | R | T | | Y | U | I | O |
* .------+------+------+------+------+------| |------+------+------+------+------+------.
* | Q | A | S | D | F | G | | H | J | K | L | P | ; |
* | Q | A | S | D | F | G | | H | J | K | L | ; | P |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | - | Z | X | C | V | B |--------. .--------| N | M | , | . | / | ' |
* '-----------------------------------------/ / \ \-----------------------------------------'

keyboards/stront/keymaps/hid/config.h → keyboards/stront/38keys/keymaps/hid/config.h View File

@ -4,4 +4,3 @@
#pragma once
#define SPLIT_TRANSACTION_IDS_USER RPC_ID_USER_HID_SYNC, RPC_ID_USER_CAPS_WORD_SYNC, RPC_ID_USER_LAYER_SYNC
#define QUANTUM_PAINTER_DISPLAY_TIMEOUT 0

keyboards/stront/keymaps/hid/hid_display.c → keyboards/stront/38keys/keymaps/hid/hid_display.c View File

@ -3,10 +3,10 @@
#include "hid_display.h"
#include "display.h"
#include "raw_hid.h"
#include "lvgl_helpers.h"
uint16_t home_screen_timer = 0;
uint16_t volume_timer = 0;
/* screens */
static lv_obj_t *screen_home;
@ -22,9 +22,6 @@ static lv_obj_t *label_alt;
static lv_obj_t *label_gui;
static lv_obj_t *label_layer;
static lv_obj_t *label_caps;
#ifdef CAPS_WORD_ENABLE
static lv_obj_t *label_caps_word;
#endif
static lv_obj_t *label_layout;
/* volume screen content */
@ -65,7 +62,11 @@ void init_screen_home_custom(void) {
use_flex_column(screen_home);
label_volume_home = lv_label_create(screen_home);
lv_label_set_text(label_volume_home, "");
lv_label_set_text(label_volume_home, "Vol: N/A");
label_time = lv_label_create(screen_home);
lv_label_set_text(label_time, "hh:mm");
lv_obj_set_style_text_font(label_time, &lv_font_montserrat_48, LV_PART_MAIN);
lv_obj_t *mods = lv_obj_create(screen_home);
lv_obj_add_style(mods, &style_container, 0);
@ -76,19 +77,6 @@ void init_screen_home_custom(void) {
label_ctrl = create_button(mods, "CTL", &style_button, &style_button_active);
label_shift = create_button(mods, "SFT", &style_button, &style_button_active);
label_time = lv_label_create(screen_home);
lv_label_set_text(label_time, "00:00");
lv_obj_set_style_text_font(label_time, &lv_font_montserrat_48, LV_PART_MAIN);
lv_obj_t *caps = lv_obj_create(screen_home);
lv_obj_add_style(caps, &style_container, 0);
use_flex_row(caps);
label_caps = create_button(caps, "CAPS", &style_button, &style_button_active);
#ifdef CAPS_WORD_ENABLE
label_caps_word = create_button(caps, "CAPS WORD", &style_button, &style_button_active);
#endif
lv_obj_t *bottom_row = lv_obj_create(screen_home);
lv_obj_add_style(bottom_row, &style_container, 0);
@ -101,6 +89,8 @@ void init_screen_home_custom(void) {
lv_label_set_text(label_layout, "");
lv_obj_align(label_layout, LV_ALIGN_RIGHT_MID, -10, 0);
set_layout_label(0);
label_caps = create_button(screen_home, "CAPS", &style_button, &style_button_active);
}
void init_screen_volume(void) {
@ -160,10 +150,16 @@ void display_process_raw_hid_data(uint8_t *data, uint8_t length) {
case _VOLUME:
dprintf("volume %d\n", data[1]);
lv_label_set_text_fmt(label_volume_home, "Volume: %02d%%", data[1]);
lv_label_set_text_fmt(label_volume_arc, "%02d", data[1]);
lv_arc_set_value(arc_volume, data[1]);
lv_scr_load(screen_volume);
if (lv_scr_act() != screen_volume) {
lv_scr_load(screen_volume);
}
lv_label_set_text_fmt(label_volume_home, "Vol: %d%%", data[1]);
lv_label_set_text_fmt(label_volume_arc, "%d", data[1]);
if (timer_elapsed(volume_timer) > 100) {
// arc rendering is slow, add delay to overcome issues with fast changing volume
volume_timer = timer_read();
lv_arc_set_value(arc_volume, data[1]);
}
start_home_screen_timer();
break;
@ -176,7 +172,9 @@ void display_process_raw_hid_data(uint8_t *data, uint8_t length) {
read_string(data, string_data);
dprintf("media artist %s\n", string_data);
lv_label_set_text(label_media_artist, string_data);
lv_scr_load(screen_media);
if (lv_scr_act() != screen_media) {
lv_scr_load(screen_media);
}
start_home_screen_timer();
break;
@ -184,7 +182,9 @@ void display_process_raw_hid_data(uint8_t *data, uint8_t length) {
read_string(data, string_data);
dprintf("media title %s\n", string_data);
lv_label_set_text(label_media_title, string_data);
lv_scr_load(screen_media);
if (lv_scr_act() != screen_media) {
lv_scr_load(screen_media);
}
start_home_screen_timer();
break;
}
@ -231,10 +231,3 @@ void display_housekeeping_task(void) {
void display_process_caps(bool active) {
toggle_state(label_caps, LV_STATE_PRESSED, active);
}
#ifdef CAPS_WORD_ENABLE
void display_process_caps_word(bool active) {
dprint("display_process_caps_word\n");
toggle_state(label_caps_word, LV_STATE_PRESSED, active);
}
#endif

keyboards/stront/keymaps/hid/hid_display.h → keyboards/stront/38keys/keymaps/hid/hid_display.h View File

@ -7,7 +7,6 @@
typedef enum {
_QWERTY = 0,
_GAME,
_EU,
_NAV,
_NUMBER,
_SYMBOL,
@ -16,7 +15,7 @@ typedef enum {
} layer_number;
typedef enum {
_TIME = 0,
_TIME = 0xAA, // random value that does not conflict with VIA, must match companion app
_VOLUME,
_LAYOUT,
_MEDIA_ARTIST,
@ -25,6 +24,3 @@ typedef enum {
void display_process_raw_hid_data(uint8_t *data, uint8_t length);
void display_process_layer_state(uint8_t layer);
#ifdef CAPS_WORD_ENABLE
void display_process_caps_word(bool active);
#endif

keyboards/stront/keymaps/hid/keymap.c → keyboards/stront/38keys/keymaps/hid/keymap.c View File

@ -4,6 +4,7 @@
#include QMK_KEYBOARD_H
#include "hid_display.h"
#include "display.h"
#include "raw_hid.h"
#include "transactions.h"
@ -38,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* .---------------------------. .---------------------------.
* | W | E | R | T | | Y | U | I | O |
* .------+------+------+------+------+------| |------+------+------+------+------+------.
* | Q | A | S | D | F | G | | H | J | K | L | P | ; |
* | Q | A | S | D | F | G | | H | J | K | L | ; | P |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | - | Z | X | C | V | B |--------. .--------| N | M | , | . | / | ' |
* '-----------------------------------------/ / \ \-----------------------------------------'
@ -98,36 +99,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// clang-format on
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
dprintf("process_record_user %u %s %s %d\n", keycode, record->event.pressed ? "pressed" : "depressed", record->tap.interrupted ? "interrupted" : "not interrupted", record->tap.count);
if (record->event.pressed) {
uint8_t data[32];
data[0] = 0;
switch (keycode) {
// send hid commands
case KC_VOLU:
case KC_VOLD:
data[0] = _VOLUME;
break;
}
if (data[0]) {
dprintf("raw_hid_send %u\n", data[0]);
raw_hid_send(data, sizeof(data));
}
}
return true;
}
/* Caps Word processing */
#ifdef CAPS_WORD_ENABLE
void caps_word_set_user(bool active) {
if (is_display_enabled()) {
display_process_caps_word(active);
} else if (is_keyboard_master() && !is_keyboard_left()) {
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);
}
@ -138,7 +115,7 @@ void caps_word_set_user(bool active) {
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_keyboard_left()) {
} 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);
@ -153,7 +130,7 @@ void raw_hid_receive(uint8_t *data, uint8_t length) {
if (is_display_enabled()) {
display_process_raw_hid_data(data, length);
} else if (is_keyboard_master() && !is_keyboard_left()) {
} 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);
}
@ -173,7 +150,7 @@ void layer_sync(uint8_t initiator2target_buffer_size, const void *initiator2targ
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_word(*(bool *)initiator2target_buffer);
display_process_caps(*(bool *)initiator2target_buffer);
}
}

keyboards/stront/keymaps/hid/rules.mk → keyboards/stront/38keys/keymaps/hid/rules.mk View File


keyboards/stront/keymaps/i2c/mcuconf.h → keyboards/stront/38keys/mcuconf.h View File

@ -5,5 +5,5 @@
#include_next <mcuconf.h>
#undef RP_I2C_USE_I2C1
#define RP_I2C_USE_I2C1 TRUE
#undef RP_PWM_USE_PWM7
#define RP_PWM_USE_PWM7 TRUE

+ 8
- 0
keyboards/stront/40keys/config.h View File

@ -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

+ 120
- 0
keyboards/stront/40keys/keyboard.json View File

@ -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 }
]
}
}

keyboards/stront/keymaps/default/keymap.c → keyboards/stront/40keys/keymaps/default/keymap.c View File

@ -36,19 +36,19 @@ enum layer_number {
#define RALT_DEL LALT_T(KC_DEL)
// game layer mods
#define LALT_Q LALT_T(KC_Q)
#define LALT_EQL LALT_T(KC_EQL)
#define LSFT_MINS LSFT_T(KC_MINS)
#define LCTL_ESC LCTL_T(KC_ESC)
#define LGUI_QUOT LGUI_T(KC_QUOT)
#define LGUI_GRV LGUI_T(KC_GRV)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* QWERTY
* .---------------------------. .---------------------------.
* | W | E | R | T | | Y | U | I | O |
* .----------------------------------. .----------------------------------.
* | Q | W | E | R | T | | Y | U | I | O | P |
* .------+------+------+------+------+------| |------+------+------+------+------+------.
* | Q | A | S | D | F | G | | H | J | K | L | P | ; |
* | = | A | S | D | F | G | | H | J | K | L | ; | ' |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | - | Z | X | C | V | B |--------. .--------| N | M | , | . | / | ' |
* | - | Z | X | C | V | B |--------. .--------| N | M | , | . | / | ` |
* '-----------------------------------------/ / \ \-----------------------------------------'
* | Esc | Tab | / Space / \ Enter \ | Bsps | Del |
* |_FUNC | _NUM | /_SYMBOL/ \ _FUNC \ | _NAV | RAlt |
@ -56,49 +56,49 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
// clang-format off
[_QWERTY] = LAYOUT(
KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O,
KC_Q, HOME_A, HOME_S, HOME_D, HOME_F, KC_G, KC_H, HOME_J, HOME_K, HOME_L, HOME_SCLN, KC_P,
KC_MINS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT,
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_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O,
LALT_Q, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_P,
LSFT_MINS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, LGUI_QUOT,
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, KC_PGDN, KC_PGUP,
XXXXXXX, KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PAUS,
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(
KC_7, KC_8, KC_9, KC_GRV, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
KC_EQL, KC_0, KC_4, KC_5, KC_6, KC_LBRC, XXXXXXX, KC_RSFT, KC_RCTL, KC_LALT, KC_RGUI, XXXXXXX,
KC_MINS, KC_BSLS, KC_1, KC_2, KC_3, KC_RBRC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
KC_ENT, _______, TG(_GAME), FUNC_ENT, NAV_BSPC, RALT_DEL
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(
LSFT(KC_7), LSFT(KC_8), LSFT(KC_9), LSFT(KC_GRV), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
LSFT(KC_EQL), LSFT(KC_0), LSFT(KC_4), LSFT(KC_5), LSFT(KC_6), LSFT(KC_LBRC), XXXXXXX, KC_RSFT, KC_RCTL, KC_LALT, KC_RGUI, XXXXXXX,
LSFT(KC_MINS), LSFT(KC_BSLS), LSFT(KC_1), LSFT(KC_2), LSFT(KC_3), LSFT(KC_RBRC), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
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_F7, KC_F8, KC_F9, KC_CAPS, XXXXXXX, KC_PSCR, KC_SCRL, KC_NUM,
KC_F12, KC_F11, KC_F4, KC_F5, KC_F6, KC_F12, XXXXXXX, KC_RSFT, KC_RCTL, KC_LALT, KC_RGUI, XXXXXXX,
XXXXXXX, KC_F10, KC_F1, KC_F2, KC_F3, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
_______, KC_MNXT, KC_MPLY, _______, XXXXXXX, MO(_SYS)
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(
BL_DOWN, BL_UP, BL_TOGG, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, RGB_RMOD,
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, _______

+ 6
- 0
keyboards/stront/40keys/keymaps/hid/config.h View File

@ -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

+ 164
- 0
keyboards/stront/40keys/keymaps/hid/keymap.c View File

@ -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);
}

+ 5
- 0
keyboards/stront/40keys/keymaps/hid/rules.mk View File

@ -0,0 +1,5 @@
CAPS_WORD_ENABLE = yes
RAW_ENABLE = yes
SRC += ./../../../38keys/keymaps/hid/hid_display.c

keyboards/stront/keymaps/i2c/halconf.h → keyboards/stront/40keys/mcuconf.h View File

@ -3,6 +3,7 @@
#pragma once
#define HAL_USE_I2C TRUE
#include_next <mcuconf.h>
#include_next <halconf.h>
#undef RP_PWM_USE_PWM6
#define RP_PWM_USE_PWM6 TRUE

+ 30
- 10
keyboards/stront/config.h View File

@ -3,11 +3,23 @@
#pragma once
/* stront specific options */
#define STRONT_DISPLAY_LEFT // display is on left by default
#define STRONT_DISPLAY_ROTATION QP_ROTATION_180
#ifdef QUANTUM_PAINTER_ST7789_SPI_ENABLE // default settings for ST7789 1.69" display
# define STRONT_DISPLAY_WIDTH 240
# define STRONT_DISPLAY_HEIGHT 280
# define STRONT_DISPLAY_OFFSET_X 0
# define STRONT_DISPLAY_OFFSET_Y 20
#endif
/* interconnect config */
#define SERIAL_USART_FULL_DUPLEX
#define SERIAL_USART_PIN_SWAP
#define SERIAL_USART_TX_PIN GP0
#define SERIAL_USART_RX_PIN GP1
/* reset config */
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U
@ -15,22 +27,30 @@
#define EE_HANDS
#define SPLIT_POINTING_ENABLE
/* SPI config for display/touchpad */
/* common SPI/I2C config */
#define SPI_DRIVER SPID1
#define SPI_SCK_PIN GP10
#define SPI_MOSI_PIN GP11
#define SPI_MISO_PIN GP12
#define I2C_DRIVER I2CD1
#define I2C1_SDA_PIN GP10
#define I2C1_SCL_PIN GP11
/* touchpad config */
#define POINTING_DEVICE_RIGHT
/* common touchpad config */
#define POINTING_DEVICE_RIGHT // touchpad is right by default
#define POINTING_DEVICE_CS_PIN GP9
#define POINTING_DEVICE_ROTATION_180
#define CIRQUE_PINNACLE_DIAMETER_MM 40
#ifdef POINTING_DEVICE_DRIVER_azoteq_iqs5xx
# define AZOTEQ_IQS5XX_TPS43
# define AZOTEQ_IQS5XX_ROTATION_270
#else
# define CIRQUE_PINNACLE_DIAMETER_MM 40
// # define CIRQUE_PINNACLE_ATTENUATION EXTREG__TRACK_ADCCONFIG__ADC_ATTENUATE_2X // enable for curved overlay
# ifdef POINTING_DEVICE_RIGHT
# define POINTING_DEVICE_ROTATION_180
# endif
#endif
/* LCD config */
#define LCD_DC_PIN GP12
/* common LCD config */
#define LCD_CS_PIN GP9
#define LCD_RST_PIN GP13
#define BACKLIGHT_PWM_DRIVER PWMD7
#define BACKLIGHT_PWM_CHANNEL RP2040_PWM_CHANNEL_A
#define QUANTUM_PAINTER_LVGL_USE_CUSTOM_CONF
#define QUANTUM_PAINTER_DISPLAY_TIMEOUT 0

+ 15
- 17
keyboards/stront/display.c View File

@ -24,22 +24,17 @@ static lv_obj_t *label_caps;
void init_styles(void) {
lv_style_init(&style_screen);
lv_style_set_bg_color(&style_screen, lv_color_black());
lv_style_set_pad_all(&style_screen, 10);
lv_style_init(&style_container);
lv_style_set_pad_top(&style_container, 0);
lv_style_set_pad_bottom(&style_container, 0);
lv_style_set_pad_left(&style_container, 0);
lv_style_set_pad_right(&style_container, 0);
lv_style_set_pad_all(&style_container, 0);
lv_style_set_bg_opa(&style_container, 0);
lv_style_set_border_width(&style_container, 0);
lv_style_set_width(&style_container, lv_pct(100));
lv_style_set_height(&style_container, LV_SIZE_CONTENT);
lv_style_init(&style_button);
lv_style_set_pad_top(&style_button, 4);
lv_style_set_pad_bottom(&style_button, 4);
lv_style_set_pad_left(&style_button, 4);
lv_style_set_pad_right(&style_button, 4);
lv_style_set_pad_all(&style_button, 4);
lv_style_set_radius(&style_button, 6);
lv_style_set_text_color(&style_button, lv_palette_main(LV_PALETTE_AMBER));
@ -52,21 +47,22 @@ void init_styles(void) {
void init_screen_home(void) {
screen_home = lv_scr_act();
lv_obj_add_style(screen_home, &style_screen, 0);
lv_obj_add_style(screen_home, &style_screen, LV_PART_MAIN);
use_flex_column(screen_home);
lv_obj_t *mods = lv_obj_create(screen_home);
lv_obj_add_style(mods, &style_container, 0);
lv_obj_add_style(mods, &style_container, LV_PART_MAIN);
lv_obj_set_style_pad_hor(mods, 20, LV_PART_MAIN);
use_flex_column(mods);
lv_obj_t *mods_row1 = lv_obj_create(mods);
lv_obj_add_style(mods_row1, &style_container, 0);
lv_obj_add_style(mods_row1, &style_container, LV_PART_MAIN);
use_flex_row(mods_row1);
label_gui = create_button(mods_row1, "GUI", &style_button, &style_button_active);
label_alt = create_button(mods_row1, "ALT", &style_button, &style_button_active);
lv_obj_t *mods_row2 = lv_obj_create(mods);
lv_obj_add_style(mods_row2, &style_container, 0);
lv_obj_add_style(mods_row2, &style_container, LV_PART_MAIN);
use_flex_row(mods_row2);
label_ctrl = create_button(mods_row2, "CTL", &style_button, &style_button_active);
label_shift = create_button(mods_row2, "SFT", &style_button, &style_button_active);
@ -85,10 +81,14 @@ bool display_init_kb(void) {
backlight_enable();
painter_device_t display = qp_st7789_make_spi_device(240, 300, LCD_CS_PIN, LCD_DC_PIN, LCD_RST_PIN, 16, 3);
qp_set_viewport_offsets(display, 0, 20);
#ifdef QUANTUM_PAINTER_ST7789_SPI_ENABLE
painter_device_t display = qp_st7789_make_spi_device(STRONT_DISPLAY_WIDTH, STRONT_DISPLAY_HEIGHT, LCD_CS_PIN, LCD_DC_PIN, LCD_RST_PIN, 16, 3);
qp_set_viewport_offsets(display, STRONT_DISPLAY_OFFSET_X, STRONT_DISPLAY_OFFSET_Y);
#elif QUANTUM_PAINTER_GC9A01_SPI_ENABLE
painter_device_t display = qp_gc9a01_make_spi_device(240, 240, LCD_CS_PIN, LCD_DC_PIN, LCD_RST_PIN, 16, 3);
#endif
if (!qp_init(display, QP_ROTATION_180) || !qp_power(display, true) || !qp_lvgl_attach(display)) return false;
if (!qp_init(display, STRONT_DISPLAY_ROTATION) || !qp_power(display, true) || !qp_lvgl_attach(display)) return false;
dprint("display_init_kb - initialised\n");
@ -111,8 +111,6 @@ __attribute__((weak)) bool display_init_user(void) {
}
__attribute__((weak)) void display_housekeeping_task(void) {
dprint("display_housekeeping_task_kb\n");
toggle_state(label_shift, LV_STATE_PRESSED, MODS_SHIFT);
toggle_state(label_ctrl, LV_STATE_PRESSED, MODS_CTRL);
toggle_state(label_alt, LV_STATE_PRESSED, MODS_ALT);


+ 1
- 0
keyboards/stront/halconf.h View File

@ -3,6 +3,7 @@
#pragma once
#define HAL_USE_I2C TRUE
#define HAL_USE_SPI TRUE
#define HAL_USE_PWM TRUE


+ 95
- 0
keyboards/stront/info.json View File

@ -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"
}
}

+ 0
- 200
keyboards/stront/keyboard.json View File

@ -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"
}
}

+ 0
- 15
keyboards/stront/keymaps/hid/lv_conf.h View File

@ -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

+ 0
- 1
keyboards/stront/keymaps/i2c/rules.mk View File

@ -1 +0,0 @@
POINTING_DEVICE_DRIVER = cirque_pinnacle_i2c

+ 83
- 5
keyboards/stront/lv_conf.h View File

@ -3,16 +3,94 @@
#pragma once
#include_next <lv_conf.h>
/* disable default features to reduce size */
#undef LV_FONT_DEFAULT
#define LV_FONT_DEFAULT &lv_font_montserrat_28
/* disable some things before lv_conf include */
#define LV_USE_CALENDAR 0
#define LV_USE_SPAN 0
#define LV_USE_ROLLER 0
#define LV_USE_TEXTAREA 0
#include_next <lv_conf.h>
/* change default font */
#undef LV_FONT_MONTSERRAT_14
#define LV_FONT_MONTSERRAT_14 0
#undef LV_FONT_MONTSERRAT_28
#define LV_FONT_MONTSERRAT_28 1
#undef LV_FONT_MONTSERRAT_20
#define LV_FONT_MONTSERRAT_20 1
#undef LV_FONT_DEFAULT
#define LV_FONT_DEFAULT &lv_font_montserrat_20
/* add large font */
#undef LV_FONT_MONTSERRAT_48
#define LV_FONT_MONTSERRAT_48 1
/* disable widgets*/
#undef LV_USE_ANIMIMG
#define LV_USE_ANIMIMG 0
#undef LV_USE_BAR
#define LV_USE_BAR 0
#undef LV_USE_BTN
#define LV_USE_BTN 0
#undef LV_USE_BTNMATRIX
#define LV_USE_BTNMATRIX 0
#undef LV_USE_CANVAS
#define LV_USE_CANVAS 0
#undef LV_USE_CHECKBOX
#define LV_USE_CHECKBOX 0
#undef LV_USE_DROPDOWN
#define LV_USE_DROPDOWN 0
#undef LV_USE_LINE
#define LV_USE_LINE 0
#undef LV_USE_SLIDER
#define LV_USE_SLIDER 0
#undef LV_USE_SWITCH
#define LV_USE_SWITCH 0
#undef LV_USE_TABLE
#define LV_USE_TABLE 0
/* disable extra components */
#undef LV_USE_CHART
#define LV_USE_CHART 0
#undef LV_USE_COLORWHEEL
#define LV_USE_COLORWHEEL 0
#undef LV_USE_IMGBTN
#define LV_USE_IMGBTN 0
#undef LV_USE_KEYBOARD
#define LV_USE_KEYBOARD 0
#undef LV_USE_LED
#define LV_USE_LED 0
#undef LV_USE_LIST
#define LV_USE_LIST 0
#undef LV_USE_MENU
#define LV_USE_MENU 0
#undef LV_USE_METER
#define LV_USE_METER 0
#undef LV_USE_MSGBOX
#define LV_USE_MSGBOX 0
#undef LV_USE_SPINBOX
#define LV_USE_SPINBOX 0
#undef LV_USE_SPINNER
#define LV_USE_SPINNER 0
#undef LV_USE_TABVIEW
#define LV_USE_TABVIEW 0
#undef LV_USE_TILEVIEW
#define LV_USE_TILEVIEW 0
#undef LV_USE_WIN
#define LV_USE_WIN 0
/* disable themes */
#undef LV_USE_THEME_BASIC
#define LV_USE_THEME_BASIC 0
#undef LV_USE_THEME_MONO
#define LV_USE_THEME_MONO 0
/* disable layouts */
#undef LV_USE_GRID
#define LV_USE_GRID 0
/* disable build examples */
#undef LV_BUILD_EXAMPLES
#define LV_BUILD_EXAMPLES 0

+ 3
- 3
keyboards/stront/mcuconf.h View File

@ -5,8 +5,8 @@
#include_next <mcuconf.h>
#undef RP_I2C_USE_I2C1
#define RP_I2C_USE_I2C1 TRUE
#undef RP_SPI_USE_SPI1
#define RP_SPI_USE_SPI1 TRUE
#undef RP_PWM_USE_PWM7
#define RP_PWM_USE_PWM7 TRUE

+ 22
- 14
keyboards/stront/readme.md View File

@ -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.

+ 9
- 1
keyboards/stront/rules.mk View File

@ -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

+ 16
- 5
keyboards/stront/stront.c View File

@ -6,6 +6,17 @@
static bool display_enabled;
/* public function to be used in keymaps */
bool is_display_side(void) {
#ifdef STRONT_DISPLAY_RIGHT
return !is_keyboard_left();
#endif
#ifdef STRONT_DISPLAY_LEFT
return is_keyboard_left();
#endif
return false;
}
/* public function to be used in keymaps */
bool is_display_enabled(void) {
return display_enabled;
@ -18,15 +29,15 @@ bool encoder_update_kb(uint8_t index, bool clockwise) {
}
if (index == 0) {
if (clockwise) {
tap_code_delay(KC_VOLU, 10);
tap_code_delay(KC_RIGHT, 10);
} else {
tap_code_delay(KC_VOLD, 10);
tap_code_delay(KC_LEFT, 10);
}
} else if (index == 1) {
if (clockwise) {
tap_code_delay(KC_RIGHT, 10);
tap_code_delay(KC_VOLU, 10);
} else {
tap_code_delay(KC_LEFT, 10);
tap_code_delay(KC_VOLD, 10);
}
}
return true;
@ -53,7 +64,7 @@ void housekeeping_task_kb(void) {
void keyboard_post_init_kb(void) {
display_enabled = false;
if (is_keyboard_left()) {
if (is_display_side()) {
display_enabled = display_init_kb();
}


+ 1
- 0
keyboards/stront/stront.h View File

@ -4,3 +4,4 @@
#pragma once
bool is_display_enabled(void);
bool is_display_side(void);

Loading…
Cancel
Save