Formatting cleanup

This commit is contained in:
Ryan Neff 2024-02-20 17:21:20 -08:00
parent a93ba7e805
commit 475bdeccfc
9 changed files with 397 additions and 629 deletions

View File

@ -7,28 +7,24 @@
#define EE_HANDS // Sets the keyboards handedness using EEPROM
#define SERIAL_USART_FULL_DUPLEX // Use full duplex communication (TRRS)
#define SERIAL_USART_TX_PIN GP16 // USART TX pin
#define SERIAL_USART_RX_PIN GP17 // USART RX pin
#define SERIAL_USART_PIN_SWAP // Swap TX and RX pins if keyboard is master halve. (Only available on some MCUs)
#define SERIAL_USART_RX_PIN GP17 // USART RX pin
#define SERIAL_USART_PIN_SWAP // Swap TX and RX pins if keyboard is master halve. (Only available on some MCUs)
// I2C for OLEDs
// I2C for OLEDs
#define I2C_DRIVER I2CD1
#define I2C1_SDA_PIN GP6
#define I2C1_SCL_PIN GP7
#ifdef OLED_ENABLE
#define OLED_DISPLAY_128X64
#define OLED_TIMEOUT 30000
# define OLED_DISPLAY_128X64
# define OLED_TIMEOUT 30000
#endif
/* - Encoder settings - */
#ifdef ENCODER_MAP_ENABLE
// Key delay for encoders (necessary for some keycodes)
# define ENCODER_MAP_KEY_DELAY 10
#endif
/* Allows for the setting of constant mouse speed levels. */
/* Not all mouse wheel config settings are currently supported in .json config.*/
/* https://github.com/qmk/qmk_firmware/blob/master/docs/reference_info_json.md */
/* Step size */
#define MOUSEKEY_MOVE_DELTA 8
/* Maximum number of scroll steps per scroll action */
@ -40,21 +36,14 @@
#define SPLIT_POINTING_ENABLE
#define POINTING_DEVICE_RIGHT
#define POINTING_DEVICE_TASK_THROTTLE_MS 8
/*
- RGB Stuff -
All effects can be found in the QMK docs:
https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
*/
#ifdef RGB_MATRIX_ENABLE
#ifdef RGB_MATRIX_ENABLE
// Decrease decay of heatmap rgb effect
# define RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS 50
// If you're setting colors per key, this is required.
# define SPLIT_LAYER_STATE_ENABLE
// Turns off RGB effects when there is no longer a USB connection
# define RGB_DISABLE_WHEN_USB_SUSPENDED
#endif
// Allows for more than the default 4 layers in VIA.

View File

@ -1,5 +1,7 @@
// Copyright 2024 Ryan Neff (@JellyTitan)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#define HAL_USE_I2C TRUE
#include_next <halconf.h>

View File

@ -12,136 +12,93 @@ enum sofle_layers {
_ADJUST,
};
enum custom_keycodes {
KC_QWERTY = SAFE_RANGE,
KC_COLEMAK,
KC_PRVWD,
KC_NXTWD,
KC_LSTRT,
KC_LEND,
KC_DLINE
};
enum custom_keycodes { KC_QWERTY = SAFE_RANGE, KC_COLEMAK, KC_PRVWD, KC_NXTWD, KC_LSTRT, KC_LEND, KC_DLINE };
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
* QWERTY
* ,-----------------------------------------. ,-----------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | ESC | Q | W | E | R | T | | Y | U | I | O | P | Bspc |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Tab | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' |
* |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------|
* |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / |RShift|
* `-----------------------------------------/ / \ \-----------------------------------------'
* | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI |
* | | | | |/ / \ \ | | | | |
* `----------------------------------' '------''---------------------------'
*/
/*
* QWERTY
* ,-----------------------------------------. ,-----------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | ESC | Q | W | E | R | T | | Y | U | I | O | P | Bspc |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Tab | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' |
* |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------|
* |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / |RShift|
* `-----------------------------------------/ / \ \-----------------------------------------'
* | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI |
* | | | | |/ / \ \ | | | | |
* `----------------------------------' '------''---------------------------'
*/
[_QWERTY] = LAYOUT(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV,
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, XXXXXXX,KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
KC_LGUI,KC_LALT,KC_LCTL, MO(_LOWER), KC_ENT, KC_SPC, MO(_RAISE), KC_RCTL, KC_RALT, KC_RGUI
),
/*
* COLEMAK
* ,-----------------------------------------. ,-----------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | ESC | Q | W | F | P | G | | J | L | U | Y | ; | Bspc |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | TAB | A | R | S | T | D |-------. ,-------| H | N | E | I | O | ' |
* |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------|
* |LShift| Z | X | C | V | B |-------| |-------| K | M | , | . | / |RShift|
* `-----------------------------------------/ / \ \-----------------------------------------'
* | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI |
* | | | | |/ / \ \ | | | | |
* `----------------------------------' '------''---------------------------'
*/
[_QWERTY] = LAYOUT(KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, XXXXXXX, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LGUI, KC_LALT, KC_LCTL, MO(_LOWER), KC_ENT, KC_SPC, MO(_RAISE), KC_RCTL, KC_RALT, KC_RGUI),
/*
* COLEMAK
* ,-----------------------------------------. ,-----------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | ESC | Q | W | F | P | G | | J | L | U | Y | ; | Bspc |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | TAB | A | R | S | T | D |-------. ,-------| H | N | E | I | O | ' |
* |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------|
* |LShift| Z | X | C | V | B |-------| |-------| K | M | , | . | / |RShift|
* `-----------------------------------------/ / \ \-----------------------------------------'
* | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI |
* | | | | |/ / \ \ | | | | |
* `----------------------------------' '------''---------------------------'
*/
[_COLEMAK] = LAYOUT(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV,
KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, XXXXXXX,KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
KC_LGUI,KC_LALT,KC_LCTL,MO(_LOWER), KC_ENT, KC_SPC, MO(_RAISE), KC_RCTL, KC_RALT, KC_RGUI
),
/* LOWER
* ,-----------------------------------------. ,-----------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | F12 |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Tab | ! | @ | # | $ | % |-------. ,-------| ^ | & | * | ( | ) | | |
* |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------|
* | Shift| = | - | + | { | } |-------| |-------| [ | ] | ; | : | \ | Shift|
* `-----------------------------------------/ / \ \-----------------------------------------'
* | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI |
* | | | | |/ / \ \ | | | | |
* `----------------------------------' '------''---------------------------'
*/
[_LOWER] = LAYOUT(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F12,
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE,
_______, KC_EQL, KC_MINS, KC_PLUS, KC_LCBR, KC_RCBR, _______, _______, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
/* RAISE
* ,----------------------------------------. ,-----------------------------------------.
* | | | | | | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Esc | Ins | Pscr | Menu | | | | | PWrd | Up | NWrd | DLine| Bspc |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Tab | LAt | LCtl |LShift| | Caps |-------. ,-------| | Left | Down | Rigth| Del | Bspc |
* |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------|
* |Shift | Undo | Cut | Copy | Paste| |-------| |-------| | LStr | | LEnd | | Shift|
* `-----------------------------------------/ / \ \-----------------------------------------'
* | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI |
* | | | | |/ / \ \ | | | | |
* `----------------------------------' '------''---------------------------'
*/
[_RAISE] = LAYOUT(
_______, _______ , _______ , _______ , _______ , _______, _______, _______ , _______, _______ , _______ ,_______,
_______, KC_INS, KC_PSCR, KC_APP, XXXXXXX, XXXXXXX, KC_PGUP, KC_PRVWD, KC_UP, KC_NXTWD,KC_DLINE, KC_BSPC,
_______, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_CAPS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_BSPC,
_______,KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, XXXXXXX, _______, _______, XXXXXXX, KC_LSTRT, XXXXXXX, KC_LEND, XXXXXXX, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
/* ADJUST
* ,-----------------------------------------. ,-----------------------------------------.
* | | | | | | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | QK_BOOT| |QWERTY|COLEMAK| | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | |MACWIN| | | |-------. ,-------| | VOLDO| MUTE | VOLUP| | |
* |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------|
* | | | | | | |-------| |-------| | PREV | PLAY | NEXT | | |
* `-----------------------------------------/ / \ \-----------------------------------------'
* | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI |
* | | | | |/ / \ \ | | | | |
* `----------------------------------' '------''---------------------------'
*/
[_ADJUST] = LAYOUT(
XXXXXXX , XXXXXXX, XXXXXXX , XXXXXXX , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
QK_BOOT , XXXXXXX,KC_QWERTY,KC_COLEMAK,CG_TOGG,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX , XXXXXXX,CG_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX,
XXXXXXX , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)
};
[_COLEMAK] = LAYOUT(KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, XXXXXXX, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LGUI, KC_LALT, KC_LCTL, MO(_LOWER), KC_ENT, KC_SPC, MO(_RAISE), KC_RCTL, KC_RALT, KC_RGUI),
/* LOWER
* ,-----------------------------------------. ,-----------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | F12 |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Tab | ! | @ | # | $ | % |-------. ,-------| ^ | & | * | ( | ) | | |
* |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------|
* | Shift| = | - | + | { | } |-------| |-------| [ | ] | ; | : | \ | Shift|
* `-----------------------------------------/ / \ \-----------------------------------------'
* | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI |
* | | | | |/ / \ \ | | | | |
* `----------------------------------' '------''---------------------------'
*/
[_LOWER] = LAYOUT(_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F12, _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, _______, KC_EQL, KC_MINS, KC_PLUS, KC_LCBR, KC_RCBR, _______, _______, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
/* RAISE
* ,----------------------------------------. ,-----------------------------------------.
* | | | | | | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Esc | Ins | Pscr | Menu | | | | | PWrd | Up | NWrd | DLine| Bspc |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Tab | LAt | LCtl |LShift| | Caps |-------. ,-------| | Left | Down | Rigth| Del | Bspc |
* |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------|
* |Shift | Undo | Cut | Copy | Paste| |-------| |-------| | LStr | | LEnd | | Shift|
* `-----------------------------------------/ / \ \-----------------------------------------'
* | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI |
* | | | | |/ / \ \ | | | | |
* `----------------------------------' '------''---------------------------'
*/
[_RAISE] = LAYOUT(_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_PSCR, KC_APP, XXXXXXX, XXXXXXX, KC_PGUP, KC_PRVWD, KC_UP, KC_NXTWD, KC_DLINE, KC_BSPC, _______, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_CAPS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_BSPC, _______, KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, XXXXXXX, _______, _______, XXXXXXX, KC_LSTRT, XXXXXXX, KC_LEND, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
/* ADJUST
* ,-----------------------------------------. ,-----------------------------------------.
* | | | | | | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | QK_BOOT| |QWERTY|COLEMAK| | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | |MACWIN| | | |-------. ,-------| | VOLDO| MUTE | VOLUP| | |
* |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------|
* | | | | | | |-------| |-------| | PREV | PLAY | NEXT | | |
* `-----------------------------------------/ / \ \-----------------------------------------'
* | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI |
* | | | | |/ / \ \ | | | | |
* `----------------------------------' '------''---------------------------'
*/
[_ADJUST] = LAYOUT(XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, QK_BOOT, XXXXXXX, KC_QWERTY, KC_COLEMAK, CG_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, CG_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______)};
#ifdef OLED_ENABLE
static void render_logo(void) {
static const char PROGMEM qmk_logo[] = {
0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0
};
static const char PROGMEM qmk_logo[] = {0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0};
oled_write_P(qmk_logo, false);
}
@ -246,7 +203,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
break;
case KC_NXTWD:
if (record->event.pressed) {
if (record->event.pressed) {
if (keymap_config.swap_lctl_lgui) {
register_mods(mod_config(MOD_LALT));
register_code(KC_RIGHT);
@ -267,7 +224,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
case KC_LSTRT:
if (record->event.pressed) {
if (keymap_config.swap_lctl_lgui) {
//CMD-arrow on Mac, but we have CTL and GUI swapped
// CMD-arrow on Mac, but we have CTL and GUI swapped
register_mods(mod_config(MOD_LCTL));
register_code(KC_LEFT);
} else {
@ -285,7 +242,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
case KC_LEND:
if (record->event.pressed) {
if (keymap_config.swap_lctl_lgui) {
//CMD-arrow on Mac, but we have CTL and GUI swapped
// CMD-arrow on Mac, but we have CTL and GUI swapped
register_mods(mod_config(MOD_LCTL));
register_code(KC_RIGHT);
} else {
@ -350,14 +307,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
#ifdef ENCODER_MAP_ENABLE
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[1] = { ENCODER_CCW_CW(KC_PGUP, KC_PGDN) },
[2] = { ENCODER_CCW_CW(_______, _______) },
[3] = { ENCODER_CCW_CW(_______, _______) },
[4] = { ENCODER_CCW_CW(_______, _______) },
};
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[0] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)}, [1] = {ENCODER_CCW_CW(KC_PGUP, KC_PGDN)}, [2] = {ENCODER_CCW_CW(_______, _______)}, [3] = {ENCODER_CCW_CW(_______, _______)}, [4] = {ENCODER_CCW_CW(_______, _______)},
};
#endif

View File

@ -1,58 +1,58 @@
// Copyright 2024 Ryan Neff (@JellyTitan)
// SPDX-License-Identifier: GPL-2.0-or-later
#include QMK_KEYBOARD_H
#include QMK_KEYBOARD_H
enum custom_layers { _QWERTY, _LOWER, _RAISE };
enum custom_layers { _QWERTY, _LOWER, _RAISE };
/* Defines macros for use with the configurators "Any" key. (These are non-standard macros using the "Magnet" app on Mac). */
/* Move active application right half. */
#define KC_CSGRA LCTL(LSFT(LGUI(KC_RGHT)))
/* Move active application to left half. */
#define KC_CSGLA LCTL(LSFT(LGUI(KC_LEFT)))
/* Maximize active application. */
#define KC_MAXIM LCTL(LSFT(LGUI(KC_UP)))
/* Minimize active application. */
#define KC_MINIM LCTL(LSFT(LGUI(KC_DOWN)))
/* Defines macros for use with the configurators "Any" key. (These are non-standard macros using the "Magnet" app on Mac). */
/* Move active application right half. */
#define KC_CSGRA LCTL(LSFT(LGUI(KC_RGHT)))
/* Move active application to left half. */
#define KC_CSGLA LCTL(LSFT(LGUI(KC_LEFT)))
/* Maximize active application. */
#define KC_MAXIM LCTL(LSFT(LGUI(KC_UP)))
/* Minimize active application. */
#define KC_MINIM LCTL(LSFT(LGUI(KC_DOWN)))
enum custom_keycodes {
QWERTY = SAFE_RANGE,
LOWER,
RAISE,
CMD_TAB_CW,
CMD_TAB_CCW,
};
enum custom_keycodes {
QWERTY = SAFE_RANGE,
LOWER,
RAISE,
CMD_TAB_CW,
CMD_TAB_CCW,
};
/* Rotary encoder variables used to hold down Command (GUI) key while cycling through open programs. */
bool is_cmd_tab_active = false;
uint16_t cmd_tab_timer = 0;
/* Rotary encoder variables used to hold down Command (GUI) key while cycling through open programs. */
bool is_cmd_tab_active = false;
uint16_t cmd_tab_timer = 0;
/**
* Tap Dance declarations
*/
enum tapdances {
_TD_FIVE_ENTER,
};
/**
* Tap Dance declarations
*/
enum tapdances {
_TD_FIVE_ENTER,
};
/* Tapdance */
#define TD5ENT TD(_TD_FIVE_ENTER)
/* Tapdance */
#define TD5ENT TD(_TD_FIVE_ENTER)
/**
* Tap Dance definitions
*
* To use this in the configurator, enter the name 'TD5ENT' in the "Any" key.
*/
tap_dance_action_t tap_dance_actions[] = {
/* Tap once for 5, twice for Enter. */
[_TD_FIVE_ENTER] = ACTION_TAP_DANCE_DOUBLE(KC_5, KC_ENT),
};
/**
* Tap Dance definitions
*
* To use this in the configurator, enter the name 'TD5ENT' in the "Any" key.
*/
tap_dance_action_t tap_dance_actions[] = {
/* Tap once for 5, twice for Enter. */
[_TD_FIVE_ENTER] = ACTION_TAP_DANCE_DOUBLE(KC_5, KC_ENT),
};
/**
* Keymap.
* The rotary encoders are programmed manually below because the configurator does not support them yet.
*/
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// clang-format off
/**
* Keymap.
* The rotary encoders are programmed manually below because the configurator does not support them yet.
*/
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// clang-format off
/*
QWERTY
@ -121,311 +121,191 @@
HF_DWLU, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, RGB_VAI, RGB_VAD,
HF_DWLD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPI, RGB_SPD,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_CSGLA, KC_CSGRA, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
// clang-format on
};
// clang-format on
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
case CMD_TAB_CW:
if (record->event.pressed) {
if (!is_cmd_tab_active) {
is_cmd_tab_active = true;
register_code(KC_LGUI);
}
cmd_tab_timer = timer_read();
register_code(KC_TAB);
} else {
unregister_code(KC_TAB);
}
break;
case CMD_TAB_CCW:
if (record->event.pressed) {
if (!is_cmd_tab_active) {
is_cmd_tab_active = true;
register_code(KC_LGUI);
}
cmd_tab_timer = timer_read();
tap_code16(S(KC_TAB));
} else {
unregister_code(KC_TAB);
}
break;
}
return true;
}
/**
* Helper function for rotary encoder.
*
* If the timer has elapsed, the Command/Gui tab will be released.
* You can adjust the milliseconds to speed up the CMD key release.
*/
void matrix_scan_user(void) {
if (is_cmd_tab_active) {
if (timer_elapsed(cmd_tab_timer) > 900) {
unregister_code(KC_LGUI);
is_cmd_tab_active = false;
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
case CMD_TAB_CW:
if (record->event.pressed) {
if (!is_cmd_tab_active) {
is_cmd_tab_active = true;
register_code(KC_LGUI);
}
cmd_tab_timer = timer_read();
register_code(KC_TAB);
} else {
unregister_code(KC_TAB);
}
break;
case CMD_TAB_CCW:
if (record->event.pressed) {
if (!is_cmd_tab_active) {
is_cmd_tab_active = true;
register_code(KC_LGUI);
}
cmd_tab_timer = timer_read();
tap_code16(S(KC_TAB));
} else {
unregister_code(KC_TAB);
}
break;
}
return true;
}
/**
* Helper function for rotary encoder.
*
* If the timer has elapsed, the Command/Gui tab will be released.
* You can adjust the milliseconds to speed up the CMD key release.
*/
void matrix_scan_user(void) {
if (is_cmd_tab_active) {
if (timer_elapsed(cmd_tab_timer) > 900) {
unregister_code(KC_LGUI);
is_cmd_tab_active = false;
}
}
}
/**
* Rotary Encoder.
*
* This can't be programmed through configurator. You must do it here.
*
* This uses the amazing "Encoder map" feature which replicates the normal keyswitch layer handling functionality, but with encoders.
* https://docs.qmk.fm/#/feature_encoders?id=encoder-map
*
* Uses a variant of the Super-alt-tab macro to switch between open applications on a mac. (Command-tab)
* https://docs.qmk.fm/#/feature_macros?id=super-alt%e2%86%aftab
*/
#ifdef ENCODER_MAP_ENABLE
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
/* Left Hand */ /* Right Hand */
/* Switch between tabs. (Control + Tab). */ /* Switch between open apps on Mac. (Command + Tab + timer logic) */
[_QWERTY] = {ENCODER_CCW_CW(S(C(KC_TAB)), C(KC_TAB)), ENCODER_CCW_CW(CMD_TAB_CW, CMD_TAB_CCW)},
/* Scrolls left & right. (Shift + Mouse Wheel Up). */ /* Scrolls up and down. (Page Down & Page Up - mouse wheel scroll incraments are too small) */
[_LOWER] = {ENCODER_CCW_CW(S(KC_MS_WH_UP), S(KC_MS_WH_DOWN)), ENCODER_CCW_CW(KC_PGDN, KC_PGUP)},
/* Selects adjacent words. (Command + Shift + Right Arrow). */ /* Jumps to end/start of line. Hold shift to select. (Gui + arrow). */
[_RAISE] = {ENCODER_CCW_CW(C(S(KC_LEFT)), C(S(KC_RGHT))), ENCODER_CCW_CW(G(KC_LEFT), G(KC_RGHT))}
};
#endif
/**
* Rotary Encoder.
*
* This can't be programmed through configurator. You must do it here.
*
* This uses the amazing "Encoder map" feature which replicates the normal keyswitch layer handling functionality, but with encoders.
* https://docs.qmk.fm/#/feature_encoders?id=encoder-map
*
* Uses a variant of the Super-alt-tab macro to switch between open applications on a mac. (Command-tab)
* https://docs.qmk.fm/#/feature_macros?id=super-alt%e2%86%aftab
*/
#ifdef ENCODER_MAP_ENABLE
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
/* Left Hand */ /* Right Hand */
/* Switch between tabs. (Control + Tab). */ /* Switch between open apps on Mac. (Command + Tab + timer logic) */
[_QWERTY] = {ENCODER_CCW_CW(S(C(KC_TAB)), C(KC_TAB)), ENCODER_CCW_CW(CMD_TAB_CW, CMD_TAB_CCW)},
/* Scrolls left & right. (Shift + Mouse Wheel Up). */ /* Scrolls up and down. (Page Down & Page Up - mouse wheel scroll incraments are too small) */
[_LOWER] = {ENCODER_CCW_CW(S(KC_MS_WH_UP), S(KC_MS_WH_DOWN)), ENCODER_CCW_CW(KC_PGDN, KC_PGUP)},
/* Selects adjacent words. (Command + Shift + Right Arrow). */ /* Jumps to end/start of line. Hold shift to select. (Gui + arrow). */
[_RAISE] = {ENCODER_CCW_CW(C(S(KC_LEFT)), C(S(KC_RGHT))), ENCODER_CCW_CW(G(KC_LEFT), G(KC_RGHT))}};
#endif
// Default timeout for displaying logo on boot.
#ifndef OLED_LOGO_TIMEOUT
// 10 second timeout.
#define OLED_LOGO_TIMEOUT 10000
#endif
// Default timeout for displaying logo on boot.
#ifndef OLED_LOGO_TIMEOUT
// 10 second timeout.
# define OLED_LOGO_TIMEOUT 10000
#endif
#ifdef OLED_ENABLE
#ifdef OLED_ENABLE
uint16_t startup_timer;
uint16_t startup_timer;
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
startup_timer = timer_read();
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
startup_timer = timer_read();
if (is_keyboard_master()) {
if(is_keyboard_left()){
if (is_keyboard_master()) {
if (is_keyboard_left()) {
return OLED_ROTATION_90;
}
else {
return OLED_ROTATION_270;
}
} else {
return OLED_ROTATION_90;
}
}
static void render_qmk_logo(void) {
static const char PROGMEM qmk_logo[] = {
// 'qmk_via_OLED_128x64', 64x128px
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf0, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0xf0, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0xf0, 0xf8,
0xf8, 0x00, 0x00, 0x00, 0xf0, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0xf0, 0xf8, 0xf8, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf8, 0xfc, 0xfe, 0xfe,
0xfe, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0xff, 0xff,
0xff, 0xfe, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfe,
0xfe, 0xfc, 0xf8, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x01, 0x01, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x01,
0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x01, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x71, 0x71, 0x71, 0x71, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00,
0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x71, 0x71, 0x71, 0x71, 0x71, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xf1, 0xf1, 0xe3, 0xe3, 0xe3, 0x00, 0x00,
0x00, 0xe3, 0xe3, 0xf3, 0xf1, 0xf1, 0xf0, 0xf8, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x7f, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xfc,
0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x7f, 0x07, 0x07, 0x07, 0x07, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03,
0x03, 0x03, 0x7f, 0xff, 0x7f, 0x03, 0x03, 0x03, 0x7f, 0xff, 0x7f, 0x03, 0x03, 0x03, 0x7f, 0xff,
0x7f, 0x03, 0x03, 0x03, 0x7f, 0xff, 0x7f, 0x03, 0x03, 0x03, 0x7f, 0xff, 0x7f, 0x03, 0x03, 0x03,
0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xe0, 0x70, 0x30, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x38,
0xf0, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf8, 0xf8, 0x78, 0xf0, 0xc0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf8, 0x38, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8,
0xf8, 0x00, 0x00, 0x00, 0x80, 0xe0, 0xf0, 0x38, 0x18, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x03, 0x0f, 0x7e, 0xf8, 0xc0,
0x00, 0x80, 0xe0, 0xfc, 0x1f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
0xff, 0x0c, 0x1e, 0x7f, 0xf3, 0xc1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0f, 0x0e, 0x0c, 0x1c, 0x1c, 0x1c, 0x0c, 0x0c, 0x0e,
0x0f, 0x1f, 0x38, 0x30, 0x70, 0x20, 0x00, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0f,
0x0f, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f,
0x0f, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x0f, 0x0c, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x18, 0x7c, 0xfe, 0xfe, 0xfc, 0xfc, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe0, 0xfc, 0xfe, 0xfe, 0xfe, 0x3c, 0x00, 0x00, 0x00, 0x00,
0xe0, 0xf8, 0xfc, 0xfc, 0xfc, 0xf8, 0x10, 0x00, 0x00, 0x00, 0xc0, 0xf8, 0xfc, 0xfe, 0xfe, 0xfe,
0xfe, 0xfc, 0xf8, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x03, 0x0f, 0x7f, 0xff, 0xff, 0xff, 0xfc, 0xe0, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0xf0, 0xfc, 0xff, 0xff, 0xff, 0x7f, 0x0f, 0x01, 0x00, 0x00, 0xe0, 0xf8, 0xff,
0xff, 0xff, 0xff, 0x1f, 0x03, 0x00, 0x00, 0xc0, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x07, 0x03,
0x1f, 0x7f, 0xff, 0xff, 0xff, 0xfc, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0f, 0x7f, 0xff, 0xff, 0xff, 0xfc, 0xe0, 0xc0,
0xf0, 0xfe, 0xff, 0xff, 0xff, 0x3f, 0x0f, 0x01, 0x00, 0x00, 0xe0, 0xf8, 0xff, 0xff, 0xff, 0x7f,
0x1f, 0x03, 0x00, 0x00, 0xc0, 0xf8, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xf8, 0xf8, 0xf8,
0xf8, 0xf8, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0f, 0x3f, 0x7f, 0x7f, 0x7f,
0x7f, 0x7f, 0x3f, 0x0f, 0x01, 0x00, 0x00, 0x00, 0x38, 0x7f, 0x7f, 0x7f, 0x3f, 0x1f, 0x03, 0x00,
0x00, 0x00, 0x18, 0x7e, 0x7f, 0x7f, 0x7f, 0x1f, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1f, 0x3f, 0x7f, 0x7f, 0x7f, 0x3c, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x1e, 0x3e,
0x1c, 0x08, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c,
0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x3e, 0x3e,
0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
oled_write_raw_P(qmk_logo, sizeof(qmk_logo));
// oled_write_P(qmk_logo, false);
}
static void render_logo(void) {
// @todo - should we split this into a seperate file? kb16 has a good example.
static const char PROGMEM sofle_pico_logo[] = {
// 'sofle-pico-vector-logo-v5 OLED chopped', 64x128px
0x00, 0x00, 0x00, 0x00, 0xc0, 0xe0, 0xe0, 0xf0, 0xf0, 0xf0, 0x70, 0xf0, 0xf0, 0xe0, 0x20, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe0, 0xf0, 0xf8, 0xfc, 0x3c, 0x3c, 0x3c, 0x7c, 0xf8, 0xf8, 0xf0, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x0f, 0x1f, 0x3f, 0x3f, 0x3f, 0x7c, 0x78, 0xf8, 0xf8, 0xf0, 0xe0, 0x00,
0x00, 0xc0, 0xf0, 0xf8, 0xfc, 0x3c, 0x1c, 0x1e, 0x1e, 0x3c, 0xfc, 0xf8, 0xf0, 0xc0, 0x00, 0x1c,
0x1c, 0xff, 0xff, 0xff, 0xff, 0x1c, 0x1c, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xc0,
0xf0, 0xf8, 0xfc, 0xfc, 0xce, 0xce, 0xce, 0xdc, 0xfc, 0xfc, 0xf8, 0xe0, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x08, 0x1e, 0x1e, 0x1e, 0x3c, 0x3c, 0x3c, 0x3e, 0x1f, 0x1f, 0x0f, 0x07, 0x01,
0x00, 0x01, 0x07, 0x0f, 0x1f, 0x1e, 0x3c, 0x3c, 0x3c, 0x1e, 0x1f, 0x0f, 0x07, 0x03, 0x00, 0x00,
0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, 0x01,
0x07, 0x0f, 0x1f, 0x1f, 0x3c, 0x38, 0x38, 0x3c, 0x1c, 0x1c, 0x0c, 0x04, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0x06, 0x06, 0x06, 0x0e, 0x9e, 0xfc, 0xf8, 0x00, 0x00, 0x8e,
0x8e, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00,
0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x07, 0x07, 0x07, 0x07, 0x03, 0x03, 0x00, 0x00, 0x00, 0xff,
0xff, 0x00, 0x00, 0x00, 0x7c, 0xfe, 0xff, 0x83, 0x01, 0x01, 0x01, 0x83, 0x83, 0x00, 0x00, 0x7e,
0xff, 0xc7, 0x83, 0x01, 0x01, 0x01, 0x83, 0xff, 0xff, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0xc0, 0xc3, 0xe3, 0xe0, 0xe0, 0xe0, 0xf0, 0x70, 0x70, 0x70, 0x70, 0x30, 0x33,
0x73, 0xe0, 0x60, 0xe0, 0xe0, 0xc0, 0xc1, 0x83, 0x03, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00,
0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0x70,
0x30, 0x70, 0x70, 0x70, 0x70, 0x70, 0xf0, 0xe0, 0xe0, 0xe0, 0xc0, 0xc0, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x03, 0x1f, 0xff, 0xf8, 0xd0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x20,
0x20, 0x40, 0xc0, 0x80, 0x00, 0x01, 0x87, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xff, 0xff, 0x03, 0x01, 0x00, 0x80, 0xc0, 0x40, 0x20,
0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xf0, 0xf8, 0x7f, 0x0f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0f, 0x1c, 0x1c, 0x38, 0x78, 0x60, 0x60, 0x60, 0x60,
0x60, 0x70, 0x38, 0x39, 0xdf, 0xef, 0xf7, 0x7b, 0x39, 0x1c, 0x1c, 0x0e, 0x0e, 0x06, 0x06, 0x06,
0x06, 0x06, 0x0e, 0x0e, 0x1e, 0x1c, 0x3c, 0x79, 0xfb, 0xf7, 0xef, 0x9f, 0x38, 0x30, 0x70, 0x60,
0x60, 0x60, 0x60, 0x70, 0x38, 0x3c, 0x1c, 0x0f, 0x0f, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe0,
0xf8, 0xfc, 0x7e, 0x7f, 0xff, 0xff, 0xe3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0xff, 0x7f, 0x7f, 0x3f, 0x7c, 0xf8, 0xf0,
0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff,
0x81, 0x00, 0x00, 0x00, 0x00, 0x01, 0xcf, 0xff, 0xfe, 0x7c, 0x78, 0x78, 0x38, 0x30, 0x30, 0x30,
0x30, 0x30, 0x38, 0x78, 0x78, 0x7c, 0xfe, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff,
0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x03, 0x07, 0x0f, 0x0e, 0x1e, 0x3f, 0x7f, 0xf1, 0xe0, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0xe1, 0xf3, 0x7f, 0x3f, 0x1f, 0x0f, 0x07, 0x07, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
oled_write_raw_P(sofle_pico_logo, sizeof(sofle_pico_logo));
}
static void render_status(void) {
oled_write_P(PSTR("Sofle Pico\nv3.04\n~~~~~~~~~\n"), false);
uint8_t n = get_current_wpm();
char wpm_counter[4];
wpm_counter[3] = '\0';
wpm_counter[2] = '0' + n % 10;
wpm_counter[1] = (n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' ';
wpm_counter[0] = n / 10 ? '0' + n / 10 : ' ';
oled_write_P(PSTR("WPM:"), false);
oled_write(wpm_counter, false);
led_t led_state = host_keyboard_led_state();
oled_write_P(PSTR("\nCaps: "), false);
oled_write_P(led_state.caps_lock ? PSTR("on ") : PSTR("off"), false);
oled_write_P(PSTR("\n"), false);
switch (get_highest_layer(layer_state)) {
case _QWERTY:
oled_write_P(PSTR("Qwerty Base"), false);
break;
case _LOWER:
oled_write_P(PSTR("Numbers &\nSymbols"), false);
break;
case _RAISE:
oled_write_P(PSTR("Navigation"), false);
break;
default:
oled_write_P(PSTR("Unknown"), false);
break;
}
}
bool oled_task_user(void) {
static bool finished_logo = false;
if ((timer_elapsed(startup_timer) < OLED_LOGO_TIMEOUT) && !finished_logo) {
// Display the logo for 5 seconds on boot.
if (is_keyboard_master()) {
render_logo();
// 10 Chars per line. Set cursor used to simplify line wraps.
oled_set_cursor(0, 12);
oled_write_P(PSTR("v3.51"), false);
oled_set_cursor(0, 13);
oled_write_P(PSTR("12-5-2023"), false);
oled_set_cursor(0, 14);
oled_write_P(PSTR("by:github/"), false);
oled_set_cursor(0, 15);
oled_write_P(PSTR("JellyTitan"), false);
} else {
render_qmk_logo();
}
} else {
// Display the current keyboard state.
if (!finished_logo) {
finished_logo = true;
// Clears the OLED.
oled_clear();
}
if (is_keyboard_master()) {
render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
} else {
render_logo();
}
return OLED_ROTATION_270;
}
return false;
} else {
return OLED_ROTATION_90;
}
}
static void render_qmk_logo(void) {
static const char PROGMEM qmk_logo[] = {// 'qmk_via_OLED_128x64', 64x128px
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0xf0, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0xf0, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0xf0, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0xf0, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf8, 0xfc, 0xfe, 0xfe, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0xfe, 0xfc, 0xf8, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0x01, 0x01, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x01, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x01, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x71, 0x71, 0x71, 0x71, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x71, 0x71, 0x71, 0x71, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xf1, 0xf1, 0xe3, 0xe3, 0xe3, 0x00, 0x00, 0x00, 0xe3, 0xe3, 0xf3, 0xf1, 0xf1,
0xf0, 0xf8, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xfc, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x07, 0x07, 0x07, 0x07, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x7f, 0xff, 0x7f, 0x03, 0x03, 0x03, 0x7f, 0xff, 0x7f, 0x03, 0x03, 0x03, 0x7f, 0xff, 0x7f, 0x03, 0x03, 0x03, 0x7f, 0xff, 0x7f, 0x03, 0x03, 0x03, 0x7f, 0xff, 0x7f, 0x03, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xe0, 0x70, 0x30, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x38, 0xf0, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf8, 0xf8, 0x78, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf8, 0x38, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0x80, 0xe0, 0xf0, 0x38, 0x18, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x03, 0x0f, 0x7e, 0xf8, 0xc0, 0x00, 0x80, 0xe0, 0xfc, 0x1f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0c, 0x1e, 0x7f, 0xf3, 0xc1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0f, 0x0e, 0x0c, 0x1c, 0x1c,
0x1c, 0x0c, 0x0c, 0x0e, 0x0f, 0x1f, 0x38, 0x30, 0x70, 0x20, 0x00, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0f, 0x0f, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x0f, 0x0c, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x7c, 0xfe, 0xfe, 0xfc, 0xfc, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe0, 0xfc, 0xfe, 0xfe, 0xfe, 0x3c, 0x00, 0x00, 0x00,
0x00, 0xe0, 0xf8, 0xfc, 0xfc, 0xfc, 0xf8, 0x10, 0x00, 0x00, 0x00, 0xc0, 0xf8, 0xfc, 0xfe, 0xfe, 0xfe, 0xfe, 0xfc, 0xf8, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0f, 0x7f, 0xff, 0xff, 0xff, 0xfc, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xf0, 0xfc, 0xff, 0xff, 0xff, 0x7f, 0x0f, 0x01, 0x00, 0x00, 0xe0, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x03, 0x00, 0x00, 0xc0, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x07, 0x03, 0x1f, 0x7f, 0xff, 0xff, 0xff, 0xfc, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0f, 0x7f, 0xff, 0xff, 0xff, 0xfc, 0xe0, 0xc0, 0xf0, 0xfe, 0xff, 0xff, 0xff, 0x3f, 0x0f, 0x01, 0x00, 0x00, 0xe0, 0xf8, 0xff, 0xff, 0xff, 0x7f, 0x1f, 0x03, 0x00, 0x00, 0xc0, 0xf8, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8,
0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0f, 0x3f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x3f, 0x0f, 0x01, 0x00, 0x00, 0x00, 0x38, 0x7f, 0x7f, 0x7f, 0x3f, 0x1f, 0x03, 0x00, 0x00, 0x00, 0x18, 0x7e, 0x7f, 0x7f, 0x7f, 0x1f, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1f, 0x3f, 0x7f, 0x7f, 0x7f, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x1e, 0x3e, 0x1c, 0x08, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x3e, 0x3e, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
oled_write_raw_P(qmk_logo, sizeof(qmk_logo));
// oled_write_P(qmk_logo, false);
}
static void render_logo(void) {
// @todo - should we split this into a seperate file? kb16 has a good example.
static const char PROGMEM sofle_pico_logo[] = {// 'sofle-pico-vector-logo-v5 OLED chopped', 64x128px
0x00, 0x00, 0x00, 0x00, 0xc0, 0xe0, 0xe0, 0xf0, 0xf0, 0xf0, 0x70, 0xf0, 0xf0, 0xe0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xf0, 0xf8, 0xfc, 0x3c, 0x3c, 0x3c, 0x7c, 0xf8, 0xf8, 0xf0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x1f, 0x3f, 0x3f, 0x3f, 0x7c, 0x78, 0xf8, 0xf8, 0xf0, 0xe0, 0x00, 0x00, 0xc0, 0xf0, 0xf8, 0xfc, 0x3c, 0x1c, 0x1e, 0x1e, 0x3c, 0xfc, 0xf8, 0xf0, 0xc0, 0x00, 0x1c, 0x1c, 0xff, 0xff, 0xff, 0xff, 0x1c, 0x1c, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xc0, 0xf0, 0xf8, 0xfc, 0xfc, 0xce, 0xce, 0xce, 0xdc, 0xfc, 0xfc, 0xf8, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x1e, 0x1e, 0x1e, 0x3c, 0x3c, 0x3c, 0x3e, 0x1f, 0x1f, 0x0f, 0x07, 0x01, 0x00, 0x01, 0x07,
0x0f, 0x1f, 0x1e, 0x3c, 0x3c, 0x3c, 0x1e, 0x1f, 0x0f, 0x07, 0x03, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, 0x01, 0x07, 0x0f, 0x1f, 0x1f, 0x3c, 0x38, 0x38, 0x3c, 0x1c, 0x1c, 0x0c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0x06, 0x06, 0x06, 0x0e, 0x9e, 0xfc, 0xf8, 0x00, 0x00, 0x8e, 0x8e, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x07, 0x07, 0x07, 0x07, 0x03, 0x03, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x7c, 0xfe, 0xff, 0x83, 0x01, 0x01, 0x01, 0x83, 0x83, 0x00, 0x00, 0x7e, 0xff, 0xc7, 0x83, 0x01, 0x01, 0x01,
0x83, 0xff, 0xff, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc3, 0xe3, 0xe0, 0xe0, 0xe0, 0xf0, 0x70, 0x70, 0x70, 0x70, 0x30, 0x33, 0x73, 0xe0, 0x60, 0xe0, 0xe0, 0xc0, 0xc1, 0x83, 0x03, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0x70, 0x30, 0x70, 0x70, 0x70, 0x70, 0x70, 0xf0, 0xe0, 0xe0, 0xe0, 0xc0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1f, 0xff, 0xf8, 0xd0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x20, 0x20, 0x40, 0xc0, 0x80, 0x00, 0x01, 0x87, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xff, 0xff, 0x03, 0x01, 0x00, 0x80, 0xc0, 0x40, 0x20, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
0xf0, 0xf8, 0x7f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0f, 0x1c, 0x1c, 0x38, 0x78, 0x60, 0x60, 0x60, 0x60, 0x60, 0x70, 0x38, 0x39, 0xdf, 0xef, 0xf7, 0x7b, 0x39, 0x1c, 0x1c, 0x0e, 0x0e, 0x06, 0x06, 0x06, 0x06, 0x06, 0x0e, 0x0e, 0x1e, 0x1c, 0x3c, 0x79, 0xfb, 0xf7, 0xef, 0x9f, 0x38, 0x30, 0x70, 0x60, 0x60, 0x60, 0x60, 0x70, 0x38, 0x3c, 0x1c, 0x0f, 0x0f, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe0, 0xf8, 0xfc, 0x7e, 0x7f, 0xff, 0xff, 0xe3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0xff, 0x7f, 0x7f, 0x3f, 0x7c, 0xf8, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x7f, 0xff, 0x81, 0x00, 0x00, 0x00, 0x00, 0x01, 0xcf, 0xff, 0xfe, 0x7c, 0x78, 0x78, 0x38, 0x30, 0x30, 0x30, 0x30, 0x30, 0x38, 0x78, 0x78, 0x7c, 0xfe, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x0f, 0x0e, 0x1e, 0x3f, 0x7f, 0xf1, 0xe0, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0xe1, 0xf3, 0x7f, 0x3f, 0x1f, 0x0f, 0x07, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
oled_write_raw_P(sofle_pico_logo, sizeof(sofle_pico_logo));
}
#endif
static void render_status(void) {
oled_write_P(PSTR("Sofle Pico\nv3.04\n~~~~~~~~~\n"), false);
uint8_t n = get_current_wpm();
char wpm_counter[4];
wpm_counter[3] = '\0';
wpm_counter[2] = '0' + n % 10;
wpm_counter[1] = (n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' ';
wpm_counter[0] = n / 10 ? '0' + n / 10 : ' ';
oled_write_P(PSTR("WPM:"), false);
oled_write(wpm_counter, false);
led_t led_state = host_keyboard_led_state();
oled_write_P(PSTR("\nCaps: "), false);
oled_write_P(led_state.caps_lock ? PSTR("on ") : PSTR("off"), false);
oled_write_P(PSTR("\n"), false);
switch (get_highest_layer(layer_state)) {
case _QWERTY:
oled_write_P(PSTR("Qwerty Base"), false);
break;
case _LOWER:
oled_write_P(PSTR("Numbers &\nSymbols"), false);
break;
case _RAISE:
oled_write_P(PSTR("Navigation"), false);
break;
default:
oled_write_P(PSTR("Unknown"), false);
break;
}
}
bool oled_task_user(void) {
static bool finished_logo = false;
if ((timer_elapsed(startup_timer) < OLED_LOGO_TIMEOUT) && !finished_logo) {
// Display the logo for 5 seconds on boot.
if (is_keyboard_master()) {
render_logo();
// 10 Chars per line. Set cursor used to simplify line wraps.
oled_set_cursor(0, 12);
oled_write_P(PSTR("v3.51"), false);
oled_set_cursor(0, 13);
oled_write_P(PSTR("12-5-2023"), false);
oled_set_cursor(0, 14);
oled_write_P(PSTR("by:github/"), false);
oled_set_cursor(0, 15);
oled_write_P(PSTR("JellyTitan"), false);
} else {
render_qmk_logo();
}
} else {
// Display the current keyboard state.
if (!finished_logo) {
finished_logo = true;
// Clears the OLED.
oled_clear();
}
if (is_keyboard_master()) {
render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
} else {
render_logo();
}
}
return false;
}
#endif

View File

@ -1,4 +1,4 @@
POINTING_DEVICE_ENABLE = yes
POINTING_DEVICE_DRIVER = pimoroni_trackball
TAP_DANCE_ENABLE = yes
VIA_ENABLE = yes
VIA_ENABLE = yes

View File

@ -12,136 +12,93 @@ enum sofle_layers {
_ADJUST,
};
enum custom_keycodes {
KC_QWERTY = SAFE_RANGE,
KC_COLEMAK,
KC_PRVWD,
KC_NXTWD,
KC_LSTRT,
KC_LEND,
KC_DLINE
};
enum custom_keycodes { KC_QWERTY = SAFE_RANGE, KC_COLEMAK, KC_PRVWD, KC_NXTWD, KC_LSTRT, KC_LEND, KC_DLINE };
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
* QWERTY
* ,-----------------------------------------. ,-----------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | ESC | Q | W | E | R | T | | Y | U | I | O | P | Bspc |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Tab | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' |
* |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------|
* |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / |RShift|
* `-----------------------------------------/ / \ \-----------------------------------------'
* | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI |
* | | | | |/ / \ \ | | | | |
* `----------------------------------' '------''---------------------------'
*/
/*
* QWERTY
* ,-----------------------------------------. ,-----------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | ESC | Q | W | E | R | T | | Y | U | I | O | P | Bspc |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Tab | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' |
* |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------|
* |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / |RShift|
* `-----------------------------------------/ / \ \-----------------------------------------'
* | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI |
* | | | | |/ / \ \ | | | | |
* `----------------------------------' '------''---------------------------'
*/
[_QWERTY] = LAYOUT(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV,
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, XXXXXXX,KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
KC_LGUI,KC_LALT,KC_LCTL, MO(_LOWER), KC_ENT, KC_SPC, MO(_RAISE), KC_RCTL, KC_RALT, KC_RGUI
),
/*
* COLEMAK
* ,-----------------------------------------. ,-----------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | ESC | Q | W | F | P | G | | J | L | U | Y | ; | Bspc |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | TAB | A | R | S | T | D |-------. ,-------| H | N | E | I | O | ' |
* |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------|
* |LShift| Z | X | C | V | B |-------| |-------| K | M | , | . | / |RShift|
* `-----------------------------------------/ / \ \-----------------------------------------'
* | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI |
* | | | | |/ / \ \ | | | | |
* `----------------------------------' '------''---------------------------'
*/
[_QWERTY] = LAYOUT(KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, XXXXXXX, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LGUI, KC_LALT, KC_LCTL, MO(_LOWER), KC_ENT, KC_SPC, MO(_RAISE), KC_RCTL, KC_RALT, KC_RGUI),
/*
* COLEMAK
* ,-----------------------------------------. ,-----------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | ESC | Q | W | F | P | G | | J | L | U | Y | ; | Bspc |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | TAB | A | R | S | T | D |-------. ,-------| H | N | E | I | O | ' |
* |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------|
* |LShift| Z | X | C | V | B |-------| |-------| K | M | , | . | / |RShift|
* `-----------------------------------------/ / \ \-----------------------------------------'
* | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI |
* | | | | |/ / \ \ | | | | |
* `----------------------------------' '------''---------------------------'
*/
[_COLEMAK] = LAYOUT(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV,
KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, XXXXXXX,KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
KC_LGUI,KC_LALT,KC_LCTL,MO(_LOWER), KC_ENT, KC_SPC, MO(_RAISE), KC_RCTL, KC_RALT, KC_RGUI
),
/* LOWER
* ,-----------------------------------------. ,-----------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | F12 |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Tab | ! | @ | # | $ | % |-------. ,-------| ^ | & | * | ( | ) | | |
* |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------|
* | Shift| = | - | + | { | } |-------| |-------| [ | ] | ; | : | \ | Shift|
* `-----------------------------------------/ / \ \-----------------------------------------'
* | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI |
* | | | | |/ / \ \ | | | | |
* `----------------------------------' '------''---------------------------'
*/
[_LOWER] = LAYOUT(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F12,
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE,
_______, KC_EQL, KC_MINS, KC_PLUS, KC_LCBR, KC_RCBR, _______, _______, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
/* RAISE
* ,----------------------------------------. ,-----------------------------------------.
* | | | | | | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Esc | Ins | Pscr | Menu | | | | | PWrd | Up | NWrd | DLine| Bspc |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Tab | LAt | LCtl |LShift| | Caps |-------. ,-------| | Left | Down | Rigth| Del | Bspc |
* |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------|
* |Shift | Undo | Cut | Copy | Paste| |-------| |-------| | LStr | | LEnd | | Shift|
* `-----------------------------------------/ / \ \-----------------------------------------'
* | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI |
* | | | | |/ / \ \ | | | | |
* `----------------------------------' '------''---------------------------'
*/
[_RAISE] = LAYOUT(
_______, _______ , _______ , _______ , _______ , _______, _______, _______ , _______, _______ , _______ ,_______,
_______, KC_INS, KC_PSCR, KC_APP, XXXXXXX, XXXXXXX, KC_PGUP, KC_PRVWD, KC_UP, KC_NXTWD,KC_DLINE, KC_BSPC,
_______, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_CAPS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_BSPC,
_______,KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, XXXXXXX, _______, _______, XXXXXXX, KC_LSTRT, XXXXXXX, KC_LEND, XXXXXXX, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
/* ADJUST
* ,-----------------------------------------. ,-----------------------------------------.
* | | | | | | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | QK_BOOT| |QWERTY|COLEMAK| | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | |MACWIN| | | |-------. ,-------| | VOLDO| MUTE | VOLUP| | |
* |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------|
* | | | | | | |-------| |-------| | PREV | PLAY | NEXT | | |
* `-----------------------------------------/ / \ \-----------------------------------------'
* | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI |
* | | | | |/ / \ \ | | | | |
* `----------------------------------' '------''---------------------------'
*/
[_ADJUST] = LAYOUT(
XXXXXXX , XXXXXXX, XXXXXXX , XXXXXXX , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
QK_BOOT , XXXXXXX,KC_QWERTY,KC_COLEMAK,CG_TOGG,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX , XXXXXXX,CG_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX,
XXXXXXX , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)
};
[_COLEMAK] = LAYOUT(KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, XXXXXXX, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LGUI, KC_LALT, KC_LCTL, MO(_LOWER), KC_ENT, KC_SPC, MO(_RAISE), KC_RCTL, KC_RALT, KC_RGUI),
/* LOWER
* ,-----------------------------------------. ,-----------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | F12 |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Tab | ! | @ | # | $ | % |-------. ,-------| ^ | & | * | ( | ) | | |
* |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------|
* | Shift| = | - | + | { | } |-------| |-------| [ | ] | ; | : | \ | Shift|
* `-----------------------------------------/ / \ \-----------------------------------------'
* | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI |
* | | | | |/ / \ \ | | | | |
* `----------------------------------' '------''---------------------------'
*/
[_LOWER] = LAYOUT(_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F12, _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, _______, KC_EQL, KC_MINS, KC_PLUS, KC_LCBR, KC_RCBR, _______, _______, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
/* RAISE
* ,----------------------------------------. ,-----------------------------------------.
* | | | | | | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Esc | Ins | Pscr | Menu | | | | | PWrd | Up | NWrd | DLine| Bspc |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Tab | LAt | LCtl |LShift| | Caps |-------. ,-------| | Left | Down | Rigth| Del | Bspc |
* |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------|
* |Shift | Undo | Cut | Copy | Paste| |-------| |-------| | LStr | | LEnd | | Shift|
* `-----------------------------------------/ / \ \-----------------------------------------'
* | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI |
* | | | | |/ / \ \ | | | | |
* `----------------------------------' '------''---------------------------'
*/
[_RAISE] = LAYOUT(_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_PSCR, KC_APP, XXXXXXX, XXXXXXX, KC_PGUP, KC_PRVWD, KC_UP, KC_NXTWD, KC_DLINE, KC_BSPC, _______, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_CAPS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_BSPC, _______, KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, XXXXXXX, _______, _______, XXXXXXX, KC_LSTRT, XXXXXXX, KC_LEND, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
/* ADJUST
* ,-----------------------------------------. ,-----------------------------------------.
* | | | | | | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | QK_BOOT| |QWERTY|COLEMAK| | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | |MACWIN| | | |-------. ,-------| | VOLDO| MUTE | VOLUP| | |
* |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------|
* | | | | | | |-------| |-------| | PREV | PLAY | NEXT | | |
* `-----------------------------------------/ / \ \-----------------------------------------'
* | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI |
* | | | | |/ / \ \ | | | | |
* `----------------------------------' '------''---------------------------'
*/
[_ADJUST] = LAYOUT(XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, QK_BOOT, XXXXXXX, KC_QWERTY, KC_COLEMAK, CG_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, CG_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______)};
#ifdef OLED_ENABLE
static void render_logo(void) {
static const char PROGMEM qmk_logo[] = {
0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0
};
static const char PROGMEM qmk_logo[] = {0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0};
oled_write_P(qmk_logo, false);
}
@ -246,7 +203,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
break;
case KC_NXTWD:
if (record->event.pressed) {
if (record->event.pressed) {
if (keymap_config.swap_lctl_lgui) {
register_mods(mod_config(MOD_LALT));
register_code(KC_RIGHT);
@ -267,7 +224,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
case KC_LSTRT:
if (record->event.pressed) {
if (keymap_config.swap_lctl_lgui) {
//CMD-arrow on Mac, but we have CTL and GUI swapped
// CMD-arrow on Mac, but we have CTL and GUI swapped
register_mods(mod_config(MOD_LCTL));
register_code(KC_LEFT);
} else {
@ -285,7 +242,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
case KC_LEND:
if (record->event.pressed) {
if (keymap_config.swap_lctl_lgui) {
//CMD-arrow on Mac, but we have CTL and GUI swapped
// CMD-arrow on Mac, but we have CTL and GUI swapped
register_mods(mod_config(MOD_LCTL));
register_code(KC_RIGHT);
} else {
@ -350,14 +307,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
#ifdef ENCODER_MAP_ENABLE
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[1] = { ENCODER_CCW_CW(KC_PGUP, KC_PGDN) },
[2] = { ENCODER_CCW_CW(_______, _______) },
[3] = { ENCODER_CCW_CW(_______, _______) },
[4] = { ENCODER_CCW_CW(_______, _______) },
};
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[0] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)}, [1] = {ENCODER_CCW_CW(KC_PGUP, KC_PGDN)}, [2] = {ENCODER_CCW_CW(_______, _______)}, [3] = {ENCODER_CCW_CW(_______, _______)}, [4] = {ENCODER_CCW_CW(_______, _______)},
};
#endif

View File

@ -15,5 +15,3 @@ Features:
- Modes for Mac vs Linux/Win support -> different order of modifiers and different action shortcuts on the "UPPER" layer (the red one in the image). Designed to simplify transtions when switching between operating systems often.
- The OLED on master half shows selected mode and caps lock state and is rotated.
- Left encoder controls volume up/down/mute. Right encoder PGUP/PGDOWN.

View File

@ -1 +1 @@
VIA_ENABLE = yes
VIA_ENABLE = yes

View File

@ -1,4 +1 @@
# Build Options
# Configures the USART FULL DUPLEX driver. This config is unique to the RP2040.
# https://github.com/qmk/qmk_firmware/blob/master/docs/serial_driver.md#pin-configuration-2
SERIAL_DRIVER = vendor