Compare commits

...

15 Commits

Author SHA1 Message Date
Arne Moerman faf73eab52 Refactor keymap and RGB settings for Cheapino2: update manufacturer name, adjust default hue, and optimize layer color mappings
CI / Check Vial UIDs (push) Has been cancelled
CI / Build default keymaps for Vial (push) Has been cancelled
CI / Build Vial keymaps (push) Has been cancelled
2026-02-27 16:34:00 +01:00
Thomas Haukland 9100f29f3e More usable default keymap
CI / Check Vial UIDs (push) Has been cancelled
CI / Build default keymaps for Vial (push) Has been cancelled
CI / Build Vial keymaps (push) Has been cancelled
2025-04-20 10:23:52 +02:00
Thomas Haukland 27ae52eea1 Merge branch 'cheapinov2' of github.com:tompi/vial-qmk into cheapinov2 2025-01-01 20:15:58 +01:00
Thomas Haukland 539b9cf4cc Configure shared EP to allow mods for extra keys 2025-01-01 20:15:18 +01:00
Thomas Haukland 433fbbd016 Fix default searing LED brightness 2024-11-18 22:25:44 +01:00
Thomas Haukland 73708a3f80 Increasing layers from 8 to 14
Tried 16, but bumped in to some memory restriction...
Reft: https://github.com/tompi/cheapino/issues/51
2024-07-13 10:48:24 +02:00
Thomas Haukland 6aea49fd1b Added NKRO support
Ref: https://github.com/tompi/cheapino/issues/48
2024-06-28 10:21:56 +02:00
Thomas Haukland 48f5fc6eb3 Use unsigned short instead of ushort 2024-05-18 10:02:30 +02:00
Thomas Haukland 1315dd975c Fix more ghosting: https://github.com/tompi/cheapino/issues/33
Should fix these:
M, H, ?
M ,Y, ?

N, >, K
N, >, I

Not able to reproduce 4-letter differt row  ghosting,
and these are probably non-existant irl...
2024-05-07 21:47:53 +02:00
Thomas Haukland ee72e32281 Attempt to fix ghosting: https://github.com/tompi/cheapino/issues/33 2024-05-06 22:09:47 +02:00
Thomas Haukland 1c8b6644c1 Fix row displacement on save 2024-04-23 18:19:45 +02:00
Thomas Haukland 4ddd893fc5 Enable 8 layers and remover compile warnings 2024-04-21 21:17:07 +02:00
Thomas Haukland 29e0e5fdd3 Full encoder support for Cheapino 2 2024-04-21 10:25:06 +02:00
Thomas Haukland 0d054118c3 Remove layers > 4 2024-04-07 21:43:01 +02:00
Thomas Haukland dfe472bf1b Add support for Cheapino 2 2024-04-07 14:19:49 +02:00
25 changed files with 1575 additions and 1 deletions
+90
View File
@@ -0,0 +1,90 @@
#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:
uint8_t get_hue(uint8_t layer) {
switch (layer) {
case 13:
return 64; // Yellow
case 12:
return 213; // Purple
case 11:
case 10:
case 9:
case 8:
case 7:
case 6:
return 128; // Cyan
case 5:
return 0; // Red
case 4:
return 234; // Red-Violet / Magenta
case 3:
return 32; // Orange
case 2:
return 170; // Blue
case 1:
return 85; // Green
default:
return 128; // Default to Red
}
/*
0: Red
32: Orange
64: Yellow
85: Green
128: Cyan
170: Blue
213: Purple
224: Magenta/Red-Violet
*/
}
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;
}
+35
View File
@@ -0,0 +1,35 @@
// Copyright 2023 Thomas Haukland (@tompi)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#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
#define RGB_MATRIX_DEFAULT_VAL 32
// 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 RGBLED_NUM 1
#define MAX_DEFERRED_EXECUTORS 32
#define DEBOUNCE 5
// How many "tents" should you turn per action
#define ENCODER_RESOLUTION 1
// These are just dummy definitions to make qmk compile
// // The actual encoder logic is handled manually in encoder.c
#define ENCODERS_PAD_A { GP12 }
#define ENCODERS_PAD_B { GP13 }
#define ENCODER_MAP_KEY_DELAY 10
#define RGBLIGHT_DEFAULT_HUE 0 // 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
+53
View File
@@ -0,0 +1,53 @@
#include "matrix.h"
#include "quantum.h"
#include "rgblight.h"
#include "encoder.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 uint16_t turns = 0;
static bool last_turn_clockwise;
void turned(bool clockwise) {
if (clockwise != last_turn_clockwise) {
// Switched way, reset counter
last_turn_clockwise = clockwise;
turns = 0;
}
turns++;
if (!(turns%ENCODER_RESOLUTION == 0)) {
return;
}
encoder_exec_mapping(0, clockwise);
}
void fix_encoder_action(matrix_row_t current_matrix[]) {
matrix_row_t encoder_row = current_matrix[ENC_ROW];
// 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);
}
}
}
+5
View File
@@ -0,0 +1,5 @@
//
// Created by Thomas Haukland on 25/03/2023.
//
void fix_encoder_action(matrix_row_t current_matrix[]);
+128
View 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
View File
@@ -0,0 +1,5 @@
//
// Created by Thomas Haukland on 2024-05-05.
//
void fix_ghosting(matrix_row_t current_matrix[]);
+8
View 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>
+96
View File
@@ -0,0 +1,96 @@
{
"manufacturer": "Arne Moerman",
"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": "2.0.1",
"pid": "0xAFB7",
"vid": "0xFEF3",
"force_nkro": false
},
"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 },
{ "matrix": [3, 0], "x": 8.5, "y": 3.25 }
]
}
}
}
@@ -0,0 +1,239 @@
{
"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",
"LGUI_T(KC_A)",
"LALT_T(KC_S)",
"LSFT_T(KC_D)",
"LCTL_T(KC_F)",
"KC_G",
"KC_H",
"LCTL_T(KC_J)",
"RSFT_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(4,KC_ESC)",
"LT(3,KC_ENT)",
"LT(2,KC_TAB)",
"LT(2,KC_BSPC)",
"LT(3,KC_SPC)",
"LT(4,KC_DEL)"
],
[
"KC_A",
"KC_Z",
"KC_F",
"KC_P",
"KC_B",
"KC_J",
"KC_L",
"KC_U",
"KC_Y",
"KC_SLSH",
"LGUI_T(KC_Q)",
"LALT_T(KC_R)",
"LSFT(KC_S)",
"LCTL(KC_T)",
"KC_G",
"KC_SCLN",
"RCTL_T(KC_N)",
"RSFT_T(KC_E)",
"LALT_T(KC_I)",
"RGUI_T(KC_O)",
"KC_W",
"KC_X",
"KC_C",
"KC_D",
"RALT_T(KC_V)",
"RALT_T(KC_K)",
"KC_H",
"KC_M",
"KC_COMM",
"KC_DOT",
"LT(4,KC_ESC)",
"LT(3,KC_ENT)",
"LT(2,KC_TAB)",
"LT(2,KC_BSPC)",
"LT(3,KC_SPC)",
"LT(4,KC_DEL)"
],
[
"KC_F1",
"KC_F2",
"KC_F3",
"KC_F4",
"KC_F5",
"KC_F6",
"KC_F7",
"KC_F8",
"KC_F9",
"KC_F10",
"LGUI_T(KC_1)",
"LALT_T(KC_2)",
"LSFT_T(KC_3)",
"LCTL_T(KC_4)",
"KC_5",
"KC_6",
"RCTL_T(KC_7)",
"RSFT_T(KC_8)",
"LALT_T(KC_9)",
"RGUI_T(KC_0)",
"KC_GRV",
"KC_LBRC",
"KC_RBRC",
"KC_QUOT",
"RALT_T(KC_NUHS)",
"RALT_T(KC_CAPS)",
"KC_MINS",
"KC_EQL",
"KC_F11",
"KC_F12",
"KC_ESC",
"KC_ENT",
"KC_TAB",
"KC_BSPC",
"KC_SPC",
"KC_DEL"
],
[
"LSFT(KC_NUBS)",
"RALT(KC_1)",
"RALT(KC_LBRC)",
"RALT(KC_RBRC)",
"RALT(KC_NUBS)",
"KC_INS",
"KC_HOME",
"KC_UP",
"KC_PGUP",
"KC_PAUS",
"LGUI_T(KC_NUBS)",
"LALT_T(KC_1)",
"LSFT_T(KC_5)",
"LCTL_T(KC_MINS)",
"RALT(KC_2)",
"KC_HASH",
"KC_LEFT",
"KC_DOWN",
"KC_RGHT",
"KC_SCRL",
"RALT(KC_QUOT)",
"RALT(KC_NUHS)",
"RALT(KC_9)",
"RALT(KC_0)",
"RALT(KC_3)",
"RSFT(KC_RBRC)",
"KC_QUOT",
"RSFT(KC_EQL)",
"KC_PGDN",
"TO(5)",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_TRNS",
"KC_TRNS",
"KC_NO"
],
[
"KC_WBAK",
"MS_WHLU",
"MS_UP",
"MS_BTN2",
"KC_WFWD",
"KC_PAST",
"KC_P7",
"KC_P8",
"KC_P9",
"KC_PPLS",
"MS_WHLL",
"MS_LEFT",
"MS_BTN1",
"MS_RGHT",
"MS_WHLR",
"KC_PSLS",
"KC_P4",
"KC_P5",
"KC_P6",
"KC_PMNS",
"KC_TRNS",
"MS_WHLD",
"MS_DOWN",
"MS_BTN3",
"TO(0)",
"KC_P0",
"KC_P1",
"KC_P2",
"KC_P3",
"KC_PDOT",
"KC_ESC",
"KC_ENT",
"KC_TAB",
"KC_BSPC",
"KC_SPC",
"KC_DEL"
],
[
"KC_F13",
"KC_F14",
"KC_F15",
"KC_F16",
"KC_F17",
"KC_F18",
"KC_F19",
"KC_F20",
"KC_F21",
"KC_F22",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_MSTP",
"KC_MPLY",
"KC_VOLU",
"KC_MUTE",
"KC_NO",
"TO(4)",
"KC_NO",
"KC_CALC",
"KC_MAIL",
"TO(0)",
"KC_MPRV",
"KC_MNXT",
"KC_VOLD",
"KC_F23",
"KC_F24",
"KC_ESC",
"KC_ENT",
"KC_TAB",
"KC_BSPC",
"KC_SPC",
"KC_DEL"
]
],
"author": "arne.moerman@gmail.com"
}
+51
View 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
View 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"
}
@@ -0,0 +1,277 @@
{
"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",
"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_MS_U",
"KC_WH_U",
"KC_WH_R",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_NO",
"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"
],
[
"KC_EQL",
"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"
],
[
"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_P7",
"KC_P8",
"KC_P9",
"KC_PAST",
"EE_CLR",
"KC_TRNS",
"KC_TRNS",
"KC_TRNS",
"RGB_TOG",
"KC_PMNS",
"KC_P4",
"KC_P5",
"KC_P6",
"KC_PSLS",
"RGB_SPD",
"RGB_VAD",
"RGB_SAD",
"RGB_HUD",
"RGB_RMOD",
"KC_PDOT",
"KC_P1",
"KC_P2",
"KC_P3",
"KC_PEQL",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_0",
"KC_COMM",
"KC_P0"
]
],
"author": "thomas.haukland@gmail.com"
}
+163
View 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)",
"LSFT_T(KC_D)",
"LCTL_T(KC_F)",
"KC_G",
"KC_H",
"LCTL_T(KC_J)",
"RSFT_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(3,KC_ESC)",
"LT(2,KC_ENT)",
"LT(1,KC_TAB)",
"LT(1,KC_BSPC)",
"LT(2,KC_SPC)",
"LT(3,KC_DEL)"
],
[
"KC_F1",
"KC_F2",
"KC_F3",
"KC_F4",
"KC_F5",
"KC_F6",
"KC_F7",
"KC_F8",
"KC_F9",
"KC_F10",
"LGUI_T(KC_1)",
"LALT_T(KC_2)",
"LSFT_T(KC_3)",
"LCTL_T(KC_4)",
"KC_5",
"KC_6",
"RCTL_T(KC_7)",
"RSFT_T(KC_8)",
"LALT_T(KC_9)",
"RGUI_T(KC_0)",
"KC_GRV",
"KC_LBRC",
"KC_RBRC",
"KC_QUOT",
"RALT_T(KC_NUHS)",
"RALT_T(KC_CAPS)",
"KC_MINS",
"KC_EQL",
"KC_F11",
"KC_F12",
"KC_ESC",
"KC_ENT",
"KC_TAB",
"KC_BSPC",
"KC_SPC",
"KC_DEL"
],
[
"LSFT(KC_NUBS)",
"RALT(KC_1)",
"RALT(KC_LBRC)",
"RALT(KC_RBRC)",
"RALT(KC_NUBS)",
"KC_INS",
"KC_HOME",
"KC_UP",
"KC_PGUP",
"KC_PAUS",
"LGUI_T(KC_NUBS)",
"LALT_T(KC_1)",
"LSFT_T(KC_5)",
"LCTL_T(KC_MINS)",
"RALT(KC_2)",
"KC_HASH",
"KC_LEFT",
"KC_DOWN",
"KC_RGHT",
"KC_SCRL",
"RALT(KC_QUOT)",
"RALT(KC_NUHS)",
"RALT(KC_9)",
"RALT(KC_0)",
"RALT(KC_3)",
"RSFT(KC_RBRC)",
"KC_QUOT",
"RSFT(KC_EQL)",
"KC_PGDN",
"TO(5)",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_TRNS",
"KC_TRNS",
"KC_NO"
],
[
"KC_WBAK",
"MS_WHLU",
"MS_UP",
"MS_BTN2",
"KC_WFWD",
"KC_PAST",
"KC_P7",
"KC_P8",
"KC_P9",
"KC_PPLS",
"MS_WHLL",
"MS_LEFT",
"MS_BTN1",
"MS_RGHT",
"MS_WHLR",
"KC_PSLS",
"KC_P4",
"KC_P5",
"KC_P6",
"KC_PMNS",
"KC_TRNS",
"MS_WHLD",
"MS_DOWN",
"MS_BTN3",
"TO(0)",
"KC_P0",
"KC_P1",
"KC_P2",
"KC_P3",
"KC_PDOT",
"KC_ESC",
"KC_ENT",
"KC_TAB",
"KC_BSPC",
"KC_SPC",
"KC_DEL"
]
],
"author": "thomas.haukland@gmail.com"
}
+8
View File
@@ -0,0 +1,8 @@
#define VIAL_KEYBOARD_UID {0x79, 0xED, 0x40, 0xBB, 0x09, 0x8B, 0xC1, 0x9E}
// Unlock combo is two inner thumb keys.
#define VIAL_UNLOCK_COMBO_ROWS { 6, 2 }
#define VIAL_UNLOCK_COMBO_COLS { 11, 5 }
#define DYNAMIC_KEYMAP_LAYER_COUNT 14
+26
View File
@@ -0,0 +1,26 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_split_3x5_3(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, LGUI_T(KC_Z), LALT_T(KC_X), LCTL_T(KC_C), LSFT_T(KC_V), KC_B, KC_N, RSFT_T(KC_M), RCTL_T(KC_COMM), RALT_T(KC_DOT), KC_SLSH, KC_ESC, KC_SPC, KC_TAB, MO(1), KC_BSPC, KC_ENT, KC_MPLY),
[1] = LAYOUT_split_3x5_3(KC_NO, KC_7, KC_8, KC_9, KC_MINS, KC_QUOT, KC_LBRC, KC_RBRC, KC_9, KC_0, KC_NO, KC_4, KC_5, KC_6, KC_EQL, KC_BSLS, KC_LPRN, KC_RPRN, KC_CIRC, KC_NO, KC_NO, KC_1, KC_2, KC_3, MO(0), KC_TILD, KC_NO, KC_COMM, KC_DOT, KC_NO, KC_ESC, KC_SPC, KC_TAB, MO(2), KC_BSPC, KC_ENT, KC_MPLY),
[2] = LAYOUT_split_3x5_3(KC_NO, KC_F7, KC_F8, KC_F9, KC_F10, KC_PSCR, KC_SCRL, KC_PAUS, KC_LPRN, KC_RPRN, KC_NO, KC_F4, KC_F5, KC_F6, KC_F11, KC_INS, KC_HOME, KC_PGUP, KC_RBRC, KC_BSLS, KC_NO, KC_F1, KC_F2, KC_F3, KC_F12, KC_DEL, KC_END, KC_PGDN, KC_RCBR, KC_PIPE, KC_ESC, KC_SPC, KC_TAB, MO(3), KC_BSPC, KC_ENT, KC_MPLY),
[3] = LAYOUT_split_3x5_3(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, RGB_SPI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ESC, KC_SPC, KC_TAB, KC_TRNS, KC_ENT, KC_RALT, KC_MPLY),
[4] = LAYOUT_split_3x5_3(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, 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),
[5] = LAYOUT_split_3x5_3(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, 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),
[6] = LAYOUT_split_3x5_3(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, 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),
[7] = LAYOUT_split_3x5_3(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, 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),
};
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
[0] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN)},
[1] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI) },
[2] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) },
[3] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD) },
[4] = { ENCODER_CCW_CW(KC_NO,KC_NO) },
[5] = { ENCODER_CCW_CW(KC_NO,KC_NO) },
[6] = { ENCODER_CCW_CW(KC_NO,KC_NO) },
[7] = { ENCODER_CCW_CW(KC_NO,KC_NO) }
// Encoder 1 Encoder 2
};
+2
View File
@@ -0,0 +1,2 @@
VIAL_ENABLE = yes
ENCODER_MAP_ENABLE = yes
+34
View 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"]
]
}
}
+149
View File
@@ -0,0 +1,149 @@
/*
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"
#define MATRIX_IO_DELAY 30
#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
View File
@@ -0,0 +1,6 @@
#pragma once
#include_next <mcuconf.h>
#undef RP_I2C_USE_I2C1
#define RP_I2C_USE_I2C1 TRUE
+27
View File
@@ -0,0 +1,27 @@
# cheapino
![cheapino](imgur.com image replace me!)
*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
+12
View File
@@ -0,0 +1,12 @@
CAPS_WORD_ENABLE = yes
CUSTOM_MATRIX = lite
WS2812_DRIVER = vendor
RGBLIGHT_ENABLE = yes
DEFERRED_EXEC_ENABLE = yes
VIA_ENABLE = yes
VIAL_INSECURE = yes
ENCODER_ENABLE = yes
KEYBOARD_SHARED_EP = yes
SRC += encoder.c
SRC += ghosting.c
SRC += matrix.c
+34
View File
@@ -0,0 +1,34 @@
{
"name": "Cheapino2",
"vendorId": "0xFEE3",
"productId": "0x0001",
"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"]
]
}
}
+1 -1
View File
@@ -172,7 +172,7 @@ void encoder_init(void) {
}
#ifdef ENCODER_MAP_ENABLE
static void encoder_exec_mapping(uint8_t index, bool clockwise) {
__attribute__((weak)) void encoder_exec_mapping(uint8_t index, bool clockwise) {
// The delays below cater for Windows and its wonderful requirements.
action_exec(clockwise ? MAKE_ENCODER_CW_EVENT(index, true) : MAKE_ENCODER_CCW_EVENT(index, true));
# if ENCODER_MAP_KEY_DELAY > 0
+1
View File
@@ -27,6 +27,7 @@ bool encoder_read(void);
bool encoder_update_kb(uint8_t index, bool clockwise);
bool encoder_update_user(uint8_t index, bool clockwise);
void encoder_exec_mapping(uint8_t index, bool clockwise);
#ifdef SPLIT_KEYBOARD