ae;lrkj
This commit is contained in:
parent
4b54683703
commit
7dbc8abb03
63 changed files with 5120 additions and 367 deletions
74
keyboards/cheapino/cheapino.c
Normal file
74
keyboards/cheapino/cheapino.c
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
#include "wait.h"
|
||||
#include "quantum.h"
|
||||
|
||||
// This is to keep state between callbacks, when it is 0 the
|
||||
// initial RGB flash is finished
|
||||
uint8_t _hue_countdown = 50;
|
||||
|
||||
// These are to keep track of user selected color, so we
|
||||
// can restore it after RGB flash
|
||||
uint8_t _hue;
|
||||
uint8_t _saturation;
|
||||
uint8_t _value;
|
||||
|
||||
// Do a little 2.5 seconds display of the different colors
|
||||
// Use the deferred executor so the LED flash dance does not
|
||||
// stop us from using the keyboard.
|
||||
// https://docs.qmk.fm/#/custom_quantum_functions?id=deferred-executor-registration
|
||||
uint32_t flash_led(uint32_t next_trigger_time, void *cb_arg) {
|
||||
rgblight_sethsv(_hue_countdown * 5, 230, 70);
|
||||
_hue_countdown--;
|
||||
if (_hue_countdown == 0) {
|
||||
// Finished, reset to user chosen led color
|
||||
rgblight_sethsv(_hue, _saturation, _value);
|
||||
return 0;
|
||||
} else {
|
||||
return 50;
|
||||
}
|
||||
}
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
//debug_enable=true;
|
||||
//debug_matrix=true;
|
||||
//debug_keyboard=true;
|
||||
//debug_mouse=true;
|
||||
|
||||
// Store user selected rgb hsv:
|
||||
_hue = rgblight_get_hue();
|
||||
_saturation = rgblight_get_sat();
|
||||
_value = rgblight_get_val();
|
||||
|
||||
// Flash a little on start
|
||||
defer_exec(50, flash_led, NULL);
|
||||
}
|
||||
|
||||
// Make the builtin RGB led show different colors per layer:
|
||||
// This seemed like a good idea but turned out pretty annoying,
|
||||
// to me at least... Uncomment the lines below to enable
|
||||
|
||||
uint8_t get_hue(uint8_t layer) {
|
||||
switch (layer) {
|
||||
case 6:
|
||||
return 169;
|
||||
case 5:
|
||||
return 43;
|
||||
case 4:
|
||||
return 85;
|
||||
case 3:
|
||||
return 120;
|
||||
case 2:
|
||||
return 180;
|
||||
case 1:
|
||||
return 220;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
uint8_t sat = rgblight_get_sat();
|
||||
uint8_t val = rgblight_get_val();
|
||||
uint8_t hue = get_hue(get_highest_layer(state));
|
||||
rgblight_sethsv(hue, sat, val);
|
||||
return state;
|
||||
}
|
||||
43
keyboards/cheapino/config.h
Normal file
43
keyboards/cheapino/config.h
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
// Copyright 2023 Thomas Haukland (@tompi)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
|
||||
#define BOTH_SHIFTS_TURNS_ON_CAPS_WORD
|
||||
#define WS2812_PIO_USE_PIO1 // Force the usage of PIO1 peripheral, by default the WS2812 implementation uses the PIO0 peripheral
|
||||
//#define WS2812_TRST_US 80
|
||||
#define WS2812_BYTE_ORDER WS2812_BYTE_ORDER_RGB
|
||||
|
||||
|
||||
// Pick good defaults for enabling homerow modifiers
|
||||
#define TAPPING_TERM 230
|
||||
|
||||
|
||||
#define WS2812_DI_PIN GP16 // The pin connected to the data pin of the LEDs
|
||||
#define RGBLIGHT_LED_COUNT 1 // The number of LEDs connected
|
||||
|
||||
|
||||
#define MAX_DEFERRED_EXECUTORS 32
|
||||
|
||||
// #define DEBUG_MATRIX_SCAN_RATE
|
||||
|
||||
#define RGBLIGHT_DEFAULT_HUE 128 // Sets the default hue value, if none has been set
|
||||
#define RGBLIGHT_DEFAULT_SAT 128 // Sets the default saturation value, if none has been set
|
||||
#define RGBLIGHT_DEFAULT_VAL 32 // Sets the default brightness value, if none has been set
|
||||
//
|
||||
63
keyboards/cheapino/encoder.c
Normal file
63
keyboards/cheapino/encoder.c
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
#include "matrix.h"
|
||||
#include "quantum.h"
|
||||
|
||||
#define COL_SHIFTER ((uint16_t)1)
|
||||
|
||||
#define ENC_ROW 3
|
||||
#define ENC_A_COL 2
|
||||
#define ENC_B_COL 4
|
||||
#define ENC_BUTTON_COL 0
|
||||
|
||||
static bool colABPressed = false;
|
||||
static bool encoderPressed = false;
|
||||
|
||||
void clicked(void) {
|
||||
tap_code(KC_MPLY);
|
||||
}
|
||||
|
||||
void turned(bool clockwise) {
|
||||
if (IS_LAYER_ON(6)) {
|
||||
tap_code(clockwise ? KC_VOLU : KC_VOLD);
|
||||
} else if (IS_LAYER_ON(3)) {
|
||||
tap_code16(clockwise ? LCTL(KC_TAB) : LCTL(LSFT(KC_TAB)));
|
||||
} else if (IS_LAYER_ON(5)) {
|
||||
tap_code16(clockwise ? LGUI(KC_Y) : LGUI(KC_Z));
|
||||
} else {
|
||||
tap_code16(clockwise ? KC_PGDN : KC_PGUP);
|
||||
}
|
||||
}
|
||||
|
||||
void fix_encoder_action(matrix_row_t current_matrix[]) {
|
||||
matrix_row_t encoder_row = current_matrix[ENC_ROW];
|
||||
|
||||
if (encoder_row & (COL_SHIFTER << ENC_BUTTON_COL)) {
|
||||
encoderPressed = true;
|
||||
} else {
|
||||
// Only trigger click on release
|
||||
if (encoderPressed) {
|
||||
encoderPressed = false;
|
||||
clicked();
|
||||
}
|
||||
}
|
||||
|
||||
// Check which way the encoder is turned:
|
||||
bool colA = encoder_row & (COL_SHIFTER << ENC_A_COL);
|
||||
bool colB = encoder_row & (COL_SHIFTER << ENC_B_COL);
|
||||
|
||||
if (colA && colB) {
|
||||
colABPressed = true;
|
||||
} else if (colA) {
|
||||
if (colABPressed) {
|
||||
// A+B followed by A means clockwise
|
||||
colABPressed = false;
|
||||
turned(true);
|
||||
}
|
||||
} else if (colB) {
|
||||
if (colABPressed) {
|
||||
// A+B followed by B means counter-clockwise
|
||||
colABPressed = false;
|
||||
turned(false);
|
||||
}
|
||||
}
|
||||
current_matrix[ENC_ROW] = 0;
|
||||
}
|
||||
5
keyboards/cheapino/encoder.h
Normal file
5
keyboards/cheapino/encoder.h
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
//
|
||||
// Created by Thomas Haukland on 25/03/2023.
|
||||
//
|
||||
|
||||
void fix_encoder_action(matrix_row_t current_matrix[]);
|
||||
128
keyboards/cheapino/ghosting.c
Normal file
128
keyboards/cheapino/ghosting.c
Normal file
|
|
@ -0,0 +1,128 @@
|
|||
//
|
||||
// Created by Thomas Haukland on 2024-05-05.
|
||||
//
|
||||
|
||||
#include "matrix.h"
|
||||
#include "quantum.h"
|
||||
#include "print.h"
|
||||
|
||||
// This is just to be able to declare constants as they appear in the qmk console
|
||||
#define rev(b) \
|
||||
((b & 1) << 15) | \
|
||||
((b & (1 << 1)) << 13) | \
|
||||
((b & (1 << 2)) << 11) | \
|
||||
((b & (1 << 3)) << 9) | \
|
||||
((b & (1 << 4)) << 7) | \
|
||||
((b & (1 << 5)) << 5) | \
|
||||
((b & (1 << 6)) << 3) | \
|
||||
((b & (1 << 7)) << 1) | \
|
||||
((b & (1 << 8)) >> 1) | \
|
||||
((b & (1 << 9)) >> 3) | \
|
||||
((b & (1 << 10)) >> 5) | \
|
||||
((b & (1 << 11)) >> 7) | \
|
||||
((b & (1 << 12)) >> 9) | \
|
||||
((b & (1 << 13)) >> 11) | \
|
||||
((b & (1 << 14)) >> 13) | \
|
||||
b >> 15
|
||||
|
||||
/* This is for debugging the matrix rows
|
||||
void printBits(uint16_t n)
|
||||
{
|
||||
long i;
|
||||
for (i = 15; i >= 0; i--) {
|
||||
if ((n & (1 << i)) != 0) {
|
||||
printf("1");
|
||||
}
|
||||
else {
|
||||
printf("0");
|
||||
}
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
*/
|
||||
|
||||
bool bit_pattern_set(uint16_t number, uint16_t bitPattern) {
|
||||
return !(~number & bitPattern);
|
||||
}
|
||||
|
||||
void fix_ghosting_instance(
|
||||
matrix_row_t current_matrix[],
|
||||
unsigned short row_num_with_possible_error_cause,
|
||||
uint16_t possible_error_cause,
|
||||
unsigned short row_num_with_possible_error,
|
||||
uint16_t possible_error,
|
||||
uint16_t error_fix) {
|
||||
if (bit_pattern_set(current_matrix[row_num_with_possible_error_cause], possible_error_cause)) {
|
||||
if (bit_pattern_set(current_matrix[row_num_with_possible_error], possible_error)) {
|
||||
current_matrix[row_num_with_possible_error] = current_matrix[row_num_with_possible_error] ^ error_fix;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void fix_ghosting_column(
|
||||
matrix_row_t matrix[],
|
||||
uint16_t possible_error_cause,
|
||||
uint16_t possible_error,
|
||||
uint16_t error_fix) {
|
||||
// First the right side
|
||||
for (short i = 0; i<3; i++) {
|
||||
fix_ghosting_instance(matrix, i, possible_error_cause, (i+1)%3, possible_error, error_fix);
|
||||
fix_ghosting_instance(matrix, i, possible_error_cause, (i+2)%3, possible_error, error_fix);
|
||||
}
|
||||
|
||||
// Then exactly same procedure on the left side
|
||||
for (short i = 0; i<3; i++) {
|
||||
fix_ghosting_instance(matrix, i+4, possible_error_cause<<6, 4+((i+1)%3), possible_error<<6, error_fix<<6);
|
||||
fix_ghosting_instance(matrix, i+4, possible_error_cause<<6, 4+((i+2)%3), possible_error<<6, error_fix<<6);
|
||||
}
|
||||
}
|
||||
|
||||
// For QWERTY layout, key combo a+s+e also outputs q. This suppresses the q, and other similar ghosts
|
||||
// These are observed ghosts(following a pattern). TODO: need to fix this for v3
|
||||
// Might need to add 2 diodes(one in each direction) for every row, to increase voltage drop.
|
||||
void fix_ghosting(matrix_row_t matrix[]) {
|
||||
fix_ghosting_column(matrix,
|
||||
rev(0B0110000000000000),
|
||||
rev(0B1010000000000000),
|
||||
rev(0B0010000000000000));
|
||||
fix_ghosting_column(matrix,
|
||||
rev(0B0110000000000000),
|
||||
rev(0B0101000000000000),
|
||||
rev(0B0100000000000000));
|
||||
|
||||
fix_ghosting_column(matrix,
|
||||
rev(0B0001100000000000),
|
||||
rev(0B0010100000000000),
|
||||
rev(0B0000100000000000));
|
||||
fix_ghosting_column(matrix,
|
||||
rev(0B0001100000000000),
|
||||
rev(0B0001010000000000),
|
||||
rev(0B0001000000000000));
|
||||
|
||||
fix_ghosting_column(matrix,
|
||||
rev(0B1000010000000000),
|
||||
rev(0B1000100000000000),
|
||||
rev(0B1000000000000000));
|
||||
fix_ghosting_column(matrix,
|
||||
rev(0B1000010000000000),
|
||||
rev(0B0100010000000000),
|
||||
rev(0B0000010000000000));
|
||||
|
||||
fix_ghosting_column(matrix,
|
||||
rev(0B1001000000000000),
|
||||
rev(0B0101000000000000),
|
||||
rev(0B0001000000000000));
|
||||
fix_ghosting_column(matrix,
|
||||
rev(0B1001000000000000),
|
||||
rev(0B1010000000000000),
|
||||
rev(0B1000000000000000));
|
||||
|
||||
fix_ghosting_column(matrix,
|
||||
rev(0B0100100000000000),
|
||||
rev(0B0100010000000000),
|
||||
rev(0B0100000000000000));
|
||||
fix_ghosting_column(matrix,
|
||||
rev(0B0100100000000000),
|
||||
rev(0B1000100000000000),
|
||||
rev(0B0000100000000000));
|
||||
}
|
||||
5
keyboards/cheapino/ghosting.h
Normal file
5
keyboards/cheapino/ghosting.h
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
//
|
||||
// Created by Thomas Haukland on 2024-05-05.
|
||||
//
|
||||
|
||||
void fix_ghosting(matrix_row_t current_matrix[]);
|
||||
8
keyboards/cheapino/halconf.h
Normal file
8
keyboards/cheapino/halconf.h
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#define HAL_USE_PWM TRUE
|
||||
#define HAL_USE_PAL TRUE
|
||||
#define HAL_USE_I2C TRUE
|
||||
|
||||
#include_next <halconf.h>
|
||||
94
keyboards/cheapino/keyboard.json
Normal file
94
keyboards/cheapino/keyboard.json
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
{
|
||||
"manufacturer": "Thomas Haukland",
|
||||
"keyboard_name": "cheapino2",
|
||||
"maintainer": "tompi",
|
||||
"bootloader": "rp2040",
|
||||
"diode_direction": "ROW2COL",
|
||||
"features": {
|
||||
"bootmagic": true,
|
||||
"command": false,
|
||||
"console": false,
|
||||
"extrakey": true,
|
||||
"mousekey": true,
|
||||
"nkro": true
|
||||
},
|
||||
"community_layouts": ["split_3x5_3"],
|
||||
"matrix_pins": {
|
||||
"cols": [
|
||||
"GP6",
|
||||
"GP6",
|
||||
"GP5",
|
||||
"GP5",
|
||||
"GP4",
|
||||
"GP4",
|
||||
|
||||
"GP14",
|
||||
"GP14",
|
||||
"GP15",
|
||||
"GP15",
|
||||
"GP26",
|
||||
"GP26"
|
||||
],
|
||||
"rows": ["GP3", "GP1", "GP2", "GP0", "GP27", "GP28", "GP29", "GP8"]
|
||||
},
|
||||
"processor": "RP2040",
|
||||
"url": "",
|
||||
"usb": {
|
||||
"device_version": "1.0.0",
|
||||
"pid": "0x0000",
|
||||
"vid": "0xFEE3",
|
||||
"force_nkro": true
|
||||
},
|
||||
"layouts": {
|
||||
"LAYOUT_split_3x5_3": {
|
||||
"layout": [
|
||||
{ "matrix": [4, 10], "x": 0, "y": 0.25 },
|
||||
{ "matrix": [4, 9], "x": 1, "y": 0.125 },
|
||||
{ "matrix": [4, 8], "x": 2, "y": 0 },
|
||||
{ "matrix": [4, 7], "x": 3, "y": 0.125 },
|
||||
{ "matrix": [4, 6], "x": 4, "y": 0.25 },
|
||||
|
||||
{ "matrix": [0, 0], "x": 7, "y": 0.25 },
|
||||
{ "matrix": [0, 1], "x": 8, "y": 0.125 },
|
||||
{ "matrix": [0, 2], "x": 9, "y": 0 },
|
||||
{ "matrix": [0, 3], "x": 10, "y": 0.125 },
|
||||
{ "matrix": [0, 4], "x": 11, "y": 0.25 },
|
||||
|
||||
|
||||
{ "matrix": [5, 10], "x": 0, "y": 1.25 },
|
||||
{ "matrix": [5, 9], "x": 1, "y": 1.125 },
|
||||
{ "matrix": [5, 8], "x": 2, "y": 1 },
|
||||
{ "matrix": [5, 7], "x": 3, "y": 1.125 },
|
||||
{ "matrix": [5, 6], "x": 4, "y": 1.25 },
|
||||
|
||||
{ "matrix": [1, 0], "x": 7, "y": 1.25 },
|
||||
{ "matrix": [1, 1], "x": 8, "y": 1.125 },
|
||||
{ "matrix": [1, 2], "x": 9, "y": 1 },
|
||||
{ "matrix": [1, 3], "x": 10, "y": 1.125 },
|
||||
{ "matrix": [1, 4], "x": 11, "y": 1.25 },
|
||||
|
||||
|
||||
{ "matrix": [6, 10], "x": 0, "y": 2.25 },
|
||||
{ "matrix": [6, 9], "x": 1, "y": 2.125 },
|
||||
{ "matrix": [6, 8], "x": 2, "y": 2 },
|
||||
{ "matrix": [6, 7], "x": 3, "y": 2.125 },
|
||||
{ "matrix": [6, 6], "x": 4, "y": 2.25 },
|
||||
|
||||
{ "matrix": [2, 0], "x": 7, "y": 2.25 },
|
||||
{ "matrix": [2, 1], "x": 8, "y": 2.125 },
|
||||
{ "matrix": [2, 2], "x": 9, "y": 2 },
|
||||
{ "matrix": [2, 3], "x": 10, "y": 2.125 },
|
||||
{ "matrix": [2, 4], "x": 11, "y": 2.25 },
|
||||
|
||||
|
||||
{ "matrix": [6, 11], "x": 2.5, "y": 3.25 },
|
||||
{ "matrix": [5, 11], "x": 3.5, "y": 3.5 },
|
||||
{ "matrix": [4, 11], "x": 4.5, "y": 3.75 },
|
||||
|
||||
{ "matrix": [0, 5], "x": 6.5, "y": 3.75 },
|
||||
{ "matrix": [1, 5], "x": 7.5, "y": 3.5 },
|
||||
{ "matrix": [2, 5], "x": 8.5, "y": 3.25 }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
163
keyboards/cheapino/keymaps/default/keymap.json
Normal file
163
keyboards/cheapino/keymaps/default/keymap.json
Normal file
|
|
@ -0,0 +1,163 @@
|
|||
{
|
||||
"version": 1,
|
||||
"notes": "Cheapino default keymap",
|
||||
"documentation": "\"This file is a QMK Configurator export. You can import this at <https://config.qmk.fm>. It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: <https://docs.qmk.fm/#/newbs>\n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n",
|
||||
"keyboard": "bastardkb/skeletyl/blackpill",
|
||||
"keymap": "default",
|
||||
"layout": "LAYOUT_split_3x5_3",
|
||||
"layers": [
|
||||
[
|
||||
"KC_Q",
|
||||
"KC_W",
|
||||
"KC_E",
|
||||
"KC_R",
|
||||
"KC_T",
|
||||
"KC_Y",
|
||||
"KC_U",
|
||||
"KC_I",
|
||||
"KC_O",
|
||||
"KC_P",
|
||||
"KC_A",
|
||||
"KC_S",
|
||||
"KC_D",
|
||||
"KC_F",
|
||||
"KC_G",
|
||||
"KC_H",
|
||||
"KC_J",
|
||||
"KC_K",
|
||||
"KC_L",
|
||||
"KC_SCLN",
|
||||
"KC_Z",
|
||||
"KC_X",
|
||||
"KC_C",
|
||||
"KC_V",
|
||||
"KC_B",
|
||||
"KC_N",
|
||||
"KC_M",
|
||||
"KC_COMM",
|
||||
"KC_DOT",
|
||||
"KC_SLSH",
|
||||
"KC_LGUI",
|
||||
"KC_SPC",
|
||||
"MO(1)",
|
||||
"MO(2)",
|
||||
"KC_ENT",
|
||||
"KC_RALT"
|
||||
],
|
||||
[
|
||||
"KC_1",
|
||||
"KC_2",
|
||||
"KC_3",
|
||||
"KC_4",
|
||||
"KC_5",
|
||||
"KC_6",
|
||||
"KC_7",
|
||||
"KC_8",
|
||||
"KC_9",
|
||||
"KC_0",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_LEFT",
|
||||
"KC_DOWN",
|
||||
"KC_UP",
|
||||
"KC_RGHT",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_LGUI",
|
||||
"KC_SPC",
|
||||
"KC_TRNS",
|
||||
"MO(3)",
|
||||
"KC_ENT",
|
||||
"KC_RALT"
|
||||
],
|
||||
[
|
||||
"KC_EXLM",
|
||||
"KC_AT",
|
||||
"KC_HASH",
|
||||
"KC_DLR",
|
||||
"KC_PERC",
|
||||
"KC_CIRC",
|
||||
"KC_AMPR",
|
||||
"KC_ASTR",
|
||||
"KC_LPRN",
|
||||
"KC_RPRN",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_MINS",
|
||||
"KC_EQL",
|
||||
"KC_LBRC",
|
||||
"KC_RBRC",
|
||||
"KC_BSLS",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_UNDS",
|
||||
"KC_PLUS",
|
||||
"KC_LCBR",
|
||||
"KC_RCBR",
|
||||
"KC_PIPE",
|
||||
"KC_LGUI",
|
||||
"KC_SPC",
|
||||
"MO(3)",
|
||||
"KC_TRNS",
|
||||
"KC_ENT",
|
||||
"KC_RALT"
|
||||
],
|
||||
[
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"RGB_HUI",
|
||||
"RGB_SAI",
|
||||
"RGB_VAI",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"RGB_HUD",
|
||||
"RGB_SAD",
|
||||
"RGB_VAD",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_LGUI",
|
||||
"KC_SPC",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_ENT",
|
||||
"KC_RALT"
|
||||
]
|
||||
],
|
||||
"author": ""
|
||||
}
|
||||
51
keyboards/cheapino/keymaps/lars/config.h
Normal file
51
keyboards/cheapino/keymaps/lars/config.h
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
Copyright 2020 Pierre Chevalier <pierrechevalier83@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
// Set the mouse settings to a comfortable speed/accuracy trade-off,
|
||||
// assuming a screen refresh rate of 60 Htz or higher
|
||||
// The default is 50. This makes the mouse ~3 times faster and more accurate
|
||||
#define MOUSEKEY_INTERVAL 16
|
||||
// The default is 20. Since we made the mouse about 3 times faster with the previous setting,
|
||||
// give it more time to accelerate to max speed to retain precise control over short distances.
|
||||
#define MOUSEKEY_TIME_TO_MAX 40
|
||||
// The default is 300. Let's try and make this as low as possible while keeping the cursor responsive
|
||||
#define MOUSEKEY_DELAY 100
|
||||
// It makes sense to use the same delay for the mouseweel
|
||||
#define MOUSEKEY_WHEEL_DELAY 100
|
||||
// The default is 100
|
||||
#define MOUSEKEY_WHEEL_INTERVAL 50
|
||||
// The default is 40
|
||||
#define MOUSEKEY_WHEEL_TIME_TO_MAX 100
|
||||
|
||||
// Pick good defaults for enabling homerow modifiers
|
||||
#undef TAPPING_TERM
|
||||
#define TAPPING_TERM 200
|
||||
// #define PERMISSIVE_HOLD
|
||||
|
||||
#define TAPPING_FORCE_HOLD
|
||||
//#define RETRO_TAPPING
|
||||
|
||||
// Underglow configuration
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
#endif
|
||||
|
||||
//#define UNICODE_SELECTED_MODES UC_MAC
|
||||
125
keyboards/cheapino/keymaps/lars/keymap.json
Normal file
125
keyboards/cheapino/keymaps/lars/keymap.json
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
{
|
||||
"version": 1,
|
||||
"notes": "My awesome keymap",
|
||||
"documentation": "\"This file is a QMK Configurator export. You can import this at <https://config.qmk.fm>. It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: <https://docs.qmk.fm/#/newbs>\n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n",
|
||||
"keyboard": "bastardkb/skeletyl/blackpill",
|
||||
"keymap": "default",
|
||||
"layout": "LAYOUT_split_3x5_3",
|
||||
"layers": [
|
||||
[
|
||||
"KC_Q",
|
||||
"KC_W",
|
||||
"KC_F",
|
||||
"KC_P",
|
||||
"KC_B",
|
||||
"KC_J",
|
||||
"KC_L",
|
||||
"KC_U",
|
||||
"KC_Y",
|
||||
"KC_SCLN",
|
||||
"KC_A",
|
||||
"KC_R",
|
||||
"KC_S",
|
||||
"KC_T",
|
||||
"KC_G",
|
||||
"KC_M",
|
||||
"KC_N",
|
||||
"KC_E",
|
||||
"KC_I",
|
||||
"KC_O",
|
||||
"LSFT_T(KC_Z)",
|
||||
"LCTL_T(KC_X)",
|
||||
"RALT_T(KC_C)",
|
||||
"KC_D",
|
||||
"KC_V",
|
||||
"KC_K",
|
||||
"KC_H",
|
||||
"RALT_T(KC_COMM)",
|
||||
"LCTL_T(KC_DOT)",
|
||||
"LSFT_T(KC_SLSH)",
|
||||
"TO(1)",
|
||||
"KC_BSPC",
|
||||
"KC_TAB",
|
||||
"KC_LGUI",
|
||||
"KC_SPC",
|
||||
"KC_ENT"
|
||||
],
|
||||
[
|
||||
"KC_TRNS",
|
||||
"KC_7",
|
||||
"KC_8",
|
||||
"KC_9",
|
||||
"KC_TRNS",
|
||||
"KC_QUOT",
|
||||
"KC_MINS",
|
||||
"KC_EQL",
|
||||
"KC_ASTR",
|
||||
"KC_CIRC",
|
||||
"KC_TRNS",
|
||||
"KC_4",
|
||||
"KC_5",
|
||||
"KC_6",
|
||||
"KC_0",
|
||||
"KC_BSLS",
|
||||
"KC_LPRN",
|
||||
"KC_RPRN",
|
||||
"KC_LBRC",
|
||||
"KC_RBRC",
|
||||
"KC_LSFT",
|
||||
"KC_1",
|
||||
"KC_2",
|
||||
"KC_3",
|
||||
"KC_TRNS",
|
||||
"KC_PIPE",
|
||||
"KC_GRV",
|
||||
"KC_LALT",
|
||||
"KC_LCTL",
|
||||
"KC_RSFT",
|
||||
"TO(2)",
|
||||
"KC_BSPC",
|
||||
"KC_TAB",
|
||||
"KC_DEL",
|
||||
"TO(0)",
|
||||
"KC_ENT"
|
||||
],
|
||||
[
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_PGUP",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"ANY(UC(0xE6))",
|
||||
"ANY(UC(0xF8))",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_LEFT",
|
||||
"KC_UP",
|
||||
"KC_DOWN",
|
||||
"KC_RGHT",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_LGUI",
|
||||
"ANY(UC(0xE5))",
|
||||
"LCTL(KC_LALT)",
|
||||
"LCA(KC_LSFT)",
|
||||
"KC_TRNS",
|
||||
"KC_HOME",
|
||||
"KC_PGDN",
|
||||
"KC_END",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_RBRC",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TAB",
|
||||
"KC_DEL",
|
||||
"TO(0)",
|
||||
"KC_TRNS"
|
||||
]
|
||||
],
|
||||
"author": "thomas.haukland@gmail.com"
|
||||
}
|
||||
277
keyboards/cheapino/keymaps/tompi/keymap.json
Normal file
277
keyboards/cheapino/keymaps/tompi/keymap.json
Normal file
|
|
@ -0,0 +1,277 @@
|
|||
{
|
||||
"version": 1,
|
||||
"notes": "Tompi keymap",
|
||||
"documentation": "\"This file is a QMK Configurator export. You can import this at <https://config.qmk.fm>. It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: <https://docs.qmk.fm/#/newbs>\n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n",
|
||||
"keyboard": "bastardkb/skeletyl/blackpill",
|
||||
"keymap": "tompi",
|
||||
"layout": "LAYOUT_split_3x5_3",
|
||||
"layers": [
|
||||
[
|
||||
"KC_Q",
|
||||
"KC_W",
|
||||
"KC_F",
|
||||
"KC_P",
|
||||
"KC_B",
|
||||
"KC_J",
|
||||
"KC_L",
|
||||
"KC_U",
|
||||
"KC_Y",
|
||||
"KC_SCLN",
|
||||
"LGUI_T(KC_A)",
|
||||
"LALT_T(KC_R)",
|
||||
"LCTL_T(KC_S)",
|
||||
"LSFT_T(KC_T)",
|
||||
"KC_G",
|
||||
"KC_M",
|
||||
"RSFT_T(KC_N)",
|
||||
"LCTL_T(KC_E)",
|
||||
"LALT_T(KC_I)",
|
||||
"LGUI_T(KC_O)",
|
||||
"KC_Z",
|
||||
"KC_X",
|
||||
"KC_C",
|
||||
"KC_D",
|
||||
"LT(5,KC_V)",
|
||||
"LT(1,KC_K)",
|
||||
"KC_H",
|
||||
"KC_COMM",
|
||||
"KC_DOT",
|
||||
"KC_SLSH",
|
||||
"LT(6,KC_ESC)",
|
||||
"LT(3,KC_SPC)",
|
||||
"LT(5,KC_TAB)",
|
||||
"LT(1,KC_DEL)",
|
||||
"LT(2,KC_BSPC)",
|
||||
"LT(4,KC_ENT)"
|
||||
],
|
||||
[
|
||||
"KC_VOLU",
|
||||
"KC_WH_L",
|
||||
"KC_NO",
|
||||
"KC_WH_U",
|
||||
"KC_WH_R",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"QK_CLEAR_EEPROM",
|
||||
"ANY(QK_RBT)",
|
||||
"KC_NO",
|
||||
"KC_MS_L",
|
||||
"KC_MS_U",
|
||||
"KC_MS_R",
|
||||
"KC_MUTE",
|
||||
"KC_NO",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_VOLD",
|
||||
"KC_MNXT",
|
||||
"KC_MS_D",
|
||||
"KC_WH_D",
|
||||
"KC_MPLY",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO"
|
||||
],
|
||||
[
|
||||
"NK_TOGG",
|
||||
"KC_HOME",
|
||||
"KC_DEL",
|
||||
"KC_PGUP",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_LEFT",
|
||||
"KC_UP",
|
||||
"KC_RGHT",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_NO",
|
||||
"KC_END",
|
||||
"KC_DOWN",
|
||||
"KC_PGDN",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_BTN1",
|
||||
"KC_BTN2",
|
||||
"KC_BTN3",
|
||||
"KC_BTN4",
|
||||
"KC_NO",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO"
|
||||
],
|
||||
[
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_WH_U",
|
||||
"KC_AT",
|
||||
"KC_UNDS",
|
||||
"KC_PIPE",
|
||||
"KC_GRV",
|
||||
"KC_PERC",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"RGB_TOG",
|
||||
"KC_HASH",
|
||||
"KC_TAB",
|
||||
"KC_EXLM",
|
||||
"KC_DQUO",
|
||||
"KC_DLR",
|
||||
"KC_BTN4",
|
||||
"KC_BTN3",
|
||||
"KC_BTN2",
|
||||
"KC_BTN1",
|
||||
"KC_WH_D",
|
||||
"KC_TILD",
|
||||
"KC_QUOT",
|
||||
"KC_BSLS",
|
||||
"KC_SLSH",
|
||||
"KC_AMPR",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_NO"
|
||||
],
|
||||
[
|
||||
"KC_GRV",
|
||||
"KC_CIRC",
|
||||
"KC_LT",
|
||||
"KC_GT",
|
||||
"KC_SCLN",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_LCBR",
|
||||
"KC_RCBR",
|
||||
"KC_LPRN",
|
||||
"KC_RPRN",
|
||||
"KC_AT",
|
||||
"KC_NO",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_MINS",
|
||||
"KC_EXLM",
|
||||
"KC_LBRC",
|
||||
"KC_RBRC",
|
||||
"KC_TRNS",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_NO",
|
||||
"KC_NO"
|
||||
],
|
||||
[
|
||||
"ANY(QK_RBT)",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_F7",
|
||||
"KC_F8",
|
||||
"KC_F9",
|
||||
"KC_F10",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_F4",
|
||||
"KC_F5",
|
||||
"KC_F6",
|
||||
"KC_F11",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_F1",
|
||||
"KC_F2",
|
||||
"KC_F3",
|
||||
"KC_F12",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS"
|
||||
],
|
||||
[
|
||||
"RGB_SPI",
|
||||
"RGB_VAI",
|
||||
"RGB_SAI",
|
||||
"RGB_HUI",
|
||||
"RGB_MOD",
|
||||
"KC_PPLS",
|
||||
"KC_7",
|
||||
"KC_8",
|
||||
"KC_9",
|
||||
"KC_PAST",
|
||||
"EE_CLR",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"RGB_TOG",
|
||||
"KC_PMNS",
|
||||
"KC_4",
|
||||
"KC_5",
|
||||
"KC_6",
|
||||
"KC_PSLS",
|
||||
"RGB_SPD",
|
||||
"RGB_VAD",
|
||||
"RGB_SAD",
|
||||
"RGB_HUD",
|
||||
"RGB_RMOD",
|
||||
"KC_PDOT",
|
||||
"KC_1",
|
||||
"KC_2",
|
||||
"KC_3",
|
||||
"KC_PEQL",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_0",
|
||||
"KC_COMM",
|
||||
"KC_0"
|
||||
]
|
||||
],
|
||||
"author": "thomas.haukland@gmail.com"
|
||||
}
|
||||
163
keyboards/cheapino/keymaps/via/keymap.json
Normal file
163
keyboards/cheapino/keymaps/via/keymap.json
Normal file
|
|
@ -0,0 +1,163 @@
|
|||
{
|
||||
"version": 1,
|
||||
"notes": "Cheapino default keymap",
|
||||
"documentation": "\"This file is a QMK Configurator export. You can import this at <https://config.qmk.fm>. It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: <https://docs.qmk.fm/#/newbs>\n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n",
|
||||
"keyboard": "bastardkb/skeletyl/blackpill",
|
||||
"keymap": "via",
|
||||
"layout": "LAYOUT_split_3x5_3",
|
||||
"layers": [
|
||||
[
|
||||
"KC_Q",
|
||||
"KC_W",
|
||||
"KC_E",
|
||||
"KC_R",
|
||||
"KC_T",
|
||||
"KC_Y",
|
||||
"KC_U",
|
||||
"KC_I",
|
||||
"KC_O",
|
||||
"KC_P",
|
||||
"LGUI_T(KC_A)",
|
||||
"LALT_T(KC_S)",
|
||||
"LCTL_T(KC_D)",
|
||||
"LSFT_T(KC_F)",
|
||||
"KC_G",
|
||||
"KC_H",
|
||||
"RSFT_T(KC_J)",
|
||||
"LCTL_T(KC_K)",
|
||||
"LALT_T(KC_L)",
|
||||
"LGUI_T(KC_SCLN)",
|
||||
"KC_Z",
|
||||
"KC_X",
|
||||
"KC_C",
|
||||
"KC_V",
|
||||
"LT(5,KC_B)",
|
||||
"LT(1,KC_N)",
|
||||
"KC_M",
|
||||
"KC_COMM",
|
||||
"KC_DOT",
|
||||
"KC_SLSH",
|
||||
"LT(6,KC_ESC)",
|
||||
"LT(3,KC_SPC)",
|
||||
"LT(5,KC_TAB)",
|
||||
"LT(1,KC_DEL)",
|
||||
"LT(2,KC_BSPC)",
|
||||
"LT(4,KC_ENT)"
|
||||
],
|
||||
[
|
||||
"KC_VOLU",
|
||||
"KC_WH_L",
|
||||
"KC_MS_U",
|
||||
"KC_WH_U",
|
||||
"KC_WH_R",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"ANY(QK_RBT)",
|
||||
"KC_MS_L",
|
||||
"KC_BTN2",
|
||||
"KC_BTN1",
|
||||
"KC_MS_R",
|
||||
"KC_MUTE",
|
||||
"KC_NO",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_VOLD",
|
||||
"KC_MNXT",
|
||||
"KC_MS_D",
|
||||
"KC_WH_D",
|
||||
"KC_MPLY",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO"
|
||||
],
|
||||
[
|
||||
"KC_NO",
|
||||
"KC_HOME",
|
||||
"KC_DEL",
|
||||
"KC_PGUP",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_LEFT",
|
||||
"KC_UP",
|
||||
"KC_RGHT",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_NO",
|
||||
"KC_END",
|
||||
"KC_DOWN",
|
||||
"KC_PGDN",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_BTN1",
|
||||
"KC_BTN2",
|
||||
"KC_BTN3",
|
||||
"KC_BTN4",
|
||||
"KC_NO",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO"
|
||||
],
|
||||
[
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_WH_U",
|
||||
"KC_AT",
|
||||
"KC_UNDS",
|
||||
"KC_PIPE",
|
||||
"KC_GRV",
|
||||
"KC_PERC",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"RGB_TOG",
|
||||
"KC_HASH",
|
||||
"KC_TAB",
|
||||
"KC_EXLM",
|
||||
"KC_DQUO",
|
||||
"KC_DLR",
|
||||
"KC_BTN4",
|
||||
"KC_BTN3",
|
||||
"KC_BTN2",
|
||||
"KC_BTN1",
|
||||
"KC_WH_D",
|
||||
"KC_TILD",
|
||||
"KC_QUOT",
|
||||
"KC_BSLS",
|
||||
"KC_SLSH",
|
||||
"KC_AMPR",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_NO"
|
||||
]
|
||||
],
|
||||
"author": "thomas.haukland@gmail.com"
|
||||
}
|
||||
8
keyboards/cheapino/keymaps/vial/config.h
Normal file
8
keyboards/cheapino/keymaps/vial/config.h
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#define VIAL_KEYBOARD_UID {0x1B, 0xE3, 0x7A, 0x67, 0xAA, 0xC6, 0x59, 0xD3}
|
||||
|
||||
#define VIAL_UNLOCK_COMBO_ROWS { 0, 2 }
|
||||
#define VIAL_UNLOCK_COMBO_COLS { 0, 3 }
|
||||
|
||||
#define DYNAMIC_KEYMAP_LAYER_COUNT 8
|
||||
163
keyboards/cheapino/keymaps/vial/keymap.json
Normal file
163
keyboards/cheapino/keymaps/vial/keymap.json
Normal file
|
|
@ -0,0 +1,163 @@
|
|||
{
|
||||
"version": 1,
|
||||
"notes": "Cheapino default keymap",
|
||||
"documentation": "\"This file is a QMK Configurator export. You can import this at <https://config.qmk.fm>. It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: <https://docs.qmk.fm/#/newbs>\n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n",
|
||||
"keyboard": "bastardkb/skeletyl/blackpill",
|
||||
"keymap": "default",
|
||||
"layout": "LAYOUT_split_3x5_3",
|
||||
"layers": [
|
||||
[
|
||||
"KC_Q",
|
||||
"KC_W",
|
||||
"KC_E",
|
||||
"KC_R",
|
||||
"KC_T",
|
||||
"KC_Y",
|
||||
"KC_U",
|
||||
"KC_I",
|
||||
"KC_O",
|
||||
"KC_P",
|
||||
"KC_A",
|
||||
"KC_S",
|
||||
"KC_D",
|
||||
"KC_F",
|
||||
"KC_G",
|
||||
"KC_H",
|
||||
"KC_J",
|
||||
"KC_K",
|
||||
"KC_L",
|
||||
"KC_SCLN",
|
||||
"KC_Z",
|
||||
"KC_X",
|
||||
"KC_C",
|
||||
"KC_V",
|
||||
"KC_B",
|
||||
"KC_N",
|
||||
"KC_M",
|
||||
"KC_COMM",
|
||||
"KC_DOT",
|
||||
"KC_SLSH",
|
||||
"KC_LGUI",
|
||||
"KC_SPC",
|
||||
"MO(1)",
|
||||
"MO(2)",
|
||||
"KC_ENT",
|
||||
"KC_RALT"
|
||||
],
|
||||
[
|
||||
"KC_1",
|
||||
"KC_2",
|
||||
"KC_3",
|
||||
"KC_4",
|
||||
"KC_5",
|
||||
"KC_6",
|
||||
"KC_7",
|
||||
"KC_8",
|
||||
"KC_9",
|
||||
"KC_0",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_LEFT",
|
||||
"KC_DOWN",
|
||||
"KC_UP",
|
||||
"KC_RGHT",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_LGUI",
|
||||
"KC_SPC",
|
||||
"KC_TRNS",
|
||||
"MO(3)",
|
||||
"KC_ENT",
|
||||
"KC_RALT"
|
||||
],
|
||||
[
|
||||
"KC_EXLM",
|
||||
"KC_AT",
|
||||
"KC_HASH",
|
||||
"KC_DLR",
|
||||
"KC_PERC",
|
||||
"KC_CIRC",
|
||||
"KC_AMPR",
|
||||
"KC_ASTR",
|
||||
"KC_LPRN",
|
||||
"KC_RPRN",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_MINS",
|
||||
"KC_EQL",
|
||||
"KC_LBRC",
|
||||
"KC_RBRC",
|
||||
"KC_BSLS",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_UNDS",
|
||||
"KC_PLUS",
|
||||
"KC_LCBR",
|
||||
"KC_RCBR",
|
||||
"KC_PIPE",
|
||||
"KC_LGUI",
|
||||
"KC_SPC",
|
||||
"MO(3)",
|
||||
"KC_TRNS",
|
||||
"KC_ENT",
|
||||
"KC_RALT"
|
||||
],
|
||||
[
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"RGB_HUI",
|
||||
"RGB_SAI",
|
||||
"RGB_VAI",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"RGB_HUD",
|
||||
"RGB_SAD",
|
||||
"RGB_VAD",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_LGUI",
|
||||
"KC_SPC",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_ENT",
|
||||
"KC_RALT"
|
||||
]
|
||||
],
|
||||
"author": ""
|
||||
}
|
||||
11
keyboards/cheapino/keymaps/vial/rules.mk
Normal file
11
keyboards/cheapino/keymaps/vial/rules.mk
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
VIA_ENABLE = yes
|
||||
VIAL_ENABLE = yes
|
||||
ENCODER_MAP_ENABLE = yes
|
||||
CAPS_WORD_ENABLE = yes
|
||||
CUSTOM_MATRIX = lite
|
||||
WS2812_DRIVER = vendor
|
||||
RGBLIGHT_ENABLE = yes
|
||||
DEFERRED_EXEC_ENABLE = yes
|
||||
SRC += encoder.c
|
||||
SRC += ghosting.c
|
||||
SRC += matrix.c
|
||||
34
keyboards/cheapino/keymaps/vial/vial.json
Normal file
34
keyboards/cheapino/keymaps/vial/vial.json
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
"name": "Cheapino2",
|
||||
"vendorId": "0xFEE3",
|
||||
"productId": "0x0002",
|
||||
"matrix": {
|
||||
"cols": 12,
|
||||
"rows": 8
|
||||
},
|
||||
"layouts": {
|
||||
"keymap": [
|
||||
[{"y":1,"x":3.5},"4,8",{"x":8.5},"0,2"],
|
||||
[{"y":-0.875,"x":2.5},"4,9",{"x":1},"4,7",{"x":6.5},"0,1",{"x":1},"0,3"],
|
||||
[{"y":-0.875,"x":5.5},"4,6",{"x":4.5},"0,0"],
|
||||
[{"y":-0.875,"x":1.5},"4,10",{"x":12.5},"0,4"],
|
||||
[{"y":-0.375,"x":3.5},"5,8",{"x":8.5},"1,2"],
|
||||
[{"y":-0.875,"x":2.5},"5,9",{"x":1},"5,7",{"x":6.5},"1,1",{"x":1},"1,3"],
|
||||
[{"y":-0.875,"x":5.5},"5,6",{"x":4.5},"1,0"],
|
||||
[{"y":-0.875,"x":1.5},"5,10",{"x":12.5},"1,4"],
|
||||
[{"y":-0.375,"x":3.5},"6,8",{"x":8.5},"2,2"],
|
||||
[{"y":-0.875,"x":2.5},"6,9",{"x":1},"6,7",{"x":6.5},"2,1",{"x":1},"2,3"],
|
||||
[{"y":-0.875,"x":5.5},"6,6",{"x":4.5},"2,0"],
|
||||
[{"y":-0.875,"x":1.5},"6,10",{"x":12.5},"2,4"],
|
||||
[{"rx":3.2,"ry":5.4,"y":-1,"x":2},"6,11"],
|
||||
[{"r":9,"rx":4.3,"ry":5.1,"y":-1,"x":2},"5,11"],
|
||||
[{"r":18,"rx":5.4,"ry":5,"y":-1,"x":2},"4,11"],
|
||||
[{"r": 0,"rx":9.3,"ry":5.4,"y":-1,"x":2},"2,5"],
|
||||
[{"r": -9,"rx":9.3,"ry":5.7,"y":-1,"x":1},"1,5"],
|
||||
[{"r": -18,"rx":9.3,"ry":5.9,"y":-1,"x":0},"0,5"],
|
||||
[{"r":0,"y":-4.2,"x":-0.5},"0,0\n\n\n\n\n\n\n\n\ne"],
|
||||
[{"r":0,"y":-1,"x":0.5},"0,1\n\n\n\n\n\n\n\n\ne"],
|
||||
[{"r":0,"y":0,"x":0},"3,0"]
|
||||
]
|
||||
}
|
||||
}
|
||||
152
keyboards/cheapino/matrix.c
Normal file
152
keyboards/cheapino/matrix.c
Normal file
|
|
@ -0,0 +1,152 @@
|
|||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copied from here: https://github.com/e3w2q/qmk_firmware/blob/762fe3e0a7cbea768245a75520f06ff5a2f00b9f/keyboards/2x3test/matrix.c
|
||||
*/
|
||||
|
||||
/*
|
||||
* scan matrix
|
||||
*/
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "wait.h"
|
||||
#include "util.h"
|
||||
#include "matrix.h"
|
||||
#include "config.h"
|
||||
#include "quantum.h"
|
||||
#include "debounce.h"
|
||||
#include "encoder.h"
|
||||
#include "ghosting.h"
|
||||
#include "print.h"
|
||||
|
||||
// How long the scanning code waits for changed io to settle.
|
||||
// Adjust from default 30 to weigh up for increased time spent ghost-hunting.
|
||||
// (the rp2040 does not seem to have any problems with this value...)
|
||||
#define MATRIX_IO_DELAY 25
|
||||
|
||||
#define COL_SHIFTER ((uint16_t)1)
|
||||
|
||||
static const pin_t row_pins[] = MATRIX_ROW_PINS;
|
||||
static const pin_t col_pins[] = MATRIX_COL_PINS;
|
||||
static matrix_row_t previous_matrix[MATRIX_ROWS];
|
||||
|
||||
static void select_row(uint8_t row) {
|
||||
setPinOutput(row_pins[row]);
|
||||
writePinLow(row_pins[row]);
|
||||
}
|
||||
|
||||
static void unselect_row(uint8_t row) { setPinInputHigh(row_pins[row]); }
|
||||
|
||||
static void unselect_rows(void) {
|
||||
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
|
||||
setPinInputHigh(row_pins[x]);
|
||||
}
|
||||
}
|
||||
|
||||
static void select_col(uint8_t col) {
|
||||
setPinOutput(col_pins[col]);
|
||||
writePinLow(col_pins[col]);
|
||||
}
|
||||
|
||||
static void unselect_col(uint8_t col) {
|
||||
setPinInputHigh(col_pins[col]);
|
||||
}
|
||||
|
||||
static void unselect_cols(void) {
|
||||
for (uint8_t x = 0; x < MATRIX_COLS/2; x++) {
|
||||
setPinInputHigh(col_pins[x*2]);
|
||||
}
|
||||
}
|
||||
|
||||
static void read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
|
||||
// Select row and wait for row selection to stabilize
|
||||
select_row(current_row);
|
||||
wait_us(MATRIX_IO_DELAY);
|
||||
|
||||
// For each col...
|
||||
for (uint8_t col_index = 0; col_index < MATRIX_COLS / 2; col_index++) {
|
||||
uint16_t column_index_bitmask = COL_SHIFTER << ((col_index * 2) + 1);
|
||||
// Check row pin state
|
||||
if (readPin(col_pins[col_index*2])) {
|
||||
// Pin HI, clear col bit
|
||||
current_matrix[current_row] &= ~column_index_bitmask;
|
||||
} else {
|
||||
// Pin LO, set col bit
|
||||
current_matrix[current_row] |= column_index_bitmask;
|
||||
}
|
||||
}
|
||||
|
||||
// Unselect row
|
||||
unselect_row(current_row);
|
||||
}
|
||||
|
||||
static void read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) {
|
||||
// Select col and wait for col selection to stabilize
|
||||
select_col(current_col*2);
|
||||
wait_us(MATRIX_IO_DELAY);
|
||||
|
||||
uint16_t column_index_bitmask = COL_SHIFTER << (current_col * 2);
|
||||
// For each row...
|
||||
for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) {
|
||||
// Check row pin state
|
||||
if (readPin(row_pins[row_index])) {
|
||||
// Pin HI, clear col bit
|
||||
current_matrix[row_index] &= ~column_index_bitmask;
|
||||
} else {
|
||||
// Pin LO, set col bit
|
||||
current_matrix[row_index] |= column_index_bitmask;
|
||||
}
|
||||
}
|
||||
// Unselect col
|
||||
unselect_col(current_col*2);
|
||||
}
|
||||
|
||||
|
||||
void matrix_init_custom(void) {
|
||||
// initialize key pins
|
||||
unselect_cols();
|
||||
unselect_rows();
|
||||
debounce_init(MATRIX_ROWS);
|
||||
}
|
||||
|
||||
void store_old_matrix(matrix_row_t current_matrix[]) {
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
previous_matrix[i] = current_matrix[i];
|
||||
}
|
||||
}
|
||||
|
||||
bool has_matrix_changed(matrix_row_t current_matrix[]) {
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
if (previous_matrix[i] != current_matrix[i]) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool matrix_scan_custom(matrix_row_t current_matrix[]) {
|
||||
store_old_matrix(current_matrix);
|
||||
// Set row, read cols
|
||||
for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) {
|
||||
read_cols_on_row(current_matrix, current_row);
|
||||
}
|
||||
// Set col, read rows
|
||||
for (uint8_t current_col = 0; current_col < MATRIX_COLS/2; current_col++) {
|
||||
read_rows_on_col(current_matrix, current_col);
|
||||
}
|
||||
|
||||
fix_encoder_action(current_matrix);
|
||||
|
||||
fix_ghosting(current_matrix);
|
||||
|
||||
return has_matrix_changed(current_matrix);
|
||||
}
|
||||
|
||||
6
keyboards/cheapino/mcuconf.h
Normal file
6
keyboards/cheapino/mcuconf.h
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef RP_I2C_USE_I2C1
|
||||
#define RP_I2C_USE_I2C1 TRUE
|
||||
27
keyboards/cheapino/readme.md
Normal file
27
keyboards/cheapino/readme.md
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# cheapino
|
||||
|
||||

|
||||
|
||||
*A short description of the keyboard/project*
|
||||
|
||||
* Keyboard Maintainer: [Thomas Haukland](https://github.com/tompi)
|
||||
* Hardware Supported: *The PCBs, controllers supported*
|
||||
* Hardware Availability: *Links to where you can find this hardware*
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make cheapino:default
|
||||
|
||||
Flashing example for this keyboard:
|
||||
|
||||
make cheapino: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).
|
||||
|
||||
## Bootloader
|
||||
|
||||
Enter the bootloader in 3 ways:
|
||||
|
||||
* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
|
||||
* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead
|
||||
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
|
||||
10
keyboards/cheapino/rules.mk
Normal file
10
keyboards/cheapino/rules.mk
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
CAPS_WORD_ENABLE = yes
|
||||
CUSTOM_MATRIX = lite
|
||||
WS2812_DRIVER = vendor
|
||||
RGBLIGHT_ENABLE = yes
|
||||
DEFERRED_EXEC_ENABLE = yes
|
||||
VIAL_INSECURE = yes
|
||||
ENCODER_ENABLE = yes
|
||||
SRC += encoder.c
|
||||
SRC += ghosting.c
|
||||
SRC += matrix.c
|
||||
|
|
@ -6,12 +6,12 @@
|
|||
"vid": "0x4653"
|
||||
},
|
||||
"features": {
|
||||
"bootmagic": true,
|
||||
"bootmagic": false,
|
||||
"extrakey": true,
|
||||
"nkro": true,
|
||||
"oled": true,
|
||||
"rgblight": false,
|
||||
"rgb_matrix": true
|
||||
"rgb_matrix": false
|
||||
},
|
||||
"bootmagic": {
|
||||
"matrix": [0, 1]
|
||||
|
|
|
|||
|
|
@ -18,13 +18,78 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#pragma once
|
||||
|
||||
#define NO_ACTION_ONESHOT
|
||||
#undef RGBLIGHT_ANIMATIONS
|
||||
#undef RGBLIGHT_EFFECT_BREATHING
|
||||
#undef RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#undef RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
#undef RGBLIGHT_EFFECT_SNAKE
|
||||
#undef RGBLIGHT_EFFECT_KNIGHT
|
||||
#undef RGBLIGHT_EFFECT_CHRISTMAS
|
||||
#undef RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
#undef RGBLIGHT_EFFECT_RGB_TEST
|
||||
#undef RGBLIGHT_EFFECT_ALTERNATING
|
||||
#undef RGBLIGHT_EFFECT_TWINKLE
|
||||
#undef ENABLE_RGB_MATRIX_ALPHAS_MODS
|
||||
#undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
|
||||
#undef ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
|
||||
#undef ENABLE_RGB_MATRIX_BREATHING
|
||||
#undef ENABLE_RGB_MATRIX_BAND_SAT
|
||||
#undef ENABLE_RGB_MATRIX_BAND_VAL
|
||||
#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
|
||||
#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
|
||||
#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
|
||||
#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
|
||||
#undef ENABLE_RGB_MATRIX_CYCLE_ALL
|
||||
#undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
|
||||
#undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
|
||||
#undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
|
||||
#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN
|
||||
#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
|
||||
#undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
|
||||
#undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL
|
||||
#undef ENABLE_RGB_MATRIX_DUAL_BEACON
|
||||
#undef ENABLE_RGB_MATRIX_RAINBOW_BEACON
|
||||
#undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
|
||||
#undef ENABLE_RGB_MATRIX_FLOWER_BLOOMING
|
||||
#undef ENABLE_RGB_MATRIX_RAINDROPS
|
||||
#undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
|
||||
#undef ENABLE_RGB_MATRIX_HUE_BREATHING
|
||||
#undef ENABLE_RGB_MATRIX_HUE_PENDULUM
|
||||
#undef ENABLE_RGB_MATRIX_HUE_WAVE
|
||||
#undef ENABLE_RGB_MATRIX_PIXEL_FRACTAL
|
||||
#undef ENABLE_RGB_MATRIX_PIXEL_FLOW
|
||||
#undef ENABLE_RGB_MATRIX_PIXEL_RAIN
|
||||
|
||||
#undef ENABLE_RGB_MATRIX_TYPING_HEATMAP
|
||||
#undef ENABLE_RGB_MATRIX_DIGITAL_RAIN
|
||||
|
||||
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
|
||||
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE
|
||||
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
|
||||
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
|
||||
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
|
||||
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
|
||||
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
|
||||
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
|
||||
#undef ENABLE_RGB_MATRIX_SPLASH
|
||||
#undef ENABLE_RGB_MATRIX_MULTISPLASH
|
||||
#undef ENABLE_RGB_MATRIX_SOLID_SPLASH
|
||||
#undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
|
||||
#ifndef NO_DEBUG
|
||||
#define NO_DEBUG
|
||||
#endif // !NO_DEBUG
|
||||
#if !defined(NO_PRINT) && !defined(CONSOLE_ENABLE)
|
||||
#define NO_PRINT
|
||||
#endif // !NO_PRINT
|
||||
#define SPLIT_USB_DETECT
|
||||
#define VIAL_KEYBOARD_UID {0x3B, 0x6B, 0xA0, 0x29, 0x80, 0x56, 0xED, 0xD1}
|
||||
#define VIAL_UNLOCK_COMBO_ROWS {0, 0}
|
||||
#define VIAL_UNLOCK_COMBO_COLS {0, 1}
|
||||
|
||||
#undef DYNAMIC_KEYMAP_LAYER_COUNT
|
||||
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
|
||||
#define TAPPING_TERM 180
|
||||
#define DYNAMIC_KEYMAP_LAYER_COUNT 3
|
||||
#define TAPPING_TERM 250
|
||||
|
||||
//#define USE_MATRIX_I2C
|
||||
#ifdef KEYBOARD_crkbd_rev1_legacy
|
||||
|
|
@ -36,20 +101,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#define MASTER_LEFT
|
||||
// #define MASTER_RIGHT
|
||||
// #define EE_HANDS
|
||||
// #define EE_HANDS"f
|
||||
|
||||
#define USE_SERIAL_PD2
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
# undef RGBLIGHT_LED_COUNT
|
||||
# define RGBLIGHT_ANIMATIONS
|
||||
# define RGBLIGHT_LED_COUNT 54
|
||||
# undef RGBLED_SPLIT
|
||||
# define RGBLED_SPLIT \
|
||||
{ 27, 27 }
|
||||
# define RGBLIGHT_LIMIT_VAL 120
|
||||
# define RGBLIGHT_HUE_STEP 10
|
||||
# define RGBLIGHT_SAT_STEP 17
|
||||
# define RGBLIGHT_VAL_STEP 17
|
||||
#endif
|
||||
|
||||
|
||||
#define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c"
|
||||
#define SPLIT_WPM_ENABLE
|
||||
#define TAPPING_FORCE_HOLD
|
||||
164
keyboards/crkbd/keymaps/vial/crkbd.c
Normal file
164
keyboards/crkbd/keymaps/vial/crkbd.c
Normal file
|
|
@ -0,0 +1,164 @@
|
|||
/*
|
||||
Copyright 2019 @foostan
|
||||
Copyright 2020 Drashna Jaelre <@drashna>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#ifdef SWAP_HANDS_ENABLE
|
||||
__attribute__((weak)) const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// Left
|
||||
{{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}},
|
||||
{{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}},
|
||||
{{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6}},
|
||||
{{0, 7}, {1, 7}, {2, 7}, {3, 7}, {4, 7}, {5, 7}},
|
||||
// Right
|
||||
{{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}},
|
||||
{{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}},
|
||||
{{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2}},
|
||||
{{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}}
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
|
||||
oled_rotation_t oled_init_kb(oled_rotation_t rotation) {
|
||||
if (!is_keyboard_master()) {
|
||||
return OLED_ROTATION_180; // flips the display 180 degrees if offhand
|
||||
}
|
||||
return rotation;
|
||||
}
|
||||
|
||||
static void oled_render_layer_state(void) {
|
||||
oled_write_P(PSTR("Layer: "), false);
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case 0:
|
||||
oled_write_ln_P(PSTR("Default"), false);
|
||||
break;
|
||||
case 1:
|
||||
oled_write_ln_P(PSTR("Lower"), false);
|
||||
break;
|
||||
case 2:
|
||||
oled_write_ln_P(PSTR("Raise"), false);
|
||||
break;
|
||||
case 3:
|
||||
oled_write_ln_P(PSTR("Adjust"), false);
|
||||
break;
|
||||
default:
|
||||
oled_write_ln_P(PSTR("Undef"), false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
char key_name = ' ';
|
||||
uint16_t last_keycode;
|
||||
uint8_t last_row;
|
||||
uint8_t last_col;
|
||||
|
||||
static const char PROGMEM code_to_name[60] = {' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', 'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\', '#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '};
|
||||
|
||||
static void set_keylog(uint16_t keycode, keyrecord_t *record) {
|
||||
// save the row and column (useful even if we can't find a keycode to show)
|
||||
last_row = record->event.key.row;
|
||||
last_col = record->event.key.col;
|
||||
|
||||
key_name = ' ';
|
||||
last_keycode = keycode;
|
||||
if (IS_QK_MOD_TAP(keycode)) {
|
||||
if (record->tap.count) {
|
||||
keycode = QK_MOD_TAP_GET_TAP_KEYCODE(keycode);
|
||||
} else {
|
||||
keycode = 0xE0 + biton(QK_MOD_TAP_GET_MODS(keycode) & 0xF) + biton(QK_MOD_TAP_GET_MODS(keycode) & 0x10);
|
||||
}
|
||||
} else if (IS_QK_LAYER_TAP(keycode) && record->tap.count) {
|
||||
keycode = QK_LAYER_TAP_GET_TAP_KEYCODE(keycode);
|
||||
} else if (IS_QK_MODS(keycode)) {
|
||||
keycode = QK_MODS_GET_BASIC_KEYCODE(keycode);
|
||||
} else if (IS_QK_ONE_SHOT_MOD(keycode)) {
|
||||
keycode = 0xE0 + biton(QK_ONE_SHOT_MOD_GET_MODS(keycode) & 0xF) + biton(QK_ONE_SHOT_MOD_GET_MODS(keycode) & 0x10);
|
||||
}
|
||||
if (keycode > ARRAY_SIZE(code_to_name)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// update keylog
|
||||
key_name = pgm_read_byte(&code_to_name[keycode]);
|
||||
}
|
||||
|
||||
static const char *depad_str(const char *depad_str, char depad_char) {
|
||||
while (*depad_str == depad_char)
|
||||
++depad_str;
|
||||
return depad_str;
|
||||
}
|
||||
|
||||
static void oled_render_keylog(void) {
|
||||
oled_write_char('0' + last_row, false);
|
||||
oled_write_P(PSTR("x"), false);
|
||||
oled_write_char('0' + last_col, false);
|
||||
oled_write_P(PSTR(", k"), false);
|
||||
const char *last_keycode_str = get_u16_str(last_keycode, ' ');
|
||||
oled_write(depad_str(last_keycode_str, ' '), false);
|
||||
oled_write_P(PSTR(":"), false);
|
||||
oled_write_char(key_name, false);
|
||||
oled_advance_page(true);
|
||||
}
|
||||
|
||||
// static void render_bootmagic_status(bool status) {
|
||||
// /* Show Ctrl-Gui Swap options */
|
||||
// static const char PROGMEM logo[][2][3] = {
|
||||
// {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}},
|
||||
// {{0x95, 0x96, 0}, {0xb5, 0xb6, 0}},
|
||||
// };
|
||||
// if (status) {
|
||||
// oled_write_ln_P(logo[0][0], false);
|
||||
// oled_write_ln_P(logo[0][1], false);
|
||||
// } else {
|
||||
// oled_write_ln_P(logo[1][0], false);
|
||||
// oled_write_ln_P(logo[1][1], false);
|
||||
// }
|
||||
// }
|
||||
|
||||
__attribute__((weak)) void oled_render_logo(void) {
|
||||
// clang-format off
|
||||
static const char PROGMEM crkbd_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};
|
||||
// clang-format on
|
||||
oled_write_P(crkbd_logo, false);
|
||||
}
|
||||
|
||||
bool oled_task_kb(void) {
|
||||
if (!oled_task_user()) {
|
||||
return false;
|
||||
}
|
||||
if (is_keyboard_master()) {
|
||||
oled_render_layer_state();
|
||||
oled_render_keylog();
|
||||
} else {
|
||||
oled_render_logo();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
set_keylog(keycode, record);
|
||||
}
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
#endif // OLED_ENABLE
|
||||
|
|
@ -54,24 +54,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT
|
||||
//`--------------------------' `--------------------------'
|
||||
),
|
||||
|
||||
[3] = LAYOUT_split_3x6_3(
|
||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT
|
||||
//`--------------------------' `--------------------------'
|
||||
)
|
||||
};
|
||||
#ifndef MAGIC_ENABLE
|
||||
uint16_t keycode_config(uint16_t keycode) {
|
||||
return keycode;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
#include <stdio.h>
|
||||
|
||||
#include <oled.c>
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||
if (!is_keyboard_master()) {
|
||||
return OLED_ROTATION_180; // flips the display 180 degrees if offhand
|
||||
|
|
@ -158,20 +151,14 @@ void oled_render_logo(void) {
|
|||
oled_write_P(crkbd_logo, false);
|
||||
}
|
||||
|
||||
bool oled_task_user(void) {
|
||||
if (is_keyboard_master()) {
|
||||
oled_render_layer_state();
|
||||
oled_render_keylog();
|
||||
} else {
|
||||
oled_render_logo();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
set_keylog(keycode, record);
|
||||
}
|
||||
return true;
|
||||
|
||||
|
||||
}
|
||||
#endif // OLED_ENABLE
|
||||
#endif // OLED_ENABL
|
||||
|
||||
|
|
|
|||
189
keyboards/crkbd/keymaps/vial/oled.c
Normal file
189
keyboards/crkbd/keymaps/vial/oled.c
Normal file
|
|
@ -0,0 +1,189 @@
|
|||
/*
|
||||
Copyright 2019 @foostan
|
||||
Copyright 2020 Drashna Jaelre <@drashna>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// OLED setup
|
||||
#define IDLE_FRAMES 5
|
||||
#define IDLE_SPEED 30
|
||||
#define TAP_FRAMES 2
|
||||
#define TAP_SPEED 40
|
||||
#define ANIM_FRAME_DURATION 200
|
||||
#define ANIM_SIZE 512
|
||||
|
||||
bool gui_on = true;
|
||||
char wpm_str[10];
|
||||
uint32_t anim_timer = 0;
|
||||
uint32_t anim_sleep = 0;
|
||||
uint8_t current_idle_frame = 0;
|
||||
uint8_t current_tap_frame = 0;
|
||||
|
||||
static long int oled_timeout = 600000; // 10 minutes
|
||||
|
||||
//
|
||||
// Rotate OLED display
|
||||
//
|
||||
//
|
||||
// Render left OLED display
|
||||
//
|
||||
static void render_status(void) {
|
||||
|
||||
// WPM
|
||||
oled_write_P(PSTR(" "), false);
|
||||
oled_write_P(PSTR(" "), false);
|
||||
sprintf(wpm_str, "%03d", get_current_wpm());
|
||||
oled_write(wpm_str, false);
|
||||
oled_write_P(PSTR(" WPM \n \n"), false);
|
||||
oled_write_P(PSTR(" \n"), false);
|
||||
|
||||
// Layer indicator
|
||||
oled_write_P(PSTR("LAYER"), false);
|
||||
oled_write_P(PSTR(" \n"), false);
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case 2:
|
||||
oled_write_P(PSTR("RAISE"), false);
|
||||
break;
|
||||
// Layer 1
|
||||
case 1:
|
||||
oled_write_P(PSTR("LOWER"), false);
|
||||
break;
|
||||
// Layer 0
|
||||
default:
|
||||
oled_write_P(PSTR("BASE "), false);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
// Render right OLED display animation
|
||||
//
|
||||
static void render_anim(void) {
|
||||
|
||||
// Idle animation
|
||||
static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = {
|
||||
|
||||
{
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,16,8,8,4,4,4,8,48,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,100,130,2,2,2,2,2,1,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,192,193,193,194,4,8,16,32,64,128,0,0,0,128,128,128,128,64,64,
|
||||
64,64,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,56,4,3,0,0,0,0,0,0,0,12,12,12,13,1,0,64,160,33,34,18,17,17,17,9,8,8,8,8,4,4,8,8,16,16,16,16,16,17,15,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,2,2,4,4,8,8,8,8,8,7,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
},
|
||||
|
||||
{
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,16,8,8,4,4,4,8,48,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,100,130,2,2,2,2,2,1,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,192,193,193,194,4,8,16,32,64,128,0,0,0,128,128,128,128,64,64,
|
||||
64,64,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,56,4,3,0,0,0,0,0,0,0,12,12,12,13,1,0,64,160,33,34,18,17,17,17,9,8,8,8,8,4,4,8,8,16,16,16,16,16,17,15,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,2,2,4,4,8,8,8,8,8,
|
||||
7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
},
|
||||
|
||||
{
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,64,64,64,64,32,32,32,32,16,8,4,2,2,4,24,96,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,194,1,1,2,2,4,4,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,96,0,129,130,130,132,8,16,32,64,128,0,0,0,0,128,128,128,128,64,64,64,64,32,
|
||||
32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,25,6,0,0,0,0,0,0,0,24,24,24,27,3,0,64,160,34,36,20,18,18,18,11,8,8,8,8,5,5,9,9,16,16,16,16,16,17,15,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,2,2,4,4,8,8,8,8,8,7,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
},
|
||||
|
||||
{
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,8,4,2,1,1,2,12,48,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,225,0,0,1,1,2,2,1,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,192,193,193,194,4,8,16,32,64,128,0,0,0,128,128,128,128,64,64,
|
||||
64,64,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,12,3,0,0,0,0,0,0,0,12,12,12,13,1,0,64,160,33,34,18,17,17,17,9,8,8,8,8,4,4,8,8,16,16,16,16,16,17,15,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,2,2,4,4,8,8,8,8,8,
|
||||
7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
},
|
||||
|
||||
{
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,8,8,4,2,2,2,4,56,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,226,1,1,2,2,2,2,1,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,192,193,193,194,4,8,16,32,64,128,0,0,0,128,128,128,128,64,64,64,64,
|
||||
32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,12,3,0,0,0,0,0,0,0,12,12,12,13,1,0,64,160,33,34,18,17,17,17,9,8,8,8,8,4,4,8,8,16,16,16,16,16,17,15,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,2,2,4,4,8,8,8,8,8,7,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Prep animation
|
||||
static const char PROGMEM prep[][ANIM_SIZE] = {
|
||||
|
||||
{
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,8,4,2,1,1,2,12,48,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,225,0,0,1,1,2,2,129,128,128,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,0,1,225,26,6,9,49,53,1,138,124,0,0,128,128,128,128,64,64,
|
||||
64,64,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,12,3,0,0,24,6,5,152,153,132,195,124,65,65,64,64,32,33,34,18,17,17,17,9,8,8,8,8,4,4,4,4,4,4,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Typing animation
|
||||
static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = {
|
||||
|
||||
{
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,8,4,2,1,1,2,12,48,64,128,0,0,0,0,0,0,0,248,248,248,248,0,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,225,0,0,1,1,2,2,129,128,128,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,0,1,1,2,4,8,16,32,67,135,7,1,0,184,188,190,159,
|
||||
95,95,79,76,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,12,3,0,0,24,6,5,152,153,132,67,124,65,65,64,64,32,33,34,18,17,17,17,9,8,8,8,8,4,4,8,8,16,16,16,16,16,17,15,1,61,124,252,252,252,252,252,60,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,
|
||||
1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
},
|
||||
|
||||
{
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,8,4,2,1,1,2,12,48,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,225,0,0,1,1,2,2,1,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,0,1,225,26,6,9,49,53,1,138,124,0,0,128,128,128,128,64,64,64,64,32,
|
||||
32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,12,3,0,0,0,0,0,0,0,0,0,0,1,1,0,64,160,33,34,18,17,17,17,9,8,8,8,8,4,4,4,4,4,4,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,122,122,121,121,121,121,57,49,2,2,4,4,8,8,8,136,136,135,128,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
void animation_phase(void) {
|
||||
|
||||
if (get_current_wpm() <=IDLE_SPEED) {
|
||||
current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES;
|
||||
oled_write_raw_P(idle[abs((IDLE_FRAMES-1)-current_idle_frame)], ANIM_SIZE);
|
||||
}
|
||||
|
||||
if (get_current_wpm() >IDLE_SPEED && get_current_wpm() <TAP_SPEED) {
|
||||
oled_write_raw_P(prep[0], ANIM_SIZE);
|
||||
}
|
||||
|
||||
if (get_current_wpm() >=TAP_SPEED) {
|
||||
current_tap_frame = (current_tap_frame + 1) % TAP_FRAMES;
|
||||
oled_write_raw_P(tap[abs((TAP_FRAMES-1)-current_tap_frame)], ANIM_SIZE);
|
||||
}
|
||||
}
|
||||
|
||||
if (get_current_wpm() != 000) {
|
||||
oled_on();
|
||||
|
||||
if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) {
|
||||
anim_timer = timer_read32();
|
||||
animation_phase();
|
||||
}
|
||||
|
||||
anim_sleep = timer_read32();
|
||||
} else {
|
||||
if (timer_elapsed32(anim_sleep) > oled_timeout) {
|
||||
oled_off();
|
||||
} else {
|
||||
if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) {
|
||||
anim_timer = timer_read32();
|
||||
animation_phase();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// OLED display rendering
|
||||
//
|
||||
bool oled_task_user(void) {
|
||||
if (is_keyboard_master()) {
|
||||
// Left side
|
||||
render_status();
|
||||
} else {
|
||||
// Right side
|
||||
render_anim();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
@ -2,12 +2,20 @@ VIA_ENABLE = yes
|
|||
VIAL_ENABLE = yes
|
||||
LTO_ENABLE = yes
|
||||
|
||||
RGBLIGHT_ENABLE = yes
|
||||
RGBLIGHT_ENABLE = no
|
||||
RGB_MATRIX_ENABLE = no # Can't have RGBLIGHT and RGB_MATRIX at the same time.
|
||||
MOUSEKEY_ENABLE = no
|
||||
OLED_ENABLE = no
|
||||
OLED_DRIVER = SSD1306
|
||||
OLED_ENABLE = yes
|
||||
EXTRAKEY_ENABLE = no
|
||||
COMBO_ENABLE = no
|
||||
|
||||
WPM_ENABLE = yes
|
||||
QMK_SETTINGS = no
|
||||
EXTRAFLAGS += -flto
|
||||
CONSOLE_ENABLE = no
|
||||
AUDIO_ENABLE = no
|
||||
LINK_TIME_OPTIMIZATION_ENABLE = yes
|
||||
SPACE_CADET_ENABLE=no
|
||||
COMMAND_ENABLE = no
|
||||
GRAVE_ESC_ENABLE = no
|
||||
MAGIC_ENABLE = no
|
||||
AVR_USE_MINIMAL_PRINTF = yes
|
||||
|
|
|
|||
|
|
@ -1,233 +0,0 @@
|
|||
{
|
||||
"keyboard_name": "Corne",
|
||||
"usb": {
|
||||
"pid": "0x0001",
|
||||
"device_version": "0.0.1"
|
||||
},
|
||||
"processor": "atmega32u4",
|
||||
"features": {
|
||||
"rgb_matrix": true
|
||||
},
|
||||
"build": {
|
||||
"lto": true
|
||||
},
|
||||
"matrix_pins": {
|
||||
"cols": [ "F4", "F5", "F6", "F7", "B1", "B3" ],
|
||||
"rows": [ "D4", "C6", "D7", "E6" ]
|
||||
},
|
||||
"diode_direction": "COL2ROW",
|
||||
"split": {
|
||||
"serial": {
|
||||
"pin": "D2"
|
||||
},
|
||||
"transport": {
|
||||
"sync": {
|
||||
"matrix_state": true
|
||||
}
|
||||
},
|
||||
"usb_detect": {
|
||||
"enabled": true
|
||||
}
|
||||
},
|
||||
"rgblight": {
|
||||
"led_count": 54,
|
||||
"split_count": [27, 27],
|
||||
"animations": {
|
||||
"breathing": true,
|
||||
"rainbow_mood": true,
|
||||
"rainbow_swirl": true,
|
||||
"snake": true,
|
||||
"knight": true,
|
||||
"christmas": true,
|
||||
"static_gradient": true,
|
||||
"rgb_test": true,
|
||||
"alternating": true,
|
||||
"twinkle": true
|
||||
}
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "D3"
|
||||
},
|
||||
"bootloader": "atmel-dfu",
|
||||
"layout_aliases": {
|
||||
"LAYOUT": "LAYOUT_split_3x6_3"
|
||||
},
|
||||
"community_layouts": [ "split_3x5_3", "split_3x6_3" ],
|
||||
"layouts": {
|
||||
"LAYOUT_split_3x5_3": {
|
||||
"layout": [
|
||||
{"matrix": [0, 1], "x": 0, "y": 0.3},
|
||||
{"matrix": [0, 2], "x": 1, "y": 0.1},
|
||||
{"matrix": [0, 3], "x": 2, "y": 0},
|
||||
{"matrix": [0, 4], "x": 3, "y": 0.1},
|
||||
{"matrix": [0, 5], "x": 4, "y": 0.2},
|
||||
|
||||
{"matrix": [4, 5], "x": 8, "y": 0.2},
|
||||
{"matrix": [4, 4], "x": 9, "y": 0.1},
|
||||
{"matrix": [4, 3], "x": 10, "y": 0},
|
||||
{"matrix": [4, 2], "x": 11, "y": 0.1},
|
||||
{"matrix": [4, 1], "x": 12, "y": 0.3},
|
||||
|
||||
{"matrix": [1, 1], "x": 0, "y": 1.3},
|
||||
{"matrix": [1, 2], "x": 1, "y": 1.1},
|
||||
{"matrix": [1, 3], "x": 2, "y": 1},
|
||||
{"matrix": [1, 4], "x": 3, "y": 1.1},
|
||||
{"matrix": [1, 5], "x": 4, "y": 1.2},
|
||||
|
||||
{"matrix": [5, 5], "x": 8, "y": 1.2},
|
||||
{"matrix": [5, 4], "x": 9, "y": 1.1},
|
||||
{"matrix": [5, 3], "x": 10, "y": 1},
|
||||
{"matrix": [5, 2], "x": 11, "y": 1.1},
|
||||
{"matrix": [5, 1], "x": 12, "y": 1.3},
|
||||
|
||||
{"matrix": [2, 1], "x": 0, "y": 2.3},
|
||||
{"matrix": [2, 2], "x": 1, "y": 2.1},
|
||||
{"matrix": [2, 3], "x": 2, "y": 2},
|
||||
{"matrix": [2, 4], "x": 3, "y": 2.1},
|
||||
{"matrix": [2, 5], "x": 4, "y": 2.2},
|
||||
|
||||
{"matrix": [6, 5], "x": 8, "y": 2.2},
|
||||
{"matrix": [6, 4], "x": 9, "y": 2.1},
|
||||
{"matrix": [6, 3], "x": 10, "y": 2},
|
||||
{"matrix": [6, 2], "x": 11, "y": 2.1},
|
||||
{"matrix": [6, 1], "x": 12, "y": 2.3},
|
||||
|
||||
{"matrix": [3, 3], "x": 3, "y": 3.7},
|
||||
{"matrix": [3, 4], "x": 4, "y": 3.7},
|
||||
{"matrix": [3, 5], "x": 5, "y": 3.2, "h": 1.5},
|
||||
|
||||
{"matrix": [7, 5], "x": 7, "y": 3.2, "h": 1.5},
|
||||
{"matrix": [7, 4], "x": 8, "y": 3.7},
|
||||
{"matrix": [7, 3], "x": 9, "y": 3.7}
|
||||
]
|
||||
},
|
||||
"LAYOUT_split_3x6_3": {
|
||||
"layout": [
|
||||
{"matrix": [0, 0], "x": 0, "y": 0.3},
|
||||
{"matrix": [0, 1], "x": 1, "y": 0.3},
|
||||
{"matrix": [0, 2], "x": 2, "y": 0.1},
|
||||
{"matrix": [0, 3], "x": 3, "y": 0},
|
||||
{"matrix": [0, 4], "x": 4, "y": 0.1},
|
||||
{"matrix": [0, 5], "x": 5, "y": 0.2},
|
||||
|
||||
{"matrix": [4, 5], "x": 9, "y": 0.2},
|
||||
{"matrix": [4, 4], "x": 10, "y": 0.1},
|
||||
{"matrix": [4, 3], "x": 11, "y": 0},
|
||||
{"matrix": [4, 2], "x": 12, "y": 0.1},
|
||||
{"matrix": [4, 1], "x": 13, "y": 0.3},
|
||||
{"matrix": [4, 0], "x": 14, "y": 0.3},
|
||||
|
||||
{"matrix": [1, 0], "x": 0, "y": 1.3},
|
||||
{"matrix": [1, 1], "x": 1, "y": 1.3},
|
||||
{"matrix": [1, 2], "x": 2, "y": 1.1},
|
||||
{"matrix": [1, 3], "x": 3, "y": 1},
|
||||
{"matrix": [1, 4], "x": 4, "y": 1.1},
|
||||
{"matrix": [1, 5], "x": 5, "y": 1.2},
|
||||
|
||||
{"matrix": [5, 5], "x": 9, "y": 1.2},
|
||||
{"matrix": [5, 4], "x": 10, "y": 1.1},
|
||||
{"matrix": [5, 3], "x": 11, "y": 1},
|
||||
{"matrix": [5, 2], "x": 12, "y": 1.1},
|
||||
{"matrix": [5, 1], "x": 13, "y": 1.3},
|
||||
{"matrix": [5, 0], "x": 14, "y": 1.3},
|
||||
|
||||
{"matrix": [2, 0], "x": 0, "y": 2.3},
|
||||
{"matrix": [2, 1], "x": 1, "y": 2.3},
|
||||
{"matrix": [2, 2], "x": 2, "y": 2.1},
|
||||
{"matrix": [2, 3], "x": 3, "y": 2},
|
||||
{"matrix": [2, 4], "x": 4, "y": 2.1},
|
||||
{"matrix": [2, 5], "x": 5, "y": 2.2},
|
||||
|
||||
{"matrix": [6, 5], "x": 9, "y": 2.2},
|
||||
{"matrix": [6, 4], "x": 10, "y": 2.1},
|
||||
{"matrix": [6, 3], "x": 11, "y": 2},
|
||||
{"matrix": [6, 2], "x": 12, "y": 2.1},
|
||||
{"matrix": [6, 1], "x": 13, "y": 2.3},
|
||||
{"matrix": [6, 0], "x": 14, "y": 2.3},
|
||||
|
||||
{"matrix": [3, 3], "x": 4, "y": 3.7},
|
||||
{"matrix": [3, 4], "x": 5, "y": 3.7},
|
||||
{"matrix": [3, 5], "x": 6, "y": 3.2, "h": 1.5},
|
||||
|
||||
{"matrix": [7, 5], "x": 8, "y": 3.2, "h": 1.5},
|
||||
{"matrix": [7, 4], "x": 9, "y": 3.7},
|
||||
{"matrix": [7, 3], "x": 10, "y": 3.7}
|
||||
]
|
||||
}
|
||||
},
|
||||
"rgb_matrix": {
|
||||
"animations": {
|
||||
"alphas_mods": true,
|
||||
"gradient_up_down": true,
|
||||
"gradient_left_right": true,
|
||||
"breathing": true,
|
||||
"band_sat": true,
|
||||
"band_val": true,
|
||||
"band_spiral_sat": true,
|
||||
"band_spiral_val": true,
|
||||
"cycle_all": true,
|
||||
"rainbow_moving_chevron": true,
|
||||
"cycle_spiral": true,
|
||||
"raindrops": true,
|
||||
"hue_breathing": true,
|
||||
"pixel_fractal": true
|
||||
},
|
||||
"split_count": [27, 27],
|
||||
"layout": [
|
||||
{"x": 85, "y": 16, "flags": 2},
|
||||
{"x": 50, "y": 13, "flags": 2},
|
||||
{"x": 16, "y": 20, "flags": 2},
|
||||
{"x": 16, "y": 38, "flags": 2},
|
||||
{"x": 50, "y": 48, "flags": 2},
|
||||
{"x": 85, "y": 52, "flags": 2},
|
||||
{"matrix": [3, 5], "x": 95, "y": 63, "flags": 1},
|
||||
{"matrix": [2, 5], "x": 85, "y": 39, "flags": 4},
|
||||
{"matrix": [1, 5], "x": 85, "y": 21, "flags": 4},
|
||||
{"matrix": [0, 5], "x": 85, "y": 4, "flags": 4},
|
||||
{"matrix": [0, 4], "x": 68, "y": 2, "flags": 4},
|
||||
{"matrix": [1, 4], "x": 68, "y": 19, "flags": 4},
|
||||
{"matrix": [2, 4], "x": 68, "y": 37, "flags": 4},
|
||||
{"matrix": [3, 4], "x": 80, "y": 58, "flags": 1},
|
||||
{"matrix": [3, 3], "x": 60, "y": 55, "flags": 1},
|
||||
{"matrix": [2, 3], "x": 50, "y": 35, "flags": 4},
|
||||
{"matrix": [1, 3], "x": 50, "y": 13, "flags": 4},
|
||||
{"matrix": [0, 3], "x": 50, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 2], "x": 33, "y": 3, "flags": 4},
|
||||
{"matrix": [1, 2], "x": 33, "y": 20, "flags": 4},
|
||||
{"matrix": [2, 2], "x": 33, "y": 37, "flags": 4},
|
||||
{"matrix": [2, 1], "x": 16, "y": 42, "flags": 4},
|
||||
{"matrix": [1, 1], "x": 16, "y": 24, "flags": 4},
|
||||
{"matrix": [0, 1], "x": 16, "y": 7, "flags": 4},
|
||||
{"matrix": [0, 0], "x": 0, "y": 7, "flags": 1},
|
||||
{"matrix": [1, 0], "x": 0, "y": 24, "flags": 1},
|
||||
{"matrix": [2, 0], "x": 0, "y": 41, "flags": 1},
|
||||
{"x": 139, "y": 16, "flags": 2},
|
||||
{"x": 174, "y": 13, "flags": 2},
|
||||
{"x": 208, "y": 20, "flags": 2},
|
||||
{"x": 208, "y": 38, "flags": 2},
|
||||
{"x": 174, "y": 48, "flags": 2},
|
||||
{"x": 139, "y": 52, "flags": 2},
|
||||
{"matrix": [7, 5], "x": 129, "y": 63, "flags": 1},
|
||||
{"matrix": [6, 5], "x": 139, "y": 39, "flags": 4},
|
||||
{"matrix": [5, 5], "x": 139, "y": 21, "flags": 4},
|
||||
{"matrix": [4, 5], "x": 139, "y": 4, "flags": 4},
|
||||
{"matrix": [4, 4], "x": 156, "y": 2, "flags": 4},
|
||||
{"matrix": [5, 4], "x": 156, "y": 19, "flags": 4},
|
||||
{"matrix": [6, 4], "x": 156, "y": 37, "flags": 4},
|
||||
{"matrix": [7, 4], "x": 144, "y": 58, "flags": 1},
|
||||
{"matrix": [7, 3], "x": 164, "y": 55, "flags": 1},
|
||||
{"matrix": [6, 3], "x": 174, "y": 35, "flags": 4},
|
||||
{"matrix": [5, 3], "x": 174, "y": 13, "flags": 4},
|
||||
{"matrix": [4, 3], "x": 174, "y": 0, "flags": 4},
|
||||
{"matrix": [4, 2], "x": 191, "y": 3, "flags": 4},
|
||||
{"matrix": [5, 2], "x": 191, "y": 20, "flags": 4},
|
||||
{"matrix": [6, 2], "x": 191, "y": 37, "flags": 4},
|
||||
{"matrix": [6, 1], "x": 208, "y": 42, "flags": 4},
|
||||
{"matrix": [5, 1], "x": 208, "y": 24, "flags": 4},
|
||||
{"matrix": [4, 1], "x": 208, "y": 7, "flags": 4},
|
||||
{"matrix": [4, 0], "x": 224, "y": 7, "flags": 1},
|
||||
{"matrix": [5, 0], "x": 224, "y": 24, "flags": 1},
|
||||
{"matrix": [6, 0], "x": 224, "y": 41, "flags": 1}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 @foostan
|
||||
Copyright 2020 Drashna Jaelre <@drashna>
|
||||
Copyright 2021 Elliot Powell @e11i0t23
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "quantum.h"
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
void oled_render_logo(void) {
|
||||
static const char PROGMEM mb_logo[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f,
|
||||
0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0xff, 0xff, 0x83, 0x83, 0x83, 0x83, 0x83, 0xff, 0xff,
|
||||
0x83, 0x83, 0x83, 0x83, 0xff, 0xff, 0x83, 0x83, 0x83, 0x83, 0x83, 0xff, 0xff, 0x83, 0x83, 0x83,
|
||||
0x83, 0xff, 0xff, 0x83, 0x83, 0x83, 0x83, 0x83, 0xff, 0xff, 0xff, 0xff, 0x82, 0x82, 0x82, 0x82,
|
||||
0x82, 0xff, 0xff, 0x83, 0x83, 0x83, 0x83, 0xff, 0xff, 0x83, 0x83, 0x83, 0x83, 0x83, 0xff, 0xff,
|
||||
0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xfc, 0xfc, 0xfc,
|
||||
0x9c, 0x9c, 0xfc, 0xfc, 0xf8, 0xf8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x78, 0x7c, 0x3c,
|
||||
0x9c, 0xfc, 0xfc, 0xf8, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf0, 0xf8, 0xf8, 0x3c, 0x3c,
|
||||
0x9c, 0xbc, 0xfc, 0xb8, 0xb8, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x41, 0x41, 0x41, 0x41, 0x41, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x41, 0x41, 0x41, 0x41, 0x41, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0x41, 0x41, 0x41, 0x41, 0x41, 0xff, 0xff, 0xff, 0xff, 0x41, 0x41, 0x41, 0x41,
|
||||
0x41, 0xff, 0xff, 0x7f, 0x7f, 0x7f, 0x7f, 0xff, 0xff, 0x41, 0x41, 0x41, 0x41, 0x41, 0xff, 0xff,
|
||||
0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x3f, 0x3f, 0x3f,
|
||||
0x03, 0x07, 0x0f, 0x3f, 0x3f, 0x3e, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0x3c, 0x3e, 0x3f,
|
||||
0x3f, 0x3f, 0x3b, 0x39, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0f, 0x1f, 0x3f, 0x3c, 0x38,
|
||||
0x3b, 0x3b, 0x3f, 0x1f, 0x1f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0,
|
||||
0xf0, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff,
|
||||
0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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(mb_logo, sizeof(mb_logo));
|
||||
//oled_set_cursor(oled_max_chars()/2,oled_max_lines()/2);
|
||||
//oled_write_P(PSTR("R2G"), false);
|
||||
}
|
||||
#endif
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
# Corne R2G
|
||||
|
||||

|
||||
|
||||
An Eddition of the popular CRKBD featuring a full smd assembly
|
||||
|
||||
Keyboard Maintainer: [e11i0t23](https://github.com/e11i0t23/), [Mechboards UK](https://mechboards.co.uk)
|
||||
Hardware Supported: CRKBD R2G PCB
|
||||
Hardware Availability: [Mechboards UK](https://mechboards.co.uk/products/helidox-corne-kit?variant=40391708213453)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
```sh
|
||||
make crkbd/r2g:mb_via
|
||||
```
|
||||
|
||||
Flash example for this keyboard:
|
||||
```sh
|
||||
qmk flash -kb crkbd/r2g -km mb_via
|
||||
```
|
||||
|
||||
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).
|
||||
|
||||
## Bootloader
|
||||
|
||||
These PCBs have a reset on the underside of the PCB next to the TRRS jack to enter in to the bootloader.
|
||||
|
||||
Additionally, if you hold down the "Q" or "P" buttons when plugging in that half of the keyboard (per the default QWERTY layout), this will jump to the bootloader and reset the EEPROM (persistent storage).
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
"device_version": "0.0.1"
|
||||
},
|
||||
"features": {
|
||||
"rgblight": true
|
||||
"rgblight": false
|
||||
},
|
||||
"build": {
|
||||
"lto": true
|
||||
|
|
|
|||
20
keyboards/crkbd/rules.mk
Normal file
20
keyboards/crkbd/rules.mk
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
LTO_ENABLE = yes
|
||||
|
||||
RGBLIGHT_ENABLE = no
|
||||
RGB_MATRIX_ENABLE = no # Can't have RGBLIGHT and RGB_MATRIX at the same time.
|
||||
MOUSEKEY_ENABLE = no
|
||||
OLED_ENABLE = yes
|
||||
OLED_DRIVER = ssd1306
|
||||
EXTRAKEY_ENABLE = no
|
||||
COMBO_ENABLE = no
|
||||
WPM_ENABLE = yes
|
||||
QMK_SETTINGS = no
|
||||
EXTRAFLAGS += -flto
|
||||
CONSOLE_ENABLE = no
|
||||
AUDIO_ENABLE = no
|
||||
LINK_TIME_OPTIMIZATION_ENABLE = yes
|
||||
SPACE_CADET_ENABLE=no
|
||||
COMMAND_ENABLE = no
|
||||
GRAVE_ESC_ENABLE = no
|
||||
MAGIC_ENABLE = no
|
||||
AVR_USE_MINIMAL_PRINTF = yes
|
||||
85
keyboards/lil40/keyboard.json
Normal file
85
keyboards/lil40/keyboard.json
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
{
|
||||
"manufacturer": "shmokebud",
|
||||
"keyboard_name": "lil40",
|
||||
"maintainer": "shmokebud",
|
||||
"bootloader": "rp2040",
|
||||
"diode_direction": "COL2ROW",
|
||||
"features": {
|
||||
"bootmagic": true,
|
||||
"command": false,
|
||||
"console": false,
|
||||
"extrakey": true,
|
||||
"mousekey": true,
|
||||
"nkro": true
|
||||
},
|
||||
"matrix_pins": {
|
||||
"cols": ["GP4", "GP5", "GP6" "GP7" "GP8" "GP9" "GP10" "GP11" "GP12" "GP13" "GP14" "GP15"],
|
||||
"rows": ["GP0", "GP1", "GP2", "GP3"]
|
||||
},
|
||||
"encoder": {
|
||||
"rotary": [
|
||||
{"pin_a": "GP27", "pin_b": "GP28", "resolution": 4 },
|
||||
]
|
||||
},
|
||||
"processor": "RP2040",
|
||||
"url": "",
|
||||
"usb": {
|
||||
"device_version": "1.0.0",
|
||||
"pid": "0x0000",
|
||||
"vid": "0xFEED"
|
||||
},
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"matrix": [0, 0], "x": 0, "y": 0},
|
||||
{"matrix": [0, 1], "x": 1, "y": 0},
|
||||
{"matrix": [0, 2], "x": 2, "y": 0},
|
||||
{"matrix": [0, 3], "x": 3, "y": 0},
|
||||
{"matrix": [0, 4], "x": 4, "y": 0},
|
||||
{"matrix": [0, 5], "x": 5, "y": 0},
|
||||
{"matrix": [0, 6], "x": 6, "y": 0},
|
||||
{"matrix": [0, 7], "x": 7, "y": 0},
|
||||
{"matrix": [0, 8], "x": 8, "y": 0},
|
||||
{"matrix": [0, 9], "x": 9, "y": 0},
|
||||
{"matrix": [0, 10], "x": 10, "y": 0},
|
||||
{"matrix": [0, 11], "x": 11, "y": 0},
|
||||
{"matrix": [1, 0], "x": 0, "y": 1},
|
||||
{"matrix": [1, 1], "x": 1, "y": 1},
|
||||
{"matrix": [1, 2], "x": 2, "y": 1},
|
||||
{"matrix": [1, 3], "x": 3, "y": 1},
|
||||
{"matrix": [1, 4], "x": 4, "y": 1},
|
||||
{"matrix": [1, 5], "x": 5, "y": 1},
|
||||
{"matrix": [1, 6], "x": 6, "y": 1},
|
||||
{"matrix": [1, 7], "x": 7, "y": 1},
|
||||
{"matrix": [1, 8], "x": 8, "y": 1},
|
||||
{"matrix": [1, 9], "x": 9, "y": 1},
|
||||
{"matrix": [1, 10], "x": 10, "y": 1},
|
||||
{"matrix": [1, 11], "x": 11, "y": 1},
|
||||
{"matrix": [2, 0], "x": 0, "y": 2},
|
||||
{"matrix": [2, 1], "x": 1, "y": 2},
|
||||
{"matrix": [2, 2], "x": 2, "y": 2},
|
||||
{"matrix": [2, 3], "x": 3, "y": 2},
|
||||
{"matrix": [2, 4], "x": 4, "y": 2},
|
||||
{"matrix": [2, 5], "x": 5, "y": 2},
|
||||
{"matrix": [2, 6], "x": 6, "y": 2},
|
||||
{"matrix": [2, 7], "x": 7, "y": 2},
|
||||
{"matrix": [2, 8], "x": 8, "y": 2},
|
||||
{"matrix": [2, 9], "x": 9, "y": 2},
|
||||
{"matrix": [2, 10], "x": 10, "y": 2},
|
||||
{"matrix": [2, 11], "x": 11, "y": 2},
|
||||
{"matrix": [3, 0], "x": 0, "y": 3},
|
||||
{"matrix": [3, 1], "x": 1, "y": 3},
|
||||
{"matrix": [3, 2], "x": 2, "y": 3},
|
||||
{"matrix": [3, 3], "x": 3, "y": 3},
|
||||
{"matrix": [3, 4], "x": 4, "y": 3},
|
||||
{"matrix": [3, 5], "x": 5, "y": 3},
|
||||
{"matrix": [3, 6], "x": 6, "y": 3},
|
||||
{"matrix": [3, 7], "x": 7, "y": 3},
|
||||
{"matrix": [3, 8], "x": 8, "y": 3},
|
||||
{"matrix": [3, 9], "x": 9, "y": 3},
|
||||
{"matrix": [3, 10], "x": 10, "y": 3},
|
||||
{"matrix": [3, 11], "x": 11, "y": 3},
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
37
keyboards/lil40/keymaps/default/keymap.c
Normal file
37
keyboards/lil40/keymaps/default/keymap.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
// Copyright 2023 QMK
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Caps | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
|
||||
[0] = LAYOUT(
|
||||
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_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_A, KC_A, KC_SPC, KC_SPC, KC_A, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
)
|
||||
};
|
||||
|
||||
#if defined(ENCODER_MAP_ENABLE)
|
||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
|
||||
[0] = { ENCODER_CCW_CW(KC_PGUP, KC_PGDN),
|
||||
[1] = { ENCODER_CCW_CW(_______, _______),
|
||||
[2] = { ENCODER_CCW_CW(_______, _______),
|
||||
[3] = { ENCODER_CCW_CW(_______, _______),
|
||||
[4] = { ENCODER_CCW_CW(_______, _______),
|
||||
[5] = { ENCODER_CCW_CW(_______, _______)
|
||||
};
|
||||
#endif
|
||||
10
keyboards/lil40/keymaps/vial/config.h
Normal file
10
keyboards/lil40/keymaps/vial/config.h
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
#pragma once
|
||||
|
||||
#define VIAL_KEYBOARD_UID {0x61, 0x9F, 0xA5, 0x07, 0x10, 0x14, 0x07, 0x43}
|
||||
#define DYNAMIC_KEYMAP_LAYER_COUNT 8
|
||||
//1 Encoder
|
||||
#define ENCODERS_PAD { encoderA, encoderB }
|
||||
#define ENCODER_A_PINS { GP27 }
|
||||
#define ENCODER_B_PINS { GP28 }
|
||||
36
keyboards/lil40/keymaps/vial/keymap.c
Normal file
36
keyboards/lil40/keymaps/vial/keymap.c
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright 2023 QMK
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Caps | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
|
||||
[0] = LAYOUT(
|
||||
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_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_A, KC_A, KC_SPC, KC_SPC, KC_A, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
)
|
||||
};
|
||||
|
||||
#if defined(ENCODER_MAP_ENABLE)
|
||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
|
||||
[0] = { ENCODER_CCW_CW(KC_V, KC_MS_WH_DOWN),
|
||||
[1] = { ENCODER_CCW_CW(KC_V, KC_MS_WH_DOWN),
|
||||
[2] = { ENCODER_CCW_CW(KC_V, KC_MS_WH_DOWN),
|
||||
[3] = { ENCODER_CCW_CW(KC_V, KC_MS_WH_DOWN),
|
||||
// Encoder 1
|
||||
};
|
||||
#endif
|
||||
5
keyboards/lil40/keymaps/vial/rules.mk
Normal file
5
keyboards/lil40/keymaps/vial/rules.mk
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
VIA_ENABLE = yes
|
||||
VIAL_ENABLE = yes
|
||||
VIAL_INSECURE = yes
|
||||
ENCODER_MAP_ENABLE = yes
|
||||
QMK_SETTINGS = yes
|
||||
116
keyboards/lil40/keymaps/vial/vial.json
Normal file
116
keyboards/lil40/keymaps/vial/vial.json
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
{
|
||||
"lighting": "none",
|
||||
"matrix": {
|
||||
"rows": 4,
|
||||
"cols": 12
|
||||
},
|
||||
"layouts":{
|
||||
"keymap":[
|
||||
[
|
||||
{
|
||||
"f": 4
|
||||
},
|
||||
"0,0",
|
||||
"0,1",
|
||||
"0,2",
|
||||
"0,3",
|
||||
"0,4",
|
||||
"0,5",
|
||||
"0,6",
|
||||
"0,7",
|
||||
"0,8",
|
||||
"0,9",
|
||||
{
|
||||
"f": 3
|
||||
},
|
||||
"0,10",
|
||||
"0,11"
|
||||
],
|
||||
[
|
||||
{
|
||||
"f": 4
|
||||
},
|
||||
"1,0",
|
||||
"1,1",
|
||||
"1,2",
|
||||
{
|
||||
"n": true
|
||||
},
|
||||
"1,3",
|
||||
"1,4",
|
||||
"1,5",
|
||||
{
|
||||
"n": true
|
||||
},
|
||||
"1,6",
|
||||
"1,7",
|
||||
"1,8",
|
||||
"1,9",
|
||||
{
|
||||
"f": 3
|
||||
},
|
||||
"1,10",
|
||||
"1,11"
|
||||
],
|
||||
[
|
||||
{
|
||||
"f": 4
|
||||
},
|
||||
"2,0",
|
||||
"2,1",
|
||||
"2,2",
|
||||
"2,3",
|
||||
"2,4",
|
||||
"2,5",
|
||||
"2,6",
|
||||
"2,7",
|
||||
"2,8",
|
||||
"2,9",
|
||||
{
|
||||
"f": 3
|
||||
},
|
||||
"2,10",
|
||||
"2,11"
|
||||
],
|
||||
[
|
||||
{
|
||||
"f": 4
|
||||
},
|
||||
"3,0",
|
||||
{
|
||||
"f": 3
|
||||
},
|
||||
"3,1",
|
||||
"3,2",
|
||||
"3,3",
|
||||
"3,4",
|
||||
{
|
||||
"f": 4,
|
||||
"w": 2
|
||||
},
|
||||
"3,6",
|
||||
{
|
||||
"f": 3
|
||||
},
|
||||
"3,7",
|
||||
"3,8",
|
||||
"3,9",
|
||||
"3,10",
|
||||
"3,11"
|
||||
],
|
||||
[
|
||||
{
|
||||
"x": 4.5
|
||||
},
|
||||
"0,0\n\n\n\n\n\n\n\n\ne",
|
||||
"0,1\n\n\n\n\n\n\n\n\ne"
|
||||
],
|
||||
[
|
||||
{
|
||||
"x": 5
|
||||
},
|
||||
"3,5"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
4
keyboards/lil40/new 1.txt
Normal file
4
keyboards/lil40/new 1.txt
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
rows =00,01,02,03
|
||||
cols = 04,05,06,07,08,09,10,11,12,13,14,15
|
||||
encoder = 27,28,ground
|
||||
encoder click = 26
|
||||
27
keyboards/lil40/readme.md
Normal file
27
keyboards/lil40/readme.md
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# lil40
|
||||
|
||||

|
||||
|
||||
*A short description of the keyboard/project*
|
||||
|
||||
* Keyboard Maintainer: [shmokebud](https://github.com/shmokebud)
|
||||
* Hardware Supported: *The PCBs, controllers supported*
|
||||
* Hardware Availability: *Links to where you can find this hardware*
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make lil40:default
|
||||
|
||||
Flashing example for this keyboard:
|
||||
|
||||
make lil40: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).
|
||||
|
||||
## Bootloader
|
||||
|
||||
Enter the bootloader in 3 ways:
|
||||
|
||||
* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
|
||||
* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead
|
||||
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
|
||||
2
keyboards/lil40/rules.mk
Normal file
2
keyboards/lil40/rules.mk
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
BOARD = GENERIC_RP_RP2040
|
||||
ENCODER_MAP_ENABLE = yes
|
||||
161
keyboards/mew/crkbd.c
Normal file
161
keyboards/mew/crkbd.c
Normal file
|
|
@ -0,0 +1,161 @@
|
|||
/*
|
||||
Copyright 2019 @foostan
|
||||
Copyright 2020 Drashna Jaelre <@drashna>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#ifdef SWAP_HANDS_ENABLE
|
||||
__attribute__((weak)) const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// Left
|
||||
{{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}},
|
||||
{{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}},
|
||||
{{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6}},
|
||||
{{0, 7}, {1, 7}, {2, 7}, {3, 7}, {4, 7}, {5, 7}},
|
||||
// Right
|
||||
{{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}},
|
||||
{{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}},
|
||||
{{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2}},
|
||||
{{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}}
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
|
||||
oled_rotation_t oled_init_kb(oled_rotation_t rotation) {
|
||||
if (!is_keyboard_master()) {
|
||||
return OLED_ROTATION_180; // flips the display 180 degrees if offhand
|
||||
}
|
||||
return rotation;
|
||||
}
|
||||
|
||||
static void oled_render_layer_state(void) {
|
||||
oled_write_P(PSTR("Layer: "), false);
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case 0:
|
||||
oled_write_ln_P(PSTR("Default"), false);
|
||||
break;
|
||||
case 1:
|
||||
oled_write_ln_P(PSTR("Lower"), false);
|
||||
break;
|
||||
case 2:
|
||||
oled_write_ln_P(PSTR("Raise"), false);
|
||||
break;
|
||||
default:
|
||||
oled_write_ln_P(PSTR("Undef"), false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
char key_name = ' ';
|
||||
uint16_t last_keycode;
|
||||
uint8_t last_row;
|
||||
uint8_t last_col;
|
||||
|
||||
static const char PROGMEM code_to_name[60] = {' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', 'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\', '#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '};
|
||||
|
||||
static void set_keylog(uint16_t keycode, keyrecord_t *record) {
|
||||
// save the row and column (useful even if we can't find a keycode to show)
|
||||
last_row = record->event.key.row;
|
||||
last_col = record->event.key.col;
|
||||
|
||||
key_name = ' ';
|
||||
last_keycode = keycode;
|
||||
if (IS_QK_MOD_TAP(keycode)) {
|
||||
if (record->tap.count) {
|
||||
keycode = QK_MOD_TAP_GET_TAP_KEYCODE(keycode);
|
||||
} else {
|
||||
keycode = 0xE0 + biton(QK_MOD_TAP_GET_MODS(keycode) & 0xF) + biton(QK_MOD_TAP_GET_MODS(keycode) & 0x10);
|
||||
}
|
||||
} else if (IS_QK_LAYER_TAP(keycode) && record->tap.count) {
|
||||
keycode = QK_LAYER_TAP_GET_TAP_KEYCODE(keycode);
|
||||
} else if (IS_QK_MODS(keycode)) {
|
||||
keycode = QK_MODS_GET_BASIC_KEYCODE(keycode);
|
||||
} else if (IS_QK_ONE_SHOT_MOD(keycode)) {
|
||||
keycode = 0xE0 + biton(QK_ONE_SHOT_MOD_GET_MODS(keycode) & 0xF) + biton(QK_ONE_SHOT_MOD_GET_MODS(keycode) & 0x10);
|
||||
}
|
||||
if (keycode > ARRAY_SIZE(code_to_name)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// update keylog
|
||||
key_name = pgm_read_byte(&code_to_name[keycode]);
|
||||
}
|
||||
|
||||
static const char *depad_str(const char *depad_str, char depad_char) {
|
||||
while (*depad_str == depad_char)
|
||||
++depad_str;
|
||||
return depad_str;
|
||||
}
|
||||
|
||||
static void oled_render_keylog(void) {
|
||||
oled_write_char('0' + last_row, false);
|
||||
oled_write_P(PSTR("x"), false);
|
||||
oled_write_char('0' + last_col, false);
|
||||
oled_write_P(PSTR(", k"), false);
|
||||
const char *last_keycode_str = get_u16_str(last_keycode, ' ');
|
||||
oled_write(depad_str(last_keycode_str, ' '), false);
|
||||
oled_write_P(PSTR(":"), false);
|
||||
oled_write_char(key_name, false);
|
||||
oled_advance_page(true);
|
||||
}
|
||||
|
||||
// static void render_bootmagic_status(bool status) {
|
||||
// /* Show Ctrl-Gui Swap options */
|
||||
// static const char PROGMEM logo[][2][3] = {
|
||||
// {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}},
|
||||
// {{0x95, 0x96, 0}, {0xb5, 0xb6, 0}},
|
||||
// };
|
||||
// if (status) {
|
||||
// oled_write_ln_P(logo[0][0], false);
|
||||
// oled_write_ln_P(logo[0][1], false);
|
||||
// } else {
|
||||
// oled_write_ln_P(logo[1][0], false);
|
||||
// oled_write_ln_P(logo[1][1], false);
|
||||
// }
|
||||
// }
|
||||
|
||||
__attribute__((weak)) void oled_render_logo(void) {
|
||||
// clang-format off
|
||||
static const char PROGMEM crkbd_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};
|
||||
// clang-format on
|
||||
oled_write_P(crkbd_logo, false);
|
||||
}
|
||||
|
||||
bool oled_task_kb(void) {
|
||||
if (!oled_task_user()) {
|
||||
return false;
|
||||
}
|
||||
if (is_keyboard_master()) {
|
||||
oled_render_layer_state();
|
||||
oled_render_keylog();
|
||||
} else {
|
||||
oled_render_logo();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
set_keylog(keycode, record);
|
||||
}
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
#endif // OLED_ENABLE
|
||||
138
keyboards/mew/info.json
Normal file
138
keyboards/mew/info.json
Normal file
|
|
@ -0,0 +1,138 @@
|
|||
{
|
||||
"manufacturer": "foostan",
|
||||
"url": "https://github.com/foostan/crkbd",
|
||||
"maintainer": "qmk",
|
||||
"usb": {
|
||||
"vid": "0x4653"
|
||||
},
|
||||
"features": {
|
||||
"bootmagic": false,
|
||||
"extrakey": true,
|
||||
"nkro": true,
|
||||
"oled": true,
|
||||
"rgblight": false,
|
||||
"rgb_matrix": false
|
||||
},
|
||||
"bootmagic": {
|
||||
"matrix": [0, 1]
|
||||
},
|
||||
"split": {
|
||||
"enabled": true,
|
||||
"bootmagic": {
|
||||
"matrix": [4, 1]
|
||||
}
|
||||
},
|
||||
"layout_aliases": {
|
||||
"LAYOUT": "LAYOUT_split_3x6_3"
|
||||
},
|
||||
"community_layouts": [ "split_3x5_3", "split_3x6_3" ],
|
||||
"layouts": {
|
||||
"LAYOUT_split_3x5_3": {
|
||||
"layout": [
|
||||
{"matrix": [0, 1], "x": 0, "y": 0.3},
|
||||
{"matrix": [0, 2], "x": 1, "y": 0.1},
|
||||
{"matrix": [0, 3], "x": 2, "y": 0},
|
||||
{"matrix": [0, 4], "x": 3, "y": 0.1},
|
||||
{"matrix": [0, 5], "x": 4, "y": 0.2},
|
||||
|
||||
{"matrix": [4, 5], "x": 8, "y": 0.2},
|
||||
{"matrix": [4, 4], "x": 9, "y": 0.1},
|
||||
{"matrix": [4, 3], "x": 10, "y": 0},
|
||||
{"matrix": [4, 2], "x": 11, "y": 0.1},
|
||||
{"matrix": [4, 1], "x": 12, "y": 0.3},
|
||||
|
||||
{"matrix": [1, 1], "x": 0, "y": 1.3},
|
||||
{"matrix": [1, 2], "x": 1, "y": 1.1},
|
||||
{"matrix": [1, 3], "x": 2, "y": 1},
|
||||
{"matrix": [1, 4], "x": 3, "y": 1.1},
|
||||
{"matrix": [1, 5], "x": 4, "y": 1.2},
|
||||
|
||||
{"matrix": [5, 5], "x": 8, "y": 1.2},
|
||||
{"matrix": [5, 4], "x": 9, "y": 1.1},
|
||||
{"matrix": [5, 3], "x": 10, "y": 1},
|
||||
{"matrix": [5, 2], "x": 11, "y": 1.1},
|
||||
{"matrix": [5, 1], "x": 12, "y": 1.3},
|
||||
|
||||
{"matrix": [2, 1], "x": 0, "y": 2.3},
|
||||
{"matrix": [2, 2], "x": 1, "y": 2.1},
|
||||
{"matrix": [2, 3], "x": 2, "y": 2},
|
||||
{"matrix": [2, 4], "x": 3, "y": 2.1},
|
||||
{"matrix": [2, 5], "x": 4, "y": 2.2},
|
||||
|
||||
{"matrix": [6, 5], "x": 8, "y": 2.2},
|
||||
{"matrix": [6, 4], "x": 9, "y": 2.1},
|
||||
{"matrix": [6, 3], "x": 10, "y": 2},
|
||||
{"matrix": [6, 2], "x": 11, "y": 2.1},
|
||||
{"matrix": [6, 1], "x": 12, "y": 2.3},
|
||||
|
||||
{"matrix": [3, 3], "x": 3, "y": 3.7},
|
||||
{"matrix": [3, 4], "x": 4, "y": 3.7},
|
||||
{"matrix": [3, 5], "x": 5, "y": 3.2, "h": 1.5},
|
||||
|
||||
{"matrix": [7, 5], "x": 7, "y": 3.2, "h": 1.5},
|
||||
{"matrix": [7, 4], "x": 8, "y": 3.7},
|
||||
{"matrix": [7, 3], "x": 9, "y": 3.7}
|
||||
]
|
||||
},
|
||||
"LAYOUT_split_3x6_3": {
|
||||
"layout": [
|
||||
{"matrix": [0, 0], "x": 0, "y": 0.3},
|
||||
{"matrix": [0, 1], "x": 1, "y": 0.3},
|
||||
{"matrix": [0, 2], "x": 2, "y": 0.1},
|
||||
{"matrix": [0, 3], "x": 3, "y": 0},
|
||||
{"matrix": [0, 4], "x": 4, "y": 0.1},
|
||||
{"matrix": [0, 5], "x": 5, "y": 0.2},
|
||||
|
||||
{"matrix": [4, 5], "x": 9, "y": 0.2},
|
||||
{"matrix": [4, 4], "x": 10, "y": 0.1},
|
||||
{"matrix": [4, 3], "x": 11, "y": 0},
|
||||
{"matrix": [4, 2], "x": 12, "y": 0.1},
|
||||
{"matrix": [4, 1], "x": 13, "y": 0.3},
|
||||
{"matrix": [4, 0], "x": 14, "y": 0.3},
|
||||
|
||||
{"matrix": [1, 0], "x": 0, "y": 1.3},
|
||||
{"matrix": [1, 1], "x": 1, "y": 1.3},
|
||||
{"matrix": [1, 2], "x": 2, "y": 1.1},
|
||||
{"matrix": [1, 3], "x": 3, "y": 1},
|
||||
{"matrix": [1, 4], "x": 4, "y": 1.1},
|
||||
{"matrix": [1, 5], "x": 5, "y": 1.2},
|
||||
|
||||
{"matrix": [5, 5], "x": 9, "y": 1.2},
|
||||
{"matrix": [5, 4], "x": 10, "y": 1.1},
|
||||
{"matrix": [5, 3], "x": 11, "y": 1},
|
||||
{"matrix": [5, 2], "x": 12, "y": 1.1},
|
||||
{"matrix": [5, 1], "x": 13, "y": 1.3},
|
||||
{"matrix": [5, 0], "x": 14, "y": 1.3},
|
||||
|
||||
{"matrix": [2, 0], "x": 0, "y": 2.3},
|
||||
{"matrix": [2, 1], "x": 1, "y": 2.3},
|
||||
{"matrix": [2, 2], "x": 2, "y": 2.1},
|
||||
{"matrix": [2, 3], "x": 3, "y": 2},
|
||||
{"matrix": [2, 4], "x": 4, "y": 2.1},
|
||||
{"matrix": [2, 5], "x": 5, "y": 2.2},
|
||||
|
||||
{"matrix": [6, 5], "x": 9, "y": 2.2},
|
||||
{"matrix": [6, 4], "x": 10, "y": 2.1},
|
||||
{"matrix": [6, 3], "x": 11, "y": 2},
|
||||
{"matrix": [6, 2], "x": 12, "y": 2.1},
|
||||
{"matrix": [6, 1], "x": 13, "y": 2.3},
|
||||
{"matrix": [6, 0], "x": 14, "y": 2.3},
|
||||
|
||||
{"matrix": [3, 3], "x": 4, "y": 3.7},
|
||||
{"matrix": [3, 4], "x": 5, "y": 3.7},
|
||||
{"matrix": [3, 5], "x": 6, "y": 3.2, "h": 1.5},
|
||||
|
||||
{"matrix": [7, 5], "x": 8, "y": 3.2, "h": 1.5},
|
||||
{"matrix": [7, 4], "x": 9, "y": 3.7},
|
||||
{"matrix": [7, 3], "x": 10, "y": 3.7}
|
||||
]
|
||||
}
|
||||
},
|
||||
"rgb_matrix": {
|
||||
"driver": "ws2812",
|
||||
"max_brightness": 120
|
||||
},
|
||||
"rgblight": {
|
||||
"max_brightness": 120
|
||||
}
|
||||
}
|
||||
51
keyboards/mew/keymaps/custom/config.h
Normal file
51
keyboards/mew/keymaps/custom/config.h
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
#pragma once
|
||||
|
||||
#define VIAL_KEYBOARD_UID {0x3B, 0x6B, 0xA0, 0x29, 0x80, 0x56, 0xED, 0xD1}
|
||||
#define VIAL_UNLOCK_COMBO_ROWS {0, 0}
|
||||
#define VIAL_UNLOCK_COMBO_COLS {0, 1}
|
||||
|
||||
#define DYNAMIC_KEYMAP_LAYER_COUNT 3
|
||||
#define TAPPING_TERM 180
|
||||
|
||||
//#define USE_MATRIX_I2C
|
||||
// #ifdef KEYBOARD_crkbd_rev1_legacy
|
||||
// # undef USE_I2C
|
||||
// # define USE_SERIAL
|
||||
// #endif
|
||||
|
||||
/* Select hand configuration */
|
||||
#define MASTER_LEFT
|
||||
// #define MASTER_RIGHT
|
||||
// #define EE_HANDS
|
||||
|
||||
// #define USE_SERIAL_PD2
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
# undef RGBLIGHT_LED_COUNT
|
||||
# define RGBLIGHT_ANIMATIONS
|
||||
# define RGBLIGHT_LED_COUNT 54
|
||||
# undef RGBLED_SPLIT
|
||||
# define RGBLED_SPLIT { 27, 27 }
|
||||
# define RGBLIGHT_LIMIT_VAL 120
|
||||
# define RGBLIGHT_HUE_STEP 10
|
||||
# define RGBLIGHT_SAT_STEP 17
|
||||
# define RGBLIGHT_VAL_STEP 17
|
||||
#endif
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
|
||||
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
|
||||
# define RGB_MATRIX_SLEEP // turn off effects when suspended
|
||||
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
|
||||
// # define RGB_MATRIX_LED_PROCESS_LIMIT (RGB_MATRIX_LED_COUNT + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
|
||||
// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
|
||||
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
|
||||
# define RGB_MATRIX_HUE_STEP 8
|
||||
# define RGB_MATRIX_SAT_STEP 8
|
||||
# define RGB_MATRIX_VAL_STEP 8
|
||||
# define RGB_MATRIX_SPD_STEP 10
|
||||
// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
|
||||
#endif
|
||||
|
||||
#define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c"
|
||||
|
||||
#define SPLIT_WPM_ENABLE
|
||||
337
keyboards/mew/keymaps/custom/keymap.c
Normal file
337
keyboards/mew/keymaps/custom/keymap.c
Normal file
|
|
@ -0,0 +1,337 @@
|
|||
#include QMK_KEYBOARD_H
|
||||
|
||||
enum layers {
|
||||
_QWERTY,
|
||||
_PROGRAM,
|
||||
_NUMBERS,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QWERTY] = LAYOUT_split_3x6_3(
|
||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_LCTL, 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_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ESC,
|
||||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_LGUI, TL_LOWR, KC_SPC, KC_ENT, TL_UPPR, KC_RALT
|
||||
//`--------------------------' `--------------------------'
|
||||
|
||||
),
|
||||
|
||||
[_PROGRAM] = LAYOUT_split_3x6_3(
|
||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, XXXXXXX, XXXXXXX,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT
|
||||
//`--------------------------' `--------------------------'
|
||||
),
|
||||
|
||||
[_NUMBERS] = LAYOUT_split_3x6_3(
|
||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_TILD,
|
||||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT
|
||||
//`--------------------------' `--------------------------'
|
||||
)
|
||||
|
||||
// [3] = LAYOUT_split_3x6_3(
|
||||
// //,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
// QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
// //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
// RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
// //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
// RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
// //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
||||
// KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT
|
||||
// //`--------------------------' `--------------------------'
|
||||
// )
|
||||
};
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
#include <stdio.h>
|
||||
|
||||
/* 32 * 14 os logos */
|
||||
static const char PROGMEM windows_logo[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbc, 0xbc, 0xbe, 0xbe, 0x00, 0xbe, 0xbe, 0xbf, 0xbf, 0xbf, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x0f, 0x0f, 0x00, 0x0f, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
static const char PROGMEM mac_logo[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf0, 0xf8, 0xf8, 0xf8, 0xf0, 0xf6, 0xfb, 0xfb, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x0f, 0x1f, 0x1f, 0x0f, 0x0f, 0x1f, 0x1f, 0x0f, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
/* KEYBOARD PET START */
|
||||
|
||||
/* settings */
|
||||
# define MIN_WALK_SPEED 10
|
||||
# define MIN_RUN_SPEED 40
|
||||
|
||||
/* advanced settings */
|
||||
# define ANIM_FRAME_DURATION 200 // how long each frame lasts in ms
|
||||
# define ANIM_SIZE 96 // number of bytes in array. If you change sprites, minimize for adequate firmware size. max is 1024
|
||||
|
||||
/* timers */
|
||||
uint32_t anim_timer = 0;
|
||||
|
||||
/* current frame */
|
||||
uint8_t current_frame = 0;
|
||||
|
||||
/* status variables */
|
||||
int current_wpm = 0;
|
||||
led_t led_usb_state;
|
||||
|
||||
bool isSneaking = false;
|
||||
bool isJumping = false;
|
||||
bool showedJump = true;
|
||||
|
||||
/* logic */
|
||||
static void render_luna(int LUNA_X, int LUNA_Y) {
|
||||
/* Sit */
|
||||
static const char PROGMEM sit[2][ANIM_SIZE] = {/* 'sit1', 32x22px */
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x68, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28, 0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
},
|
||||
|
||||
/* 'sit2', 32x22px */
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x90, 0x08, 0x18, 0x60, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0e, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28, 0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}};
|
||||
|
||||
/* Walk */
|
||||
static const char PROGMEM walk[2][ANIM_SIZE] = {/* 'walk1', 32x22px */
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x90, 0x90, 0x90, 0xa0, 0xc0, 0x80, 0x80, 0x80, 0x70, 0x08, 0x14, 0x08, 0x90, 0x10, 0x10, 0x08, 0xa4, 0x78, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x18, 0xea, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x20, 0x20, 0x3c, 0x0f, 0x11, 0x1f, 0x03, 0x06, 0x18, 0x20, 0x20, 0x3c, 0x0c, 0x12, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
},
|
||||
|
||||
/* 'walk2', 32x22px */
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x20, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x28, 0x10, 0x20, 0x20, 0x20, 0x10, 0x48, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x20, 0xf8, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x30, 0xd5, 0x20, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x30, 0x0c, 0x02, 0x05, 0x09, 0x12, 0x1e, 0x02, 0x1c, 0x14, 0x08, 0x10, 0x20, 0x2c, 0x32, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
}};
|
||||
|
||||
/* Run */
|
||||
static const char PROGMEM run[2][ANIM_SIZE] = {/* 'run1', 32x22px */
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x08, 0xc8, 0xb0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0xc4, 0xa4, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x58, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x09, 0x04, 0x04, 0x04, 0x04, 0x02, 0x03, 0x02, 0x01, 0x01, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
},
|
||||
|
||||
/* 'run2', 32x22px */
|
||||
{
|
||||
0x00, 0x00, 0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x78, 0x28, 0x08, 0x10, 0x20, 0x30, 0x08, 0x10, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x10, 0xb0, 0x50, 0x55, 0x20, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x1e, 0x20, 0x20, 0x18, 0x0c, 0x14, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
}};
|
||||
|
||||
/* Bark */
|
||||
static const char PROGMEM bark[2][ANIM_SIZE] = {/* 'bark1', 32x22px */
|
||||
{
|
||||
0x00, 0xc0, 0x20, 0x10, 0xd0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
},
|
||||
|
||||
/* 'bark2', 32x22px */
|
||||
{
|
||||
0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x2c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x20, 0x4a, 0x09, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
}};
|
||||
|
||||
/* Sneak */
|
||||
static const char PROGMEM sneak[2][ANIM_SIZE] = {/* 'sneak1', 32x22px */
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x40, 0x40, 0x80, 0x00, 0x80, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x21, 0xf0, 0x04, 0x02, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x04, 0x04, 0x04, 0x03, 0x01, 0x00, 0x00, 0x09, 0x01, 0x80, 0x80, 0xab, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x20, 0x20, 0x3c, 0x0f, 0x11, 0x1f, 0x02, 0x06, 0x18, 0x20, 0x20, 0x38, 0x08, 0x10, 0x18, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00,
|
||||
},
|
||||
|
||||
/* 'sneak2', 32x22px */
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xa0, 0x20, 0x40, 0x80, 0xc0, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x41, 0xf0, 0x04, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x02, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x40, 0x40, 0x55, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x30, 0x0c, 0x02, 0x05, 0x09, 0x12, 0x1e, 0x04, 0x18, 0x10, 0x08, 0x10, 0x20, 0x28, 0x34, 0x06, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
}};
|
||||
|
||||
/* animation */
|
||||
void animate_luna(void) {
|
||||
/* jump */
|
||||
if (isJumping || !showedJump) {
|
||||
/* clear */
|
||||
oled_set_cursor(LUNA_X, LUNA_Y + 2);
|
||||
oled_write(" ", false);
|
||||
|
||||
oled_set_cursor(LUNA_X, LUNA_Y - 1);
|
||||
|
||||
showedJump = true;
|
||||
} else {
|
||||
/* clear */
|
||||
oled_set_cursor(LUNA_X, LUNA_Y - 1);
|
||||
oled_write(" ", false);
|
||||
|
||||
oled_set_cursor(LUNA_X, LUNA_Y);
|
||||
}
|
||||
|
||||
/* switch frame */
|
||||
current_frame = (current_frame + 1) % 2;
|
||||
|
||||
/* current status */
|
||||
if (led_usb_state.caps_lock) {
|
||||
oled_write_raw_P(bark[current_frame], ANIM_SIZE);
|
||||
|
||||
} else if (isSneaking) {
|
||||
oled_write_raw_P(sneak[current_frame], ANIM_SIZE);
|
||||
|
||||
} else if (current_wpm <= MIN_WALK_SPEED) {
|
||||
oled_write_raw_P(sit[current_frame], ANIM_SIZE);
|
||||
|
||||
} else if (current_wpm <= MIN_RUN_SPEED) {
|
||||
oled_write_raw_P(walk[current_frame], ANIM_SIZE);
|
||||
|
||||
} else {
|
||||
oled_write_raw_P(run[current_frame], ANIM_SIZE);
|
||||
}
|
||||
}
|
||||
|
||||
#if OLED_TIMEOUT > 0
|
||||
/* the animation prevents the normal timeout from occuring */
|
||||
if (last_input_activity_elapsed() > OLED_TIMEOUT && last_led_activity_elapsed() > OLED_TIMEOUT) {
|
||||
oled_off();
|
||||
return;
|
||||
} else {
|
||||
oled_on();
|
||||
}
|
||||
#endif
|
||||
|
||||
/* animation timer */
|
||||
if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) {
|
||||
anim_timer = timer_read32();
|
||||
animate_luna();
|
||||
}
|
||||
}
|
||||
/* KEYBOARD PET END */
|
||||
|
||||
void render_logo(void) {
|
||||
static const char PROGMEM crkbd_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(crkbd_logo, false);
|
||||
}
|
||||
|
||||
static void print_logo_narrow(void) {
|
||||
render_logo();
|
||||
|
||||
/* wpm counter */
|
||||
// uint8_t n = get_current_wpm();
|
||||
// char wpm_str[4];
|
||||
// oled_set_cursor(0, 14);
|
||||
// wpm_str[3] = '\0';
|
||||
// wpm_str[2] = '0' + n % 10;
|
||||
// wpm_str[1] = '0' + (n /= 10) % 10;
|
||||
// wpm_str[0] = '0' + n / 10;
|
||||
// oled_write(wpm_str, false);
|
||||
|
||||
// oled_set_cursor(0, 15);
|
||||
// oled_write(" wpm", false);
|
||||
}
|
||||
|
||||
static void print_status_narrow(void) {
|
||||
/* Print current mode */
|
||||
oled_set_cursor(0, 0);
|
||||
if (keymap_config.swap_lctl_lgui) {
|
||||
oled_write_raw_P(mac_logo, sizeof(mac_logo));
|
||||
} else {
|
||||
oled_write_raw_P(windows_logo, sizeof(windows_logo));
|
||||
}
|
||||
|
||||
oled_set_cursor(0, 3);
|
||||
|
||||
// switch (get_highest_layer(default_layer_state)) {
|
||||
// case _QWERTY:
|
||||
// oled_write("QWRTY", false);
|
||||
// break;
|
||||
// case _PROGRAM:
|
||||
// oled_write("PROG", false);
|
||||
// break;
|
||||
// case _NUMBERS:
|
||||
// oled_write("NUMB", false);
|
||||
// break;
|
||||
// default:
|
||||
// oled_write("UNDEF", false);
|
||||
// }
|
||||
|
||||
// oled_set_cursor(0, 5);
|
||||
|
||||
/* Print current layer */
|
||||
oled_write("LAYER", false);
|
||||
|
||||
oled_set_cursor(0, 4);
|
||||
// oled_set_cursor(0, 6);
|
||||
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case _QWERTY:
|
||||
oled_write("Base ", false);
|
||||
break;
|
||||
case _PROGRAM:
|
||||
oled_write("Prog", false);
|
||||
break;
|
||||
case _NUMBERS:
|
||||
oled_write("Numb", false);
|
||||
break;
|
||||
default:
|
||||
oled_write("Undef", false);
|
||||
}
|
||||
|
||||
/* caps lock */
|
||||
// oled_set_cursor(0, 8);
|
||||
oled_set_cursor(0, 6);
|
||||
oled_write("CPSLK", led_usb_state.caps_lock);
|
||||
|
||||
/* KEYBOARD PET RENDER START */
|
||||
|
||||
// render_luna(0, 13);
|
||||
render_luna(0, 11);
|
||||
|
||||
/* KEYBOARD PET RENDER END */
|
||||
}
|
||||
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||
if (!is_keyboard_master()) {
|
||||
return OLED_ROTATION_180; // flips the display 180 degrees if offhand
|
||||
}
|
||||
return OLED_ROTATION_270;
|
||||
}
|
||||
|
||||
bool oled_task_user(void) {
|
||||
/* KEYBOARD PET VARIABLES START */
|
||||
current_wpm = get_current_wpm();
|
||||
led_usb_state = host_keyboard_led_state();
|
||||
if (is_keyboard_master()) {
|
||||
print_status_narrow();
|
||||
} else {
|
||||
print_logo_narrow();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
// if (record->event.pressed) {
|
||||
// set_keylog(keycode, record);
|
||||
// }
|
||||
// return true;
|
||||
switch (keycode) {
|
||||
/* KEYBOARD PET STATUS START */
|
||||
case KC_LCTL:
|
||||
case KC_RCTL:
|
||||
if (record->event.pressed) {
|
||||
isSneaking = true;
|
||||
} else {
|
||||
isSneaking = false;
|
||||
}
|
||||
break;
|
||||
case KC_SPC:
|
||||
if (record->event.pressed) {
|
||||
isJumping = true;
|
||||
showedJump = false;
|
||||
} else {
|
||||
isJumping = false;
|
||||
}
|
||||
break;
|
||||
/* KEYBOARD PET STATUS END */
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif // OLED_ENABLE
|
||||
30
keyboards/mew/keymaps/custom/rules.mk
Normal file
30
keyboards/mew/keymaps/custom/rules.mk
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# qmk compile -e MASTER=left -e CONVERT_TO=kb2040 --keyboard crkbd --keymap vial
|
||||
VIA_ENABLE = yes
|
||||
VIAL_ENABLE = yes
|
||||
LTO_ENABLE = yes
|
||||
QMK_SETTINGS = yes
|
||||
SPLIT_KEYBOARD = yes
|
||||
|
||||
RGBLIGHT_ENABLE = no
|
||||
RGB_MATRIX_ENABLE = no # Can't have RGBLIGHT and RGB_MATRIX at the same time.
|
||||
SLEEP_LED_ENABLE = no
|
||||
|
||||
OLED_ENABLE = yes
|
||||
COMBO_ENABLE = yes
|
||||
WPM_ENABLE = yes
|
||||
|
||||
|
||||
# MOUSEKEY_ENABLE = no # Mouse keys
|
||||
# EXTRAKEY_ENABLE = no
|
||||
# KEY_OVERRIDE_ENABLED = no
|
||||
# AUDIO_ENABLE = no
|
||||
# COMMAND_ENABLE = no
|
||||
# LEADER_ENABLE = no
|
||||
# BLUETOOTH_ENABLE = no
|
||||
# MIDI_ENABLE = no
|
||||
# UNICODE_ENABLE = no
|
||||
# BOOTMAGIC_ENABLE = no
|
||||
# CONSOLE_ENABLE = no
|
||||
|
||||
# MCU = kb2040
|
||||
# BOOTLOADER = rp2040
|
||||
358
keyboards/mew/keymaps/custom/vial-config.vil
Normal file
358
keyboards/mew/keymaps/custom/vial-config.vil
Normal file
|
|
@ -0,0 +1,358 @@
|
|||
{
|
||||
"version": 1,
|
||||
"uid": 15126841831861545787,
|
||||
"layout": [
|
||||
[
|
||||
[
|
||||
"KC_ESCAPE",
|
||||
"KC_Q",
|
||||
"KC_W",
|
||||
"KC_E",
|
||||
"KC_R",
|
||||
"KC_T"
|
||||
],
|
||||
[
|
||||
"KC_TAB",
|
||||
"KC_A",
|
||||
"KC_S",
|
||||
"KC_D",
|
||||
"KC_F",
|
||||
"KC_G"
|
||||
],
|
||||
[
|
||||
"TD(0)",
|
||||
"KC_Z",
|
||||
"KC_X",
|
||||
"KC_C",
|
||||
"KC_V",
|
||||
"KC_B"
|
||||
],
|
||||
[
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
"KC_LCTRL",
|
||||
"TD(6)",
|
||||
"KC_SPACE"
|
||||
],
|
||||
[
|
||||
"KC_DELETE",
|
||||
"KC_P",
|
||||
"KC_O",
|
||||
"KC_I",
|
||||
"KC_U",
|
||||
"KC_Y"
|
||||
],
|
||||
[
|
||||
"KC_QUOTE",
|
||||
"KC_SCOLON",
|
||||
"KC_L",
|
||||
"KC_K",
|
||||
"KC_J",
|
||||
"KC_H"
|
||||
],
|
||||
[
|
||||
"TD(5)",
|
||||
"KC_SLASH",
|
||||
"KC_DOT",
|
||||
"KC_COMMA",
|
||||
"KC_M",
|
||||
"KC_N"
|
||||
],
|
||||
[
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
"KC_BSPACE",
|
||||
"TO(1)",
|
||||
"KC_ENTER"
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
"KC_ESCAPE",
|
||||
"KC_LALT",
|
||||
"LSFT(KC_5)",
|
||||
"LSFT(KC_6)",
|
||||
"LSFT(KC_BSLASH)",
|
||||
"KC_MINUS"
|
||||
],
|
||||
[
|
||||
"KC_TAB",
|
||||
"KC_DOT",
|
||||
"LSFT(KC_3)",
|
||||
"LSFT(KC_7)",
|
||||
"KC_BSLASH",
|
||||
"KC_KP_SLASH"
|
||||
],
|
||||
[
|
||||
"TD(0)",
|
||||
"LSFT(KC_4)",
|
||||
"LSFT(KC_8)",
|
||||
"LSFT(KC_2)",
|
||||
"LCTL(KC_GRAVE)",
|
||||
"KC_EQUAL"
|
||||
],
|
||||
[
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
"TD(4)",
|
||||
"TO(0)",
|
||||
"KC_SPACE"
|
||||
],
|
||||
[
|
||||
"KC_DELETE",
|
||||
"KC_SCROLLLOCK",
|
||||
"LSFT(KC_4)",
|
||||
"LSFT(KC_7)",
|
||||
"LSFT(KC_1)",
|
||||
"KC_GRAVE"
|
||||
],
|
||||
[
|
||||
"TD(2)",
|
||||
"KC_NO",
|
||||
"KC_RIGHT",
|
||||
"KC_UP",
|
||||
"KC_DOWN",
|
||||
"KC_LEFT"
|
||||
],
|
||||
[
|
||||
"TD(3)",
|
||||
"KC_NO",
|
||||
"KC_RBRACKET",
|
||||
"LSFT(KC_0)",
|
||||
"LSFT(KC_9)",
|
||||
"KC_LBRACKET"
|
||||
],
|
||||
[
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
"KC_BSPACE",
|
||||
"TO(2)",
|
||||
"KC_ENTER"
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
"RESET",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_MPRV",
|
||||
"KC_MPLY",
|
||||
"KC_MNXT"
|
||||
],
|
||||
[
|
||||
"RGB_TOG",
|
||||
"RGB_HUI",
|
||||
"RGB_SAI",
|
||||
"RGB_VAI",
|
||||
"KC_NO",
|
||||
"KC_VOLU"
|
||||
],
|
||||
[
|
||||
"RGB_MOD",
|
||||
"RGB_HUD",
|
||||
"RGB_SAD",
|
||||
"RGB_VAD",
|
||||
"KC_NO",
|
||||
"KC_VOLD"
|
||||
],
|
||||
[
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
"KC_LGUI",
|
||||
"TO(0)",
|
||||
"KC_SPACE"
|
||||
],
|
||||
[
|
||||
"KC_KP_SLASH",
|
||||
"KC_MINUS",
|
||||
"KC_9",
|
||||
"KC_8",
|
||||
"KC_7",
|
||||
"LSFT(KC_4)"
|
||||
],
|
||||
[
|
||||
"LSFT(KC_8)",
|
||||
"KC_EQUAL",
|
||||
"KC_6",
|
||||
"KC_5",
|
||||
"KC_4",
|
||||
"KC_DOT"
|
||||
],
|
||||
[
|
||||
"KC_COMMA",
|
||||
"LSFT(KC_EQUAL)",
|
||||
"KC_3",
|
||||
"KC_2",
|
||||
"KC_1",
|
||||
"KC_0"
|
||||
],
|
||||
[
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
"KC_BSPACE",
|
||||
"TO(1)",
|
||||
"KC_ENTER"
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO"
|
||||
],
|
||||
[
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO"
|
||||
],
|
||||
[
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO"
|
||||
],
|
||||
[
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO"
|
||||
],
|
||||
[
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO"
|
||||
],
|
||||
[
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO"
|
||||
],
|
||||
[
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO"
|
||||
],
|
||||
[
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO"
|
||||
]
|
||||
]
|
||||
],
|
||||
"encoder_layout": [
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[]
|
||||
],
|
||||
"layout_options": -1,
|
||||
"macro": [
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[]
|
||||
],
|
||||
"vial_protocol": 5,
|
||||
"via_protocol": 9,
|
||||
"tap_dance": [
|
||||
[
|
||||
"OSM(MOD_LSFT)",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_LSHIFT",
|
||||
100
|
||||
],
|
||||
[
|
||||
"OSM(MOD_LCTL)",
|
||||
"KC_LCTRL",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
180
|
||||
],
|
||||
[
|
||||
"KC_PGUP",
|
||||
"KC_HOME",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
100
|
||||
],
|
||||
[
|
||||
"KC_PGDOWN",
|
||||
"KC_END",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
100
|
||||
],
|
||||
[
|
||||
"KC_LGUI",
|
||||
"KC_LCTRL",
|
||||
"OSM(MOD_LGUI)",
|
||||
"KC_NO",
|
||||
180
|
||||
],
|
||||
[
|
||||
"OSM(MOD_RALT)",
|
||||
"KC_RALT",
|
||||
"KC_CAPSLOCK",
|
||||
"KC_NO",
|
||||
180
|
||||
],
|
||||
[
|
||||
"KC_NO",
|
||||
"KC_LGUI",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
100
|
||||
],
|
||||
[
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
180
|
||||
]
|
||||
],
|
||||
"combo": [],
|
||||
"key_override": [],
|
||||
"settings": {}
|
||||
}
|
||||
30
keyboards/mew/keymaps/custom/vial.json
Normal file
30
keyboards/mew/keymaps/custom/vial.json
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"name": "Crkbd",
|
||||
"vendorId": "0x4653",
|
||||
"productId": "0x0001",
|
||||
"lighting": {
|
||||
"extends": "qmk_rgblight"
|
||||
},
|
||||
"matrix": { "rows": 8, "cols": 6 },
|
||||
"layouts": {
|
||||
"keymap": [
|
||||
[{"y":1,"x":3.5},"0,3",{"x":7.5},"4,3"],
|
||||
[{"y":-0.875,"x":2.5},"0,2",{"x":1},"0,4",{"x":5.5},"4,4",{"x":1},"4,2"],
|
||||
[{"y":-0.875,"x":5.5},"0,5",{"x":3.5},"4,5"],
|
||||
[{"y":-0.875,"x":0.5},"0,0","0,1",{"x":11.5},"4,1","4,0"],
|
||||
[{"y":-0.375,"x":3.5},"1,3",{"x":7.5},"5,3"],
|
||||
[{"y":-0.875,"x":2.5},"1,2",{"x":1},"1,4",{"x":5.5},"5,4",{"x":1},"5,2"],
|
||||
[{"y":-0.875,"x":5.5},"1,5",{"x":3.5},"5,5"],
|
||||
[{"y":-0.875,"x":0.5},"1,0","1,1",{"x":11.5},"5,1","5,0"],
|
||||
[{"y":-0.375,"x":3.5},"2,3",{"x":7.5},"6,3"],
|
||||
[{"y":-0.875,"x":2.5},"2,2",{"x":1},"2,4",{"x":5.5},"6,4",{"x":1},"6,2"],
|
||||
[{"y":-0.875,"x":5.5},"2,5",{"x":3.5},"6,5"],
|
||||
[{"y":-0.875,"x":0.5},"2,0","2,1",{"x":11.5},"6,1","6,0"],
|
||||
[{"y":-0.125,"x":4},"3,3",{"x":6.5},"7,3"],
|
||||
[{"r":15,"rx":4.5,"ry":9.1,"y":-4.85,"x":-0.5},"3,4"],
|
||||
[{"r":30,"rx":5.4,"ry":9.3,"y":-5.05,"x":-1.4,"h":1.5},"3,5"],
|
||||
[{"r":-30,"rx":11.1,"y":-5.05,"x":0.4,"h":1.5},"7,5"],
|
||||
[{"r":-15,"rx":12,"ry":9.1,"y":-4.85,"x":-0.5},"7,4"]
|
||||
]
|
||||
}
|
||||
}
|
||||
111
keyboards/mew/keymaps/vial/config.h
Normal file
111
keyboards/mew/keymaps/vial/config.h
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
/*
|
||||
Copyright 2019 @foostan
|
||||
Copyright 2020 Drashna Jaelre <@drashna>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define NO_ACTION_ONESHOT
|
||||
#undef RGBLIGHT_ANIMATIONS
|
||||
#undef RGBLIGHT_EFFECT_BREATHING
|
||||
#undef RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#undef RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
#undef RGBLIGHT_EFFECT_SNAKE
|
||||
#undef RGBLIGHT_EFFECT_KNIGHT
|
||||
#undef RGBLIGHT_EFFECT_CHRISTMAS
|
||||
#undef RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
#undef RGBLIGHT_EFFECT_RGB_TEST
|
||||
#undef RGBLIGHT_EFFECT_ALTERNATING
|
||||
#undef RGBLIGHT_EFFECT_TWINKLE
|
||||
#undef ENABLE_RGB_MATRIX_ALPHAS_MODS
|
||||
#undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
|
||||
#undef ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
|
||||
#undef ENABLE_RGB_MATRIX_BREATHING
|
||||
#undef ENABLE_RGB_MATRIX_BAND_SAT
|
||||
#undef ENABLE_RGB_MATRIX_BAND_VAL
|
||||
#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
|
||||
#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
|
||||
#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
|
||||
#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
|
||||
#undef ENABLE_RGB_MATRIX_CYCLE_ALL
|
||||
#undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
|
||||
#undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
|
||||
#undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
|
||||
#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN
|
||||
#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
|
||||
#undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
|
||||
#undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL
|
||||
#undef ENABLE_RGB_MATRIX_DUAL_BEACON
|
||||
#undef ENABLE_RGB_MATRIX_RAINBOW_BEACON
|
||||
#undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
|
||||
#undef ENABLE_RGB_MATRIX_FLOWER_BLOOMING
|
||||
#undef ENABLE_RGB_MATRIX_RAINDROPS
|
||||
#undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
|
||||
#undef ENABLE_RGB_MATRIX_HUE_BREATHING
|
||||
#undef ENABLE_RGB_MATRIX_HUE_PENDULUM
|
||||
#undef ENABLE_RGB_MATRIX_HUE_WAVE
|
||||
#undef ENABLE_RGB_MATRIX_PIXEL_FRACTAL
|
||||
#undef ENABLE_RGB_MATRIX_PIXEL_FLOW
|
||||
#undef ENABLE_RGB_MATRIX_PIXEL_RAIN
|
||||
|
||||
#undef ENABLE_RGB_MATRIX_TYPING_HEATMAP
|
||||
#undef ENABLE_RGB_MATRIX_DIGITAL_RAIN
|
||||
|
||||
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
|
||||
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE
|
||||
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
|
||||
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
|
||||
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
|
||||
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
|
||||
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
|
||||
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
|
||||
#undef ENABLE_RGB_MATRIX_SPLASH
|
||||
#undef ENABLE_RGB_MATRIX_MULTISPLASH
|
||||
#undef ENABLE_RGB_MATRIX_SOLID_SPLASH
|
||||
#undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
|
||||
#ifndef NO_DEBUG
|
||||
#define NO_DEBUG
|
||||
#endif // !NO_DEBUG
|
||||
#if !defined(NO_PRINT) && !defined(CONSOLE_ENABLE)
|
||||
#define NO_PRINT
|
||||
#endif // !NO_PRINT
|
||||
#define SPLIT_USB_DETECT
|
||||
#define VIAL_KEYBOARD_UID {0x3B, 0x6B, 0xA0, 0x29, 0x80, 0x56, 0xED, 0xD1}
|
||||
#define VIAL_UNLOCK_COMBO_ROWS {0, 0}
|
||||
#define VIAL_UNLOCK_COMBO_COLS {0, 1}
|
||||
|
||||
#undef DYNAMIC_KEYMAP_LAYER_COUNT
|
||||
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
|
||||
#define TAPPING_TERM 250
|
||||
|
||||
//#define USE_MATRIX_I2C
|
||||
#ifdef KEYBOARD_crkbd_rev1_legacy
|
||||
# undef USE_I2C
|
||||
# define USE_SERIAL
|
||||
#endif
|
||||
|
||||
/* Select hand configuration */
|
||||
|
||||
#define MASTER_LEFT
|
||||
// #define MASTER_RIGHT
|
||||
// #define EE_HANDS"f
|
||||
|
||||
#define USE_SERIAL_PD2
|
||||
|
||||
|
||||
#define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c"
|
||||
#define SPLIT_WPM_ENABLE
|
||||
#define TAPPING_FORCE_HOLD
|
||||
164
keyboards/mew/keymaps/vial/crkbd.c
Normal file
164
keyboards/mew/keymaps/vial/crkbd.c
Normal file
|
|
@ -0,0 +1,164 @@
|
|||
/*
|
||||
Copyright 2019 @foostan
|
||||
Copyright 2020 Drashna Jaelre <@drashna>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#ifdef SWAP_HANDS_ENABLE
|
||||
__attribute__((weak)) const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// Left
|
||||
{{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}},
|
||||
{{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}},
|
||||
{{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6}},
|
||||
{{0, 7}, {1, 7}, {2, 7}, {3, 7}, {4, 7}, {5, 7}},
|
||||
// Right
|
||||
{{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}},
|
||||
{{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}},
|
||||
{{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2}},
|
||||
{{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}}
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
|
||||
oled_rotation_t oled_init_kb(oled_rotation_t rotation) {
|
||||
if (!is_keyboard_master()) {
|
||||
return OLED_ROTATION_180; // flips the display 180 degrees if offhand
|
||||
}
|
||||
return rotation;
|
||||
}
|
||||
|
||||
static void oled_render_layer_state(void) {
|
||||
oled_write_P(PSTR("Layer: "), false);
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case 0:
|
||||
oled_write_ln_P(PSTR("Default"), false);
|
||||
break;
|
||||
case 1:
|
||||
oled_write_ln_P(PSTR("Lower"), false);
|
||||
break;
|
||||
case 2:
|
||||
oled_write_ln_P(PSTR("Raise"), false);
|
||||
break;
|
||||
case 3:
|
||||
oled_write_ln_P(PSTR("Adjust"), false);
|
||||
break;
|
||||
default:
|
||||
oled_write_ln_P(PSTR("Undef"), false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
char key_name = ' ';
|
||||
uint16_t last_keycode;
|
||||
uint8_t last_row;
|
||||
uint8_t last_col;
|
||||
|
||||
static const char PROGMEM code_to_name[60] = {' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', 'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\', '#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '};
|
||||
|
||||
static void set_keylog(uint16_t keycode, keyrecord_t *record) {
|
||||
// save the row and column (useful even if we can't find a keycode to show)
|
||||
last_row = record->event.key.row;
|
||||
last_col = record->event.key.col;
|
||||
|
||||
key_name = ' ';
|
||||
last_keycode = keycode;
|
||||
if (IS_QK_MOD_TAP(keycode)) {
|
||||
if (record->tap.count) {
|
||||
keycode = QK_MOD_TAP_GET_TAP_KEYCODE(keycode);
|
||||
} else {
|
||||
keycode = 0xE0 + biton(QK_MOD_TAP_GET_MODS(keycode) & 0xF) + biton(QK_MOD_TAP_GET_MODS(keycode) & 0x10);
|
||||
}
|
||||
} else if (IS_QK_LAYER_TAP(keycode) && record->tap.count) {
|
||||
keycode = QK_LAYER_TAP_GET_TAP_KEYCODE(keycode);
|
||||
} else if (IS_QK_MODS(keycode)) {
|
||||
keycode = QK_MODS_GET_BASIC_KEYCODE(keycode);
|
||||
} else if (IS_QK_ONE_SHOT_MOD(keycode)) {
|
||||
keycode = 0xE0 + biton(QK_ONE_SHOT_MOD_GET_MODS(keycode) & 0xF) + biton(QK_ONE_SHOT_MOD_GET_MODS(keycode) & 0x10);
|
||||
}
|
||||
if (keycode > ARRAY_SIZE(code_to_name)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// update keylog
|
||||
key_name = pgm_read_byte(&code_to_name[keycode]);
|
||||
}
|
||||
|
||||
static const char *depad_str(const char *depad_str, char depad_char) {
|
||||
while (*depad_str == depad_char)
|
||||
++depad_str;
|
||||
return depad_str;
|
||||
}
|
||||
|
||||
static void oled_render_keylog(void) {
|
||||
oled_write_char('0' + last_row, false);
|
||||
oled_write_P(PSTR("x"), false);
|
||||
oled_write_char('0' + last_col, false);
|
||||
oled_write_P(PSTR(", k"), false);
|
||||
const char *last_keycode_str = get_u16_str(last_keycode, ' ');
|
||||
oled_write(depad_str(last_keycode_str, ' '), false);
|
||||
oled_write_P(PSTR(":"), false);
|
||||
oled_write_char(key_name, false);
|
||||
oled_advance_page(true);
|
||||
}
|
||||
|
||||
// static void render_bootmagic_status(bool status) {
|
||||
// /* Show Ctrl-Gui Swap options */
|
||||
// static const char PROGMEM logo[][2][3] = {
|
||||
// {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}},
|
||||
// {{0x95, 0x96, 0}, {0xb5, 0xb6, 0}},
|
||||
// };
|
||||
// if (status) {
|
||||
// oled_write_ln_P(logo[0][0], false);
|
||||
// oled_write_ln_P(logo[0][1], false);
|
||||
// } else {
|
||||
// oled_write_ln_P(logo[1][0], false);
|
||||
// oled_write_ln_P(logo[1][1], false);
|
||||
// }
|
||||
// }
|
||||
|
||||
__attribute__((weak)) void oled_render_logo(void) {
|
||||
// clang-format off
|
||||
static const char PROGMEM crkbd_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};
|
||||
// clang-format on
|
||||
oled_write_P(crkbd_logo, false);
|
||||
}
|
||||
|
||||
bool oled_task_kb(void) {
|
||||
if (!oled_task_user()) {
|
||||
return false;
|
||||
}
|
||||
if (is_keyboard_master()) {
|
||||
oled_render_layer_state();
|
||||
oled_render_keylog();
|
||||
} else {
|
||||
oled_render_logo();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
set_keylog(keycode, record);
|
||||
}
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
#endif // OLED_ENABLE
|
||||
176
keyboards/mew/keymaps/vial/keymap.c
Normal file
176
keyboards/mew/keymaps/vial/keymap.c
Normal file
|
|
@ -0,0 +1,176 @@
|
|||
/*
|
||||
Copyright 2019 @foostan
|
||||
Copyright 2020 Drashna Jaelre <@drashna>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_split_3x6_3(
|
||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_LCTL, 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_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ESC,
|
||||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_LGUI, TL_LOWR, KC_SPC, KC_ENT, TL_UPPR, KC_RALT
|
||||
//`--------------------------' `--------------------------'
|
||||
|
||||
),
|
||||
|
||||
[1] = LAYOUT_split_3x6_3(
|
||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, XXXXXXX, XXXXXXX,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT
|
||||
//`--------------------------' `--------------------------'
|
||||
),
|
||||
|
||||
[2] = LAYOUT_split_3x6_3(
|
||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_TILD,
|
||||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT
|
||||
//`--------------------------' `--------------------------'
|
||||
),
|
||||
|
||||
[3] = LAYOUT_split_3x6_3(
|
||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT
|
||||
//`--------------------------' `--------------------------'
|
||||
)
|
||||
};
|
||||
#ifndef MAGIC_ENABLE
|
||||
uint16_t keycode_config(uint16_t keycode) {
|
||||
return keycode;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
#include <stdio.h>
|
||||
#include <oled.c>
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||
if (!is_keyboard_master()) {
|
||||
return OLED_ROTATION_180; // flips the display 180 degrees if offhand
|
||||
}
|
||||
return rotation;
|
||||
}
|
||||
|
||||
#define L_BASE 0
|
||||
#define L_LOWER 2
|
||||
#define L_RAISE 4
|
||||
#define L_ADJUST 8
|
||||
|
||||
void oled_render_layer_state(void) {
|
||||
oled_write_P(PSTR("Layer: "), false);
|
||||
switch (layer_state) {
|
||||
case L_BASE:
|
||||
oled_write_ln_P(PSTR("Default"), false);
|
||||
break;
|
||||
case L_LOWER:
|
||||
oled_write_ln_P(PSTR("Lower"), false);
|
||||
break;
|
||||
case L_RAISE:
|
||||
oled_write_ln_P(PSTR("Raise"), false);
|
||||
break;
|
||||
case L_ADJUST:
|
||||
case L_ADJUST|L_LOWER:
|
||||
case L_ADJUST|L_RAISE:
|
||||
case L_ADJUST|L_LOWER|L_RAISE:
|
||||
oled_write_ln_P(PSTR("Adjust"), false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
char keylog_str[24] = {};
|
||||
|
||||
const char code_to_name[60] = {
|
||||
' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
|
||||
'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
|
||||
'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
|
||||
'1', '2', '3', '4', '5', '6', '7', '8', '9', '0',
|
||||
'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\',
|
||||
'#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '};
|
||||
|
||||
void set_keylog(uint16_t keycode, keyrecord_t *record) {
|
||||
char name = ' ';
|
||||
if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) ||
|
||||
(keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { keycode = keycode & 0xFF; }
|
||||
if (keycode < 60) {
|
||||
name = code_to_name[keycode];
|
||||
}
|
||||
|
||||
// update keylog
|
||||
snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c",
|
||||
record->event.key.row, record->event.key.col,
|
||||
keycode, name);
|
||||
}
|
||||
|
||||
void oled_render_keylog(void) {
|
||||
oled_write(keylog_str, false);
|
||||
}
|
||||
|
||||
void render_bootmagic_status(bool status) {
|
||||
/* Show Ctrl-Gui Swap options */
|
||||
static const char PROGMEM logo[][2][3] = {
|
||||
{{0x97, 0x98, 0}, {0xb7, 0xb8, 0}},
|
||||
{{0x95, 0x96, 0}, {0xb5, 0xb6, 0}},
|
||||
};
|
||||
if (status) {
|
||||
oled_write_ln_P(logo[0][0], false);
|
||||
oled_write_ln_P(logo[0][1], false);
|
||||
} else {
|
||||
oled_write_ln_P(logo[1][0], false);
|
||||
oled_write_ln_P(logo[1][1], false);
|
||||
}
|
||||
}
|
||||
|
||||
void oled_render_logo(void) {
|
||||
static const char PROGMEM crkbd_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(crkbd_logo, false);
|
||||
}
|
||||
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
set_keylog(keycode, record);
|
||||
}
|
||||
return true;
|
||||
|
||||
|
||||
}
|
||||
#endif // OLED_ENABL
|
||||
|
||||
189
keyboards/mew/keymaps/vial/oled.c
Normal file
189
keyboards/mew/keymaps/vial/oled.c
Normal file
|
|
@ -0,0 +1,189 @@
|
|||
/*
|
||||
Copyright 2019 @foostan
|
||||
Copyright 2020 Drashna Jaelre <@drashna>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// OLED setup
|
||||
#define IDLE_FRAMES 5
|
||||
#define IDLE_SPEED 30
|
||||
#define TAP_FRAMES 2
|
||||
#define TAP_SPEED 40
|
||||
#define ANIM_FRAME_DURATION 200
|
||||
#define ANIM_SIZE 512
|
||||
|
||||
bool gui_on = true;
|
||||
char wpm_str[10];
|
||||
uint32_t anim_timer = 0;
|
||||
uint32_t anim_sleep = 0;
|
||||
uint8_t current_idle_frame = 0;
|
||||
uint8_t current_tap_frame = 0;
|
||||
|
||||
static long int oled_timeout = 600000; // 10 minutes
|
||||
|
||||
//
|
||||
// Rotate OLED display
|
||||
//
|
||||
//
|
||||
// Render left OLED display
|
||||
//
|
||||
static void render_status(void) {
|
||||
|
||||
// WPM
|
||||
oled_write_P(PSTR(" "), false);
|
||||
oled_write_P(PSTR(" "), false);
|
||||
sprintf(wpm_str, "%03d", get_current_wpm());
|
||||
oled_write(wpm_str, false);
|
||||
oled_write_P(PSTR(" WPM \n \n"), false);
|
||||
oled_write_P(PSTR(" \n"), false);
|
||||
|
||||
// Layer indicator
|
||||
oled_write_P(PSTR("LAYER"), false);
|
||||
oled_write_P(PSTR(" \n"), false);
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case 2:
|
||||
oled_write_P(PSTR("RAISE"), false);
|
||||
break;
|
||||
// Layer 1
|
||||
case 1:
|
||||
oled_write_P(PSTR("LOWER"), false);
|
||||
break;
|
||||
// Layer 0
|
||||
default:
|
||||
oled_write_P(PSTR("BASE "), false);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
// Render right OLED display animation
|
||||
//
|
||||
static void render_anim(void) {
|
||||
|
||||
// Idle animation
|
||||
static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = {
|
||||
|
||||
{
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,16,8,8,4,4,4,8,48,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,100,130,2,2,2,2,2,1,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,192,193,193,194,4,8,16,32,64,128,0,0,0,128,128,128,128,64,64,
|
||||
64,64,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,56,4,3,0,0,0,0,0,0,0,12,12,12,13,1,0,64,160,33,34,18,17,17,17,9,8,8,8,8,4,4,8,8,16,16,16,16,16,17,15,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,2,2,4,4,8,8,8,8,8,7,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
},
|
||||
|
||||
{
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,16,8,8,4,4,4,8,48,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,100,130,2,2,2,2,2,1,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,192,193,193,194,4,8,16,32,64,128,0,0,0,128,128,128,128,64,64,
|
||||
64,64,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,56,4,3,0,0,0,0,0,0,0,12,12,12,13,1,0,64,160,33,34,18,17,17,17,9,8,8,8,8,4,4,8,8,16,16,16,16,16,17,15,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,2,2,4,4,8,8,8,8,8,
|
||||
7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
},
|
||||
|
||||
{
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,64,64,64,64,32,32,32,32,16,8,4,2,2,4,24,96,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,194,1,1,2,2,4,4,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,96,0,129,130,130,132,8,16,32,64,128,0,0,0,0,128,128,128,128,64,64,64,64,32,
|
||||
32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,25,6,0,0,0,0,0,0,0,24,24,24,27,3,0,64,160,34,36,20,18,18,18,11,8,8,8,8,5,5,9,9,16,16,16,16,16,17,15,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,2,2,4,4,8,8,8,8,8,7,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
},
|
||||
|
||||
{
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,8,4,2,1,1,2,12,48,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,225,0,0,1,1,2,2,1,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,192,193,193,194,4,8,16,32,64,128,0,0,0,128,128,128,128,64,64,
|
||||
64,64,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,12,3,0,0,0,0,0,0,0,12,12,12,13,1,0,64,160,33,34,18,17,17,17,9,8,8,8,8,4,4,8,8,16,16,16,16,16,17,15,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,2,2,4,4,8,8,8,8,8,
|
||||
7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
},
|
||||
|
||||
{
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,8,8,4,2,2,2,4,56,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,226,1,1,2,2,2,2,1,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,192,193,193,194,4,8,16,32,64,128,0,0,0,128,128,128,128,64,64,64,64,
|
||||
32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,12,3,0,0,0,0,0,0,0,12,12,12,13,1,0,64,160,33,34,18,17,17,17,9,8,8,8,8,4,4,8,8,16,16,16,16,16,17,15,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,2,2,4,4,8,8,8,8,8,7,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Prep animation
|
||||
static const char PROGMEM prep[][ANIM_SIZE] = {
|
||||
|
||||
{
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,8,4,2,1,1,2,12,48,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,225,0,0,1,1,2,2,129,128,128,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,0,1,225,26,6,9,49,53,1,138,124,0,0,128,128,128,128,64,64,
|
||||
64,64,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,12,3,0,0,24,6,5,152,153,132,195,124,65,65,64,64,32,33,34,18,17,17,17,9,8,8,8,8,4,4,4,4,4,4,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Typing animation
|
||||
static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = {
|
||||
|
||||
{
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,8,4,2,1,1,2,12,48,64,128,0,0,0,0,0,0,0,248,248,248,248,0,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,225,0,0,1,1,2,2,129,128,128,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,0,1,1,2,4,8,16,32,67,135,7,1,0,184,188,190,159,
|
||||
95,95,79,76,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,12,3,0,0,24,6,5,152,153,132,67,124,65,65,64,64,32,33,34,18,17,17,17,9,8,8,8,8,4,4,8,8,16,16,16,16,16,17,15,1,61,124,252,252,252,252,252,60,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,
|
||||
1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
},
|
||||
|
||||
{
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,8,4,2,1,1,2,12,48,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,225,0,0,1,1,2,2,1,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,0,1,225,26,6,9,49,53,1,138,124,0,0,128,128,128,128,64,64,64,64,32,
|
||||
32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,12,3,0,0,0,0,0,0,0,0,0,0,1,1,0,64,160,33,34,18,17,17,17,9,8,8,8,8,4,4,4,4,4,4,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,122,122,121,121,121,121,57,49,2,2,4,4,8,8,8,136,136,135,128,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
void animation_phase(void) {
|
||||
|
||||
if (get_current_wpm() <=IDLE_SPEED) {
|
||||
current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES;
|
||||
oled_write_raw_P(idle[abs((IDLE_FRAMES-1)-current_idle_frame)], ANIM_SIZE);
|
||||
}
|
||||
|
||||
if (get_current_wpm() >IDLE_SPEED && get_current_wpm() <TAP_SPEED) {
|
||||
oled_write_raw_P(prep[0], ANIM_SIZE);
|
||||
}
|
||||
|
||||
if (get_current_wpm() >=TAP_SPEED) {
|
||||
current_tap_frame = (current_tap_frame + 1) % TAP_FRAMES;
|
||||
oled_write_raw_P(tap[abs((TAP_FRAMES-1)-current_tap_frame)], ANIM_SIZE);
|
||||
}
|
||||
}
|
||||
|
||||
if (get_current_wpm() != 000) {
|
||||
oled_on();
|
||||
|
||||
if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) {
|
||||
anim_timer = timer_read32();
|
||||
animation_phase();
|
||||
}
|
||||
|
||||
anim_sleep = timer_read32();
|
||||
} else {
|
||||
if (timer_elapsed32(anim_sleep) > oled_timeout) {
|
||||
oled_off();
|
||||
} else {
|
||||
if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) {
|
||||
anim_timer = timer_read32();
|
||||
animation_phase();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// OLED display rendering
|
||||
//
|
||||
bool oled_task_user(void) {
|
||||
if (is_keyboard_master()) {
|
||||
// Left side
|
||||
render_status();
|
||||
} else {
|
||||
// Right side
|
||||
render_anim();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
22
keyboards/mew/keymaps/vial/rules.mk
Normal file
22
keyboards/mew/keymaps/vial/rules.mk
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
VIA_ENABLE = yes
|
||||
VIAL_ENABLE = yes
|
||||
LTO_ENABLE = no
|
||||
|
||||
RGBLIGHT_ENABLE = no
|
||||
RGB_MATRIX_ENABLE = no # Can't have RGBLIGHT and RGB_MATRIX at the same time.
|
||||
MOUSEKEY_ENABLE = no
|
||||
OLED_ENABLE = yes
|
||||
OLED_DRIVER = ssd1306
|
||||
EXTRAKEY_ENABLE = no
|
||||
COMBO_ENABLE = no
|
||||
WPM_ENABLE = yes
|
||||
QMK_SETTINGS = no
|
||||
EXTRAFLAGS += -flto
|
||||
CONSOLE_ENABLE = no
|
||||
AUDIO_ENABLE = no
|
||||
LINK_TIME_OPTIMIZATION_ENABLE = yes
|
||||
SPACE_CADET_ENABLE=no
|
||||
COMMAND_ENABLE = no
|
||||
GRAVE_ESC_ENABLE = no
|
||||
MAGIC_ENABLE = no
|
||||
AVR_USE_MINIMAL_PRINTF = yes
|
||||
30
keyboards/mew/keymaps/vial/vial.json
Normal file
30
keyboards/mew/keymaps/vial/vial.json
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"name": "Crkbd",
|
||||
"vendorId": "0x4653",
|
||||
"productId": "0x0001",
|
||||
"lighting": {
|
||||
"extends": "qmk_rgblight"
|
||||
},
|
||||
"matrix": { "rows": 8, "cols": 6 },
|
||||
"layouts": {
|
||||
"keymap": [
|
||||
[{"y":1,"x":3.5},"0,3",{"x":7.5},"4,3"],
|
||||
[{"y":-0.875,"x":2.5},"0,2",{"x":1},"0,4",{"x":5.5},"4,4",{"x":1},"4,2"],
|
||||
[{"y":-0.875,"x":5.5},"0,5",{"x":3.5},"4,5"],
|
||||
[{"y":-0.875,"x":0.5},"0,0","0,1",{"x":11.5},"4,1","4,0"],
|
||||
[{"y":-0.375,"x":3.5},"1,3",{"x":7.5},"5,3"],
|
||||
[{"y":-0.875,"x":2.5},"1,2",{"x":1},"1,4",{"x":5.5},"5,4",{"x":1},"5,2"],
|
||||
[{"y":-0.875,"x":5.5},"1,5",{"x":3.5},"5,5"],
|
||||
[{"y":-0.875,"x":0.5},"1,0","1,1",{"x":11.5},"5,1","5,0"],
|
||||
[{"y":-0.375,"x":3.5},"2,3",{"x":7.5},"6,3"],
|
||||
[{"y":-0.875,"x":2.5},"2,2",{"x":1},"2,4",{"x":5.5},"6,4",{"x":1},"6,2"],
|
||||
[{"y":-0.875,"x":5.5},"2,5",{"x":3.5},"6,5"],
|
||||
[{"y":-0.875,"x":0.5},"2,0","2,1",{"x":11.5},"6,1","6,0"],
|
||||
[{"y":-0.125,"x":4},"3,3",{"x":6.5},"7,3"],
|
||||
[{"r":15,"rx":4.5,"ry":9.1,"y":-4.85,"x":-0.5},"3,4"],
|
||||
[{"r":30,"rx":5.4,"ry":9.3,"y":-5.05,"x":-1.4,"h":1.5},"3,5"],
|
||||
[{"r":-30,"rx":11.1,"y":-5.05,"x":0.4,"h":1.5},"7,5"],
|
||||
[{"r":-15,"rx":12,"ry":9.1,"y":-4.85,"x":-0.5},"7,4"]
|
||||
]
|
||||
}
|
||||
}
|
||||
21
keyboards/mew/post_config.h
Normal file
21
keyboards/mew/post_config.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef OLED_FONT_H
|
||||
# define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c"
|
||||
#endif
|
||||
95
keyboards/mew/rev1/keyboard.json
Normal file
95
keyboards/mew/rev1/keyboard.json
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
{
|
||||
"keyboard_name": "Corne",
|
||||
"usb": {
|
||||
"pid": "0x0001",
|
||||
"device_version": "0.0.1"
|
||||
},
|
||||
"features": {
|
||||
"rgblight": false
|
||||
},
|
||||
"build": {
|
||||
"lto": true
|
||||
},
|
||||
"matrix_pins": {
|
||||
"cols": [ "F4", "F5", "F6", "F7", "B1", "B3" ],
|
||||
"rows": [ "D4", "C6", "D7", "E6" ]
|
||||
},
|
||||
"diode_direction": "COL2ROW",
|
||||
"split": {
|
||||
"serial": {
|
||||
"pin": "D2"
|
||||
},
|
||||
"transport": {
|
||||
"sync": {
|
||||
"matrix_state": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"rgblight": {
|
||||
"led_count": 54,
|
||||
"split_count": [27, 27]
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "D3"
|
||||
},
|
||||
"rgb_matrix": {
|
||||
"split_count": [27, 27],
|
||||
"layout": [
|
||||
{"x": 85, "y": 16, "flags": 2},
|
||||
{"x": 50, "y": 13, "flags": 2},
|
||||
{"x": 16, "y": 20, "flags": 2},
|
||||
{"x": 16, "y": 38, "flags": 2},
|
||||
{"x": 50, "y": 48, "flags": 2},
|
||||
{"x": 85, "y": 52, "flags": 2},
|
||||
{"matrix": [3, 5], "x": 95, "y": 63, "flags": 1},
|
||||
{"matrix": [2, 5], "x": 85, "y": 39, "flags": 4},
|
||||
{"matrix": [1, 5], "x": 85, "y": 21, "flags": 4},
|
||||
{"matrix": [0, 5], "x": 85, "y": 4, "flags": 4},
|
||||
{"matrix": [0, 4], "x": 68, "y": 2, "flags": 4},
|
||||
{"matrix": [1, 4], "x": 68, "y": 19, "flags": 4},
|
||||
{"matrix": [2, 4], "x": 68, "y": 37, "flags": 4},
|
||||
{"matrix": [3, 4], "x": 80, "y": 58, "flags": 1},
|
||||
{"matrix": [3, 3], "x": 60, "y": 55, "flags": 1},
|
||||
{"matrix": [2, 3], "x": 50, "y": 35, "flags": 4},
|
||||
{"matrix": [1, 3], "x": 50, "y": 13, "flags": 4},
|
||||
{"matrix": [0, 3], "x": 50, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 2], "x": 33, "y": 3, "flags": 4},
|
||||
{"matrix": [1, 2], "x": 33, "y": 20, "flags": 4},
|
||||
{"matrix": [2, 2], "x": 33, "y": 37, "flags": 4},
|
||||
{"matrix": [2, 1], "x": 16, "y": 42, "flags": 4},
|
||||
{"matrix": [1, 1], "x": 16, "y": 24, "flags": 4},
|
||||
{"matrix": [0, 1], "x": 16, "y": 7, "flags": 4},
|
||||
{"matrix": [0, 0], "x": 0, "y": 7, "flags": 1},
|
||||
{"matrix": [1, 0], "x": 0, "y": 24, "flags": 1},
|
||||
{"matrix": [2, 0], "x": 0, "y": 41, "flags": 1},
|
||||
{"x": 139, "y": 16, "flags": 2},
|
||||
{"x": 174, "y": 13, "flags": 2},
|
||||
{"x": 208, "y": 20, "flags": 2},
|
||||
{"x": 208, "y": 38, "flags": 2},
|
||||
{"x": 174, "y": 48, "flags": 2},
|
||||
{"x": 139, "y": 52, "flags": 2},
|
||||
{"matrix": [7, 5], "x": 129, "y": 63, "flags": 1},
|
||||
{"matrix": [6, 5], "x": 139, "y": 39, "flags": 4},
|
||||
{"matrix": [5, 5], "x": 139, "y": 21, "flags": 4},
|
||||
{"matrix": [4, 5], "x": 139, "y": 4, "flags": 4},
|
||||
{"matrix": [4, 4], "x": 156, "y": 2, "flags": 4},
|
||||
{"matrix": [5, 4], "x": 156, "y": 19, "flags": 4},
|
||||
{"matrix": [6, 4], "x": 156, "y": 37, "flags": 4},
|
||||
{"matrix": [7, 4], "x": 144, "y": 58, "flags": 1},
|
||||
{"matrix": [7, 3], "x": 164, "y": 55, "flags": 1},
|
||||
{"matrix": [6, 3], "x": 174, "y": 35, "flags": 4},
|
||||
{"matrix": [5, 3], "x": 174, "y": 13, "flags": 4},
|
||||
{"matrix": [4, 3], "x": 174, "y": 0, "flags": 4},
|
||||
{"matrix": [4, 2], "x": 191, "y": 3, "flags": 4},
|
||||
{"matrix": [5, 2], "x": 191, "y": 20, "flags": 4},
|
||||
{"matrix": [6, 2], "x": 191, "y": 37, "flags": 4},
|
||||
{"matrix": [6, 1], "x": 208, "y": 42, "flags": 4},
|
||||
{"matrix": [5, 1], "x": 208, "y": 24, "flags": 4},
|
||||
{"matrix": [4, 1], "x": 208, "y": 7, "flags": 4},
|
||||
{"matrix": [4, 0], "x": 224, "y": 7, "flags": 1},
|
||||
{"matrix": [5, 0], "x": 224, "y": 24, "flags": 1},
|
||||
{"matrix": [6, 0], "x": 224, "y": 41, "flags": 1}
|
||||
]
|
||||
},
|
||||
"development_board": "promicro"
|
||||
}
|
||||
51
keyboards/splitkb/aurora/corne/keymaps/vial/config.h
Normal file
51
keyboards/splitkb/aurora/corne/keymaps/vial/config.h
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
#pragma once
|
||||
|
||||
#define VIAL_KEYBOARD_UID {0x3B, 0x6B, 0xA0, 0x29, 0x80, 0x56, 0xED, 0xD1}
|
||||
#define VIAL_UNLOCK_COMBO_ROWS {0, 0}
|
||||
#define VIAL_UNLOCK_COMBO_COLS {0, 1}
|
||||
|
||||
#define DYNAMIC_KEYMAP_LAYER_COUNT 3
|
||||
#define TAPPING_TERM 180
|
||||
|
||||
//#define USE_MATRIX_I2C
|
||||
// #ifdef KEYBOARD_crkbd_rev1_legacy
|
||||
// # undef USE_I2C
|
||||
// # define USE_SERIAL
|
||||
// #endif
|
||||
|
||||
/* Select hand configuration */
|
||||
#define MASTER_LEFT
|
||||
// #define MASTER_RIGHT
|
||||
// #define EE_HANDS
|
||||
|
||||
// #define USE_SERIAL_PD2
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
# undef RGBLIGHT_LED_COUNT
|
||||
# define RGBLIGHT_ANIMATIONS
|
||||
# define RGBLIGHT_LED_COUNT 54
|
||||
# undef RGBLED_SPLIT
|
||||
# define RGBLED_SPLIT { 27, 27 }
|
||||
# define RGBLIGHT_LIMIT_VAL 120
|
||||
# define RGBLIGHT_HUE_STEP 10
|
||||
# define RGBLIGHT_SAT_STEP 17
|
||||
# define RGBLIGHT_VAL_STEP 17
|
||||
#endif
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
|
||||
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
|
||||
# define RGB_MATRIX_SLEEP // turn off effects when suspended
|
||||
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
|
||||
// # define RGB_MATRIX_LED_PROCESS_LIMIT (RGB_MATRIX_LED_COUNT + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
|
||||
// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
|
||||
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
|
||||
# define RGB_MATRIX_HUE_STEP 8
|
||||
# define RGB_MATRIX_SAT_STEP 8
|
||||
# define RGB_MATRIX_VAL_STEP 8
|
||||
# define RGB_MATRIX_SPD_STEP 10
|
||||
// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
|
||||
#endif
|
||||
|
||||
#define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c"
|
||||
|
||||
#define SPLIT_WPM_ENABLE
|
||||
337
keyboards/splitkb/aurora/corne/keymaps/vial/keymap.c
Normal file
337
keyboards/splitkb/aurora/corne/keymaps/vial/keymap.c
Normal file
|
|
@ -0,0 +1,337 @@
|
|||
#include QMK_KEYBOARD_H
|
||||
|
||||
enum layers {
|
||||
_QWERTY,
|
||||
_PROGRAM,
|
||||
_NUMBERS,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QWERTY] = LAYOUT_split_3x6_3(
|
||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_LCTL, 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_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ESC,
|
||||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_LGUI, TL_LOWR, KC_SPC, KC_ENT, TL_UPPR, KC_RALT
|
||||
//`--------------------------' `--------------------------'
|
||||
|
||||
),
|
||||
|
||||
[_PROGRAM] = LAYOUT_split_3x6_3(
|
||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, XXXXXXX, XXXXXXX,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT
|
||||
//`--------------------------' `--------------------------'
|
||||
),
|
||||
|
||||
[_NUMBERS] = LAYOUT_split_3x6_3(
|
||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_TILD,
|
||||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT
|
||||
//`--------------------------' `--------------------------'
|
||||
)
|
||||
|
||||
// [3] = LAYOUT_split_3x6_3(
|
||||
// //,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
// QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
// //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
// RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
// //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
// RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
// //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
||||
// KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT
|
||||
// //`--------------------------' `--------------------------'
|
||||
// )
|
||||
};
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
#include <stdio.h>
|
||||
|
||||
/* 32 * 14 os logos */
|
||||
static const char PROGMEM windows_logo[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbc, 0xbc, 0xbe, 0xbe, 0x00, 0xbe, 0xbe, 0xbf, 0xbf, 0xbf, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x0f, 0x0f, 0x00, 0x0f, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
static const char PROGMEM mac_logo[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf0, 0xf8, 0xf8, 0xf8, 0xf0, 0xf6, 0xfb, 0xfb, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x0f, 0x1f, 0x1f, 0x0f, 0x0f, 0x1f, 0x1f, 0x0f, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
/* KEYBOARD PET START */
|
||||
|
||||
/* settings */
|
||||
# define MIN_WALK_SPEED 10
|
||||
# define MIN_RUN_SPEED 40
|
||||
|
||||
/* advanced settings */
|
||||
# define ANIM_FRAME_DURATION 200 // how long each frame lasts in ms
|
||||
# define ANIM_SIZE 96 // number of bytes in array. If you change sprites, minimize for adequate firmware size. max is 1024
|
||||
|
||||
/* timers */
|
||||
uint32_t anim_timer = 0;
|
||||
|
||||
/* current frame */
|
||||
uint8_t current_frame = 0;
|
||||
|
||||
/* status variables */
|
||||
int current_wpm = 0;
|
||||
led_t led_usb_state;
|
||||
|
||||
bool isSneaking = false;
|
||||
bool isJumping = false;
|
||||
bool showedJump = true;
|
||||
|
||||
/* logic */
|
||||
static void render_luna(int LUNA_X, int LUNA_Y) {
|
||||
/* Sit */
|
||||
static const char PROGMEM sit[2][ANIM_SIZE] = {/* 'sit1', 32x22px */
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x68, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28, 0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
},
|
||||
|
||||
/* 'sit2', 32x22px */
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x90, 0x08, 0x18, 0x60, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0e, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28, 0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}};
|
||||
|
||||
/* Walk */
|
||||
static const char PROGMEM walk[2][ANIM_SIZE] = {/* 'walk1', 32x22px */
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x90, 0x90, 0x90, 0xa0, 0xc0, 0x80, 0x80, 0x80, 0x70, 0x08, 0x14, 0x08, 0x90, 0x10, 0x10, 0x08, 0xa4, 0x78, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x18, 0xea, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x20, 0x20, 0x3c, 0x0f, 0x11, 0x1f, 0x03, 0x06, 0x18, 0x20, 0x20, 0x3c, 0x0c, 0x12, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
},
|
||||
|
||||
/* 'walk2', 32x22px */
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x20, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x28, 0x10, 0x20, 0x20, 0x20, 0x10, 0x48, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x20, 0xf8, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x30, 0xd5, 0x20, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x30, 0x0c, 0x02, 0x05, 0x09, 0x12, 0x1e, 0x02, 0x1c, 0x14, 0x08, 0x10, 0x20, 0x2c, 0x32, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
}};
|
||||
|
||||
/* Run */
|
||||
static const char PROGMEM run[2][ANIM_SIZE] = {/* 'run1', 32x22px */
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x08, 0xc8, 0xb0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0xc4, 0xa4, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x58, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x09, 0x04, 0x04, 0x04, 0x04, 0x02, 0x03, 0x02, 0x01, 0x01, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
},
|
||||
|
||||
/* 'run2', 32x22px */
|
||||
{
|
||||
0x00, 0x00, 0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x78, 0x28, 0x08, 0x10, 0x20, 0x30, 0x08, 0x10, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x10, 0xb0, 0x50, 0x55, 0x20, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x1e, 0x20, 0x20, 0x18, 0x0c, 0x14, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
}};
|
||||
|
||||
/* Bark */
|
||||
static const char PROGMEM bark[2][ANIM_SIZE] = {/* 'bark1', 32x22px */
|
||||
{
|
||||
0x00, 0xc0, 0x20, 0x10, 0xd0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
},
|
||||
|
||||
/* 'bark2', 32x22px */
|
||||
{
|
||||
0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x2c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x20, 0x4a, 0x09, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
}};
|
||||
|
||||
/* Sneak */
|
||||
static const char PROGMEM sneak[2][ANIM_SIZE] = {/* 'sneak1', 32x22px */
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x40, 0x40, 0x80, 0x00, 0x80, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x21, 0xf0, 0x04, 0x02, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x04, 0x04, 0x04, 0x03, 0x01, 0x00, 0x00, 0x09, 0x01, 0x80, 0x80, 0xab, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x20, 0x20, 0x3c, 0x0f, 0x11, 0x1f, 0x02, 0x06, 0x18, 0x20, 0x20, 0x38, 0x08, 0x10, 0x18, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00,
|
||||
},
|
||||
|
||||
/* 'sneak2', 32x22px */
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xa0, 0x20, 0x40, 0x80, 0xc0, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x41, 0xf0, 0x04, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x02, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x40, 0x40, 0x55, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x30, 0x0c, 0x02, 0x05, 0x09, 0x12, 0x1e, 0x04, 0x18, 0x10, 0x08, 0x10, 0x20, 0x28, 0x34, 0x06, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
}};
|
||||
|
||||
/* animation */
|
||||
void animate_luna(void) {
|
||||
/* jump */
|
||||
if (isJumping || !showedJump) {
|
||||
/* clear */
|
||||
oled_set_cursor(LUNA_X, LUNA_Y + 2);
|
||||
oled_write(" ", false);
|
||||
|
||||
oled_set_cursor(LUNA_X, LUNA_Y - 1);
|
||||
|
||||
showedJump = true;
|
||||
} else {
|
||||
/* clear */
|
||||
oled_set_cursor(LUNA_X, LUNA_Y - 1);
|
||||
oled_write(" ", false);
|
||||
|
||||
oled_set_cursor(LUNA_X, LUNA_Y);
|
||||
}
|
||||
|
||||
/* switch frame */
|
||||
current_frame = (current_frame + 1) % 2;
|
||||
|
||||
/* current status */
|
||||
if (led_usb_state.caps_lock) {
|
||||
oled_write_raw_P(bark[current_frame], ANIM_SIZE);
|
||||
|
||||
} else if (isSneaking) {
|
||||
oled_write_raw_P(sneak[current_frame], ANIM_SIZE);
|
||||
|
||||
} else if (current_wpm <= MIN_WALK_SPEED) {
|
||||
oled_write_raw_P(sit[current_frame], ANIM_SIZE);
|
||||
|
||||
} else if (current_wpm <= MIN_RUN_SPEED) {
|
||||
oled_write_raw_P(walk[current_frame], ANIM_SIZE);
|
||||
|
||||
} else {
|
||||
oled_write_raw_P(run[current_frame], ANIM_SIZE);
|
||||
}
|
||||
}
|
||||
|
||||
#if OLED_TIMEOUT > 0
|
||||
/* the animation prevents the normal timeout from occuring */
|
||||
if (last_input_activity_elapsed() > OLED_TIMEOUT && last_led_activity_elapsed() > OLED_TIMEOUT) {
|
||||
oled_off();
|
||||
return;
|
||||
} else {
|
||||
oled_on();
|
||||
}
|
||||
#endif
|
||||
|
||||
/* animation timer */
|
||||
if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) {
|
||||
anim_timer = timer_read32();
|
||||
animate_luna();
|
||||
}
|
||||
}
|
||||
/* KEYBOARD PET END */
|
||||
|
||||
void render_logo(void) {
|
||||
static const char PROGMEM crkbd_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(crkbd_logo, false);
|
||||
}
|
||||
|
||||
static void print_logo_narrow(void) {
|
||||
render_logo();
|
||||
|
||||
/* wpm counter */
|
||||
// uint8_t n = get_current_wpm();
|
||||
// char wpm_str[4];
|
||||
// oled_set_cursor(0, 14);
|
||||
// wpm_str[3] = '\0';
|
||||
// wpm_str[2] = '0' + n % 10;
|
||||
// wpm_str[1] = '0' + (n /= 10) % 10;
|
||||
// wpm_str[0] = '0' + n / 10;
|
||||
// oled_write(wpm_str, false);
|
||||
|
||||
// oled_set_cursor(0, 15);
|
||||
// oled_write(" wpm", false);
|
||||
}
|
||||
|
||||
static void print_status_narrow(void) {
|
||||
/* Print current mode */
|
||||
oled_set_cursor(0, 0);
|
||||
if (keymap_config.swap_lctl_lgui) {
|
||||
oled_write_raw_P(mac_logo, sizeof(mac_logo));
|
||||
} else {
|
||||
oled_write_raw_P(windows_logo, sizeof(windows_logo));
|
||||
}
|
||||
|
||||
oled_set_cursor(0, 3);
|
||||
|
||||
// switch (get_highest_layer(default_layer_state)) {
|
||||
// case _QWERTY:
|
||||
// oled_write("QWRTY", false);
|
||||
// break;
|
||||
// case _PROGRAM:
|
||||
// oled_write("PROG", false);
|
||||
// break;
|
||||
// case _NUMBERS:
|
||||
// oled_write("NUMB", false);
|
||||
// break;
|
||||
// default:
|
||||
// oled_write("UNDEF", false);
|
||||
// }
|
||||
|
||||
// oled_set_cursor(0, 5);
|
||||
|
||||
/* Print current layer */
|
||||
oled_write("LAYER", false);
|
||||
|
||||
oled_set_cursor(0, 4);
|
||||
// oled_set_cursor(0, 6);
|
||||
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case _QWERTY:
|
||||
oled_write("Base ", false);
|
||||
break;
|
||||
case _PROGRAM:
|
||||
oled_write("Prog", false);
|
||||
break;
|
||||
case _NUMBERS:
|
||||
oled_write("Numb", false);
|
||||
break;
|
||||
default:
|
||||
oled_write("Undef", false);
|
||||
}
|
||||
|
||||
/* caps lock */
|
||||
// oled_set_cursor(0, 8);
|
||||
oled_set_cursor(0, 6);
|
||||
oled_write("CPSLK", led_usb_state.caps_lock);
|
||||
|
||||
/* KEYBOARD PET RENDER START */
|
||||
|
||||
// render_luna(0, 13);
|
||||
render_luna(0, 11);
|
||||
|
||||
/* KEYBOARD PET RENDER END */
|
||||
}
|
||||
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||
if (!is_keyboard_master()) {
|
||||
return OLED_ROTATION_180; // flips the display 180 degrees if offhand
|
||||
}
|
||||
return OLED_ROTATION_270;
|
||||
}
|
||||
|
||||
bool oled_task_user(void) {
|
||||
/* KEYBOARD PET VARIABLES START */
|
||||
current_wpm = get_current_wpm();
|
||||
led_usb_state = host_keyboard_led_state();
|
||||
if (is_keyboard_master()) {
|
||||
print_status_narrow();
|
||||
} else {
|
||||
print_logo_narrow();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
// if (record->event.pressed) {
|
||||
// set_keylog(keycode, record);
|
||||
// }
|
||||
// return true;
|
||||
switch (keycode) {
|
||||
/* KEYBOARD PET STATUS START */
|
||||
case KC_LCTL:
|
||||
case KC_RCTL:
|
||||
if (record->event.pressed) {
|
||||
isSneaking = true;
|
||||
} else {
|
||||
isSneaking = false;
|
||||
}
|
||||
break;
|
||||
case KC_SPC:
|
||||
if (record->event.pressed) {
|
||||
isJumping = true;
|
||||
showedJump = false;
|
||||
} else {
|
||||
isJumping = false;
|
||||
}
|
||||
break;
|
||||
/* KEYBOARD PET STATUS END */
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif // OLED_ENABLE
|
||||
30
keyboards/splitkb/aurora/corne/keymaps/vial/rules.mk
Normal file
30
keyboards/splitkb/aurora/corne/keymaps/vial/rules.mk
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# qmk compile -e MASTER=left -e CONVERT_TO=kb2040 --keyboard crkbd --keymap vial
|
||||
VIA_ENABLE = yes
|
||||
VIAL_ENABLE = yes
|
||||
LTO_ENABLE = yes
|
||||
QMK_SETTINGS = yes
|
||||
SPLIT_KEYBOARD = yes
|
||||
|
||||
RGBLIGHT_ENABLE = no
|
||||
RGB_MATRIX_ENABLE = no # Can't have RGBLIGHT and RGB_MATRIX at the same time.
|
||||
SLEEP_LED_ENABLE = no
|
||||
|
||||
OLED_ENABLE = yes
|
||||
COMBO_ENABLE = yes
|
||||
WPM_ENABLE = yes
|
||||
|
||||
|
||||
# MOUSEKEY_ENABLE = no # Mouse keys
|
||||
# EXTRAKEY_ENABLE = no
|
||||
# KEY_OVERRIDE_ENABLED = no
|
||||
# AUDIO_ENABLE = no
|
||||
# COMMAND_ENABLE = no
|
||||
# LEADER_ENABLE = no
|
||||
# BLUETOOTH_ENABLE = no
|
||||
# MIDI_ENABLE = no
|
||||
# UNICODE_ENABLE = no
|
||||
# BOOTMAGIC_ENABLE = no
|
||||
# CONSOLE_ENABLE = no
|
||||
|
||||
# MCU = kb2040
|
||||
# BOOTLOADER = rp2040
|
||||
358
keyboards/splitkb/aurora/corne/keymaps/vial/vial-config.vil
Normal file
358
keyboards/splitkb/aurora/corne/keymaps/vial/vial-config.vil
Normal file
|
|
@ -0,0 +1,358 @@
|
|||
{
|
||||
"version": 1,
|
||||
"uid": 15126841831861545787,
|
||||
"layout": [
|
||||
[
|
||||
[
|
||||
"KC_ESCAPE",
|
||||
"KC_Q",
|
||||
"KC_W",
|
||||
"KC_E",
|
||||
"KC_R",
|
||||
"KC_T"
|
||||
],
|
||||
[
|
||||
"KC_TAB",
|
||||
"KC_A",
|
||||
"KC_S",
|
||||
"KC_D",
|
||||
"KC_F",
|
||||
"KC_G"
|
||||
],
|
||||
[
|
||||
"TD(0)",
|
||||
"KC_Z",
|
||||
"KC_X",
|
||||
"KC_C",
|
||||
"KC_V",
|
||||
"KC_B"
|
||||
],
|
||||
[
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
"KC_LCTRL",
|
||||
"TD(6)",
|
||||
"KC_SPACE"
|
||||
],
|
||||
[
|
||||
"KC_DELETE",
|
||||
"KC_P",
|
||||
"KC_O",
|
||||
"KC_I",
|
||||
"KC_U",
|
||||
"KC_Y"
|
||||
],
|
||||
[
|
||||
"KC_QUOTE",
|
||||
"KC_SCOLON",
|
||||
"KC_L",
|
||||
"KC_K",
|
||||
"KC_J",
|
||||
"KC_H"
|
||||
],
|
||||
[
|
||||
"TD(5)",
|
||||
"KC_SLASH",
|
||||
"KC_DOT",
|
||||
"KC_COMMA",
|
||||
"KC_M",
|
||||
"KC_N"
|
||||
],
|
||||
[
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
"KC_BSPACE",
|
||||
"TO(1)",
|
||||
"KC_ENTER"
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
"KC_ESCAPE",
|
||||
"KC_LALT",
|
||||
"LSFT(KC_5)",
|
||||
"LSFT(KC_6)",
|
||||
"LSFT(KC_BSLASH)",
|
||||
"KC_MINUS"
|
||||
],
|
||||
[
|
||||
"KC_TAB",
|
||||
"KC_DOT",
|
||||
"LSFT(KC_3)",
|
||||
"LSFT(KC_7)",
|
||||
"KC_BSLASH",
|
||||
"KC_KP_SLASH"
|
||||
],
|
||||
[
|
||||
"TD(0)",
|
||||
"LSFT(KC_4)",
|
||||
"LSFT(KC_8)",
|
||||
"LSFT(KC_2)",
|
||||
"LCTL(KC_GRAVE)",
|
||||
"KC_EQUAL"
|
||||
],
|
||||
[
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
"TD(4)",
|
||||
"TO(0)",
|
||||
"KC_SPACE"
|
||||
],
|
||||
[
|
||||
"KC_DELETE",
|
||||
"KC_SCROLLLOCK",
|
||||
"LSFT(KC_4)",
|
||||
"LSFT(KC_7)",
|
||||
"LSFT(KC_1)",
|
||||
"KC_GRAVE"
|
||||
],
|
||||
[
|
||||
"TD(2)",
|
||||
"KC_NO",
|
||||
"KC_RIGHT",
|
||||
"KC_UP",
|
||||
"KC_DOWN",
|
||||
"KC_LEFT"
|
||||
],
|
||||
[
|
||||
"TD(3)",
|
||||
"KC_NO",
|
||||
"KC_RBRACKET",
|
||||
"LSFT(KC_0)",
|
||||
"LSFT(KC_9)",
|
||||
"KC_LBRACKET"
|
||||
],
|
||||
[
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
"KC_BSPACE",
|
||||
"TO(2)",
|
||||
"KC_ENTER"
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
"RESET",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_MPRV",
|
||||
"KC_MPLY",
|
||||
"KC_MNXT"
|
||||
],
|
||||
[
|
||||
"RGB_TOG",
|
||||
"RGB_HUI",
|
||||
"RGB_SAI",
|
||||
"RGB_VAI",
|
||||
"KC_NO",
|
||||
"KC_VOLU"
|
||||
],
|
||||
[
|
||||
"RGB_MOD",
|
||||
"RGB_HUD",
|
||||
"RGB_SAD",
|
||||
"RGB_VAD",
|
||||
"KC_NO",
|
||||
"KC_VOLD"
|
||||
],
|
||||
[
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
"KC_LGUI",
|
||||
"TO(0)",
|
||||
"KC_SPACE"
|
||||
],
|
||||
[
|
||||
"KC_KP_SLASH",
|
||||
"KC_MINUS",
|
||||
"KC_9",
|
||||
"KC_8",
|
||||
"KC_7",
|
||||
"LSFT(KC_4)"
|
||||
],
|
||||
[
|
||||
"LSFT(KC_8)",
|
||||
"KC_EQUAL",
|
||||
"KC_6",
|
||||
"KC_5",
|
||||
"KC_4",
|
||||
"KC_DOT"
|
||||
],
|
||||
[
|
||||
"KC_COMMA",
|
||||
"LSFT(KC_EQUAL)",
|
||||
"KC_3",
|
||||
"KC_2",
|
||||
"KC_1",
|
||||
"KC_0"
|
||||
],
|
||||
[
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
"KC_BSPACE",
|
||||
"TO(1)",
|
||||
"KC_ENTER"
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO"
|
||||
],
|
||||
[
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO"
|
||||
],
|
||||
[
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO"
|
||||
],
|
||||
[
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO"
|
||||
],
|
||||
[
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO"
|
||||
],
|
||||
[
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO"
|
||||
],
|
||||
[
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO"
|
||||
],
|
||||
[
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO"
|
||||
]
|
||||
]
|
||||
],
|
||||
"encoder_layout": [
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[]
|
||||
],
|
||||
"layout_options": -1,
|
||||
"macro": [
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[]
|
||||
],
|
||||
"vial_protocol": 5,
|
||||
"via_protocol": 9,
|
||||
"tap_dance": [
|
||||
[
|
||||
"OSM(MOD_LSFT)",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_LSHIFT",
|
||||
100
|
||||
],
|
||||
[
|
||||
"OSM(MOD_LCTL)",
|
||||
"KC_LCTRL",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
180
|
||||
],
|
||||
[
|
||||
"KC_PGUP",
|
||||
"KC_HOME",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
100
|
||||
],
|
||||
[
|
||||
"KC_PGDOWN",
|
||||
"KC_END",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
100
|
||||
],
|
||||
[
|
||||
"KC_LGUI",
|
||||
"KC_LCTRL",
|
||||
"OSM(MOD_LGUI)",
|
||||
"KC_NO",
|
||||
180
|
||||
],
|
||||
[
|
||||
"OSM(MOD_RALT)",
|
||||
"KC_RALT",
|
||||
"KC_CAPSLOCK",
|
||||
"KC_NO",
|
||||
180
|
||||
],
|
||||
[
|
||||
"KC_NO",
|
||||
"KC_LGUI",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
100
|
||||
],
|
||||
[
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
180
|
||||
]
|
||||
],
|
||||
"combo": [],
|
||||
"key_override": [],
|
||||
"settings": {}
|
||||
}
|
||||
30
keyboards/splitkb/aurora/corne/keymaps/vial/vial.json
Normal file
30
keyboards/splitkb/aurora/corne/keymaps/vial/vial.json
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"name": "Crkbd",
|
||||
"vendorId": "0x4653",
|
||||
"productId": "0x0001",
|
||||
"lighting": {
|
||||
"extends": "qmk_rgblight"
|
||||
},
|
||||
"matrix": { "rows": 8, "cols": 6 },
|
||||
"layouts": {
|
||||
"keymap": [
|
||||
[{"y":1,"x":3.5},"0,3",{"x":7.5},"4,3"],
|
||||
[{"y":-0.875,"x":2.5},"0,2",{"x":1},"0,4",{"x":5.5},"4,4",{"x":1},"4,2"],
|
||||
[{"y":-0.875,"x":5.5},"0,5",{"x":3.5},"4,5"],
|
||||
[{"y":-0.875,"x":0.5},"0,0","0,1",{"x":11.5},"4,1","4,0"],
|
||||
[{"y":-0.375,"x":3.5},"1,3",{"x":7.5},"5,3"],
|
||||
[{"y":-0.875,"x":2.5},"1,2",{"x":1},"1,4",{"x":5.5},"5,4",{"x":1},"5,2"],
|
||||
[{"y":-0.875,"x":5.5},"1,5",{"x":3.5},"5,5"],
|
||||
[{"y":-0.875,"x":0.5},"1,0","1,1",{"x":11.5},"5,1","5,0"],
|
||||
[{"y":-0.375,"x":3.5},"2,3",{"x":7.5},"6,3"],
|
||||
[{"y":-0.875,"x":2.5},"2,2",{"x":1},"2,4",{"x":5.5},"6,4",{"x":1},"6,2"],
|
||||
[{"y":-0.875,"x":5.5},"2,5",{"x":3.5},"6,5"],
|
||||
[{"y":-0.875,"x":0.5},"2,0","2,1",{"x":11.5},"6,1","6,0"],
|
||||
[{"y":-0.125,"x":4},"3,3",{"x":6.5},"7,3"],
|
||||
[{"r":15,"rx":4.5,"ry":9.1,"y":-4.85,"x":-0.5},"3,4"],
|
||||
[{"r":30,"rx":5.4,"ry":9.3,"y":-5.05,"x":-1.4,"h":1.5},"3,5"],
|
||||
[{"r":-30,"rx":11.1,"y":-5.05,"x":0.4,"h":1.5},"7,5"],
|
||||
[{"r":-15,"rx":12,"ry":9.1,"y":-4.85,"x":-0.5},"7,4"]
|
||||
]
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue