Compare commits

...

14 Commits

Author SHA1 Message Date
Vaarai
6ccda8756f
Merge 4fe4ac150c into 9bea332a21 2024-11-20 22:22:14 -08:00
Ryan
9bea332a21
qmk via2json: Improve macro parsing (#24345) 2024-11-21 17:20:05 +11:00
Ryan
8cbcdcac62
qmk new-keymap: validate keymap name (#23420) 2024-11-21 17:18:51 +11:00
Vaarai
4fe4ac150c [Cornia] Fix readme 2024-11-11 20:38:59 +01:00
Vaarai
cc83c5e42c [Cornia] Remove unecessary custom keycodes 2024-11-11 20:38:22 +01:00
Vaarai
8753cd8fb8 [Cornia] Put common configuration to top keyboard level 2024-11-11 20:31:37 +01:00
Vaarai
88c9c31c23 [Cornia/makefiles] remove license headers & root makefile 2024-10-26 09:29:49 +02:00
Vaarai
261dd0d7c1 [Cornia] Use tri-layer in default keymap 2024-10-20 01:21:36 +02:00
Vaarai
5849acceae [Cornia/config] Remove unnecessary defines & move all callbacks to keymap.c 2024-10-20 01:21:36 +02:00
Vaarai
71b58e22ee [Cornia] Move I2C stuff to keyboard level 2024-10-02 21:12:29 +02:00
Vaarai
018021058a [Cornia/config] Remove unnecessary defines 2024-10-02 21:10:37 +02:00
Vaarai
1bb83c374d [Cornia/Doc] Host image on imgur 2024-10-02 21:09:14 +02:00
Vaarai
c4e097ff79 Update Fire keymap 2024-10-02 00:19:19 +02:00
Vaarai
3eda183ade Add cornia keyboard 2024-09-27 00:23:35 +02:00
17 changed files with 960 additions and 9 deletions

36
keyboards/cornia/config.h Normal file
View File

@ -0,0 +1,36 @@
/* Copyright 2024 Vaarai
*
* 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
/* Select hand configuration */
// #define MASTER_LEFT
#define MASTER_RIGHT
// #define EE_HANDS
#undef RP_I2C_USE_I2C0
#define RP_I2C_USE_I2C0 FALSE
#undef RP_I2C_USE_I2C1
#define RP_I2C_USE_I2C1 TRUE
/* I²C config */
#define I2C_DRIVER I2CD1
#define I2C1_SDA_PIN GP10
#define I2C1_SCL_PIN GP11
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET // Activates the double-tap behavior
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 200U // Timeout window in ms in which the double tap can occur.

44
keyboards/cornia/cornia.c Normal file
View File

@ -0,0 +1,44 @@
/* Copyright 2024 Vaarai
*
* 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 "cornia.h"
// 'Cornia', 32x32px
#define OLED_LOGO_CORNIA {\
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, \
0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xe0, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xf8, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0xfd, 0xe1, \
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, \
0x00, 0x00, 0xc0, 0xf8, 0xff, 0xff, 0xff, 0x3f, 0x07, 0x00, 0x00, 0x00, 0x07, 0x3f, 0xff, 0xff, \
0xff, 0xf8, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
0x00, 0x1e, 0x1f, 0x1f, 0x1f, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, \
0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x0e, 0x00 \
}
void cornia_render_logo(void) {
#ifdef OLED_ENABLE
static const char PROGMEM logo[] = OLED_LOGO_CORNIA;
oled_write_raw_P(logo, sizeof(logo));
#endif
}
bool oled_task_kb(void) {
if (!oled_task_user()) {
return false;
}
cornia_render_logo();
return true;
}

21
keyboards/cornia/cornia.h Normal file
View File

@ -0,0 +1,21 @@
/* Copyright 2024 Vaarai
*
* 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
#include "quantum.h"
void cornia_render_logo(void);

137
keyboards/cornia/info.json Normal file
View File

@ -0,0 +1,137 @@
{
"manufacturer": "Vaarai",
"maintainer": "Vaarai",
"url": "https://github.com/Vaarai/Cornia",
"usb": {
"vid": "0xFEED"
},
"processor": "RP2040",
"bootloader": "rp2040",
"split": {
"enabled": true,
"serial": {
"driver": "vendor",
"pin": "GP1"
},
"transport": {
"sync": {
"matrix_state": true
}
}
},
"features": {
"extrakey": true,
"nkro": true,
"oled": true,
"rgb_matrix": true
},
"community_layouts": [ "split_3x6_3" ],
"layout_aliases": {
"LAYOUT": "LAYOUT_split_3x6_3"
},
"layouts": {
"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},
{"matrix": [7, 5], "x": 8, "y": 3.2},
{"matrix": [7, 4], "x": 9, "y": 3.7},
{"matrix": [7, 3], "x": 10, "y": 3.7}
]
}
},
"ws2812": {
"driver": "vendor",
"pin": "GP0"
},
"rgb_matrix": {
"driver": "ws2812",
"sleep": true,
"split_count": [21, 21],
"animations": {
"static_gradient": true,
"breathing": true
},
"layout": [
{"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},
{"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}
]
}
}

View File

@ -0,0 +1,75 @@
/* Copyright 2024 Vaarai
*
* 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
/* Layers definitions */
enum layers {
_ALPHA,
_LOWER,
_UPPER,
_ADJUST,
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_ALPHA] = LAYOUT_split_3x6_3(
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
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_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RCTL,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_LSFT, TL_LOWR, KC_SPC, KC_ENT, TL_UPPR, KC_RSFT
//`--------------------------' `--------------------------'
),
[_LOWER] = LAYOUT_split_3x6_3(
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_DEL,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, XXXXXXX,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_LALT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_RALT,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_LGUI, _______, _______, _______, _______, _______
//`--------------------------' `--------------------------'
),
[_UPPER] = LAYOUT_split_3x6_3(
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
_______, KC_SLSH, KC_LCBR, KC_LPRN, KC_LBRC, KC_MINS, KC_UNDS, KC_RBRC, KC_RPRN, KC_RCBR, KC_BSLS, _______,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
_______, XXXXXXX, KC_GRV, KC_QUES, KC_EQL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
_______, _______, _______, _______, _______, KC_RGUI
//`--------------------------' `--------------------------'
),
[_ADJUST] = LAYOUT_split_3x6_3(
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
XXXXXXX, RGB_TOG, RGB_HUI, RGB_VAI, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
//|--------+--------+--------+--------+--------|--------| |--------+--------+--------+--------+--------+--------|
XXXXXXX, RGB_MOD, RGB_HUD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
_______, _______, _______, _______, _______, _______
//`--------------------------' `--------------------------'
),
};

View File

@ -0,0 +1 @@
TRI_LAYER_ENABLE = yes

View File

@ -0,0 +1,33 @@
/* Copyright 2024 Vaarai
*
* 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
/* Split */
#define SPLIT_ACTIVITY_ENABLE
#define SPLIT_LAYER_STATE_ENABLE
#define SPLIT_LED_STATE_ENABLE
#define SPLIT_MODS_ENABLE
/* Trackpad */
#define SPLIT_POINTING_ENABLE
#define POINTING_DEVICE_RIGHT
#define POINTING_DEVICE_ROTATION_90
#define CIRQUE_PINNACLE_DIAMETER_MM 40
#define CIRQUE_PINNACLE_TAP_ENABLE
#define CIRQUE_PINNACLE_CURVED_OVERLAY
#define CIRQUE_PINNACLE_POSITION_MODE CIRQUE_PINNACLE_RELATIVE_MODE
#define CIRQUE_PINNACLE_ATTENUATION EXTREG__TRACK_ADCCONFIG__ADC_ATTENUATE_2X

View File

@ -0,0 +1,226 @@
/* Copyright 2024 Vaarai
*
* 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
#include "./keymap.h"
#include "./tap_dances.h"
/* Flag to enable/disable trackpad scroll */
bool set_scrolling = false;
/* Variables to store accumulated scroll values */
float scroll_accumulated_h = 0;
float scroll_accumulated_v = 0;
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_ALPHA] = LAYOUT_split_3x6_3( /* Fire (Oxey) : https://bit.ly/layout-doc-v2 */
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_ESC, KC_P, KC_L, KC_D, KC_G, KC_V, KC_Q, KC_F, KC_O, KC_U, KC_COMM, KC_BSPC,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_TAB, KC_N, KC_R, KC_T, KC_S, KC_Y, KC_J, KC_H, KC_A, KC_E, KC_I, KC_LALT,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_LCTL, KC_X, KC_K, KC_C, KC_W, KC_Z, KC_B, KC_M, KC_QUOT, KC_SCLN, KC_DOT, KC_RCTL,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
TD(TD_SFT_CAPSW), TD(TD_NAV_ACCENT), KC_SPC, KC_ENT, TD(TD_NUM_ACCENT), TD(TD_SFT_CAPSW)
//`--------------------------' `--------------------------'
),
[_NAV] = LAYOUT_split_3x6_3(
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
_______, G(KC_L), XXXXXXX, CK_SCRL, C(KC_A), XXXXXXX, KC_BTN1, KC_BTN2, KC_BTN3, XXXXXXX, XXXXXXX, KC_DEL,
//|--------+--------+ GUI V +--------+--------+--------| |--------+--------+--------+--------+--------+--------|
_______, C(KC_X), G(KC_V), C(KC_V), C(KC_C), C(KC_Z), KC_WH_U, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, _______,
//|ALT LEFT+--------+ ALT SFT+scrnshot+--------+--------| |--------+--------+--------+--------+--------+--------|
A(KC_LEFT),C(KC_S),S(KC_LALT), CK_SSHT,C(KC_F), C(KC_Y), KC_WH_D, KC_HOME, CK_SELL, CK_SELR, KC_END, _______,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_LGUI, _______, _______, _______,MO(_ADJUST),_______
//`--------------------------' `--------------------------'
),
[_NUM] = LAYOUT_split_3x6_3(
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
//|--------+-- / ---+-- { ---+-- ( ---+-- [ ---+-- - ---| |--- _ --+--- ] --+-- ) ---+-- } ---+-- \ ---+--------|
_______, KC_SLSH, KC_LCBR, KC_LPRN, KC_LBRC, KC_MINS, KC_UNDS, KC_RBRC, KC_RPRN, KC_RCBR, KC_BSLS, _______,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
_______, XXXXXXX, KC_GRV, KC_QUES, KC_EQL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
_______,MO(_ADJUST),_______, _______, _______, KC_RGUI
//`--------------------------' `--------------------------'
),
[_ADJUST] = LAYOUT_split_3x6_3(
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
XXXXXXX, RGB_TOG, RGB_HUI, RGB_VAI, CK_DPII, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
//|--------+--------+--------+--------+--------|--------| |--------+--------+--------+--------+--------+--------|
XXXXXXX, RGB_MOD, RGB_HUD, RGB_VAD, CK_DPID, XXXXXXX, TO(_G0), TO(_G1), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
_______, _______, _______, _______, _______, _______
//`--------------------------' `--------------------------'
),
/* Generic game */
[_G0] = LAYOUT_split_3x6_3(
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_ESC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
XXXXXXX, KC_LSFT, KC_A, KC_S, KC_D, KC_F, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_LGUI, KC_LCTL, KC_Z, KC_X, KC_C, KC_V, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_SPC, KC_SPC, XXXXXXX, XXXXXXX, TG(_G0), XXXXXXX
//`--------------------------' `--------------------------'
),
/* Warframe */
[_G1] = LAYOUT_split_3x6_3(
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_TAB, KC_ESC, KC_Q, KC_W, KC_1, KC_2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_F, KC_LSFT, KC_A, KC_S, KC_D, KC_3, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_LGUI, KC_LCTL, KC_M, KC_Y, KC_X, KC_4, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_SPC,CK_RKJMP, KC_5, XXXXXXX, TG(_G1), XXXXXXX
//`--------------------------' `--------------------------'
),
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case CK_RKJMP: /* Warframe rocket jump */
if (record->event.pressed) {
SEND_STRING(SS_DOWN(X_C));
} else {
SEND_STRING(SS_DOWN(X_SPC) SS_DELAY(50) SS_UP(X_C) SS_DELAY(50) SS_UP(X_SPC));
}
return false;
case CK_DPII: /* Increase trackpad DPI */
if (record->event.pressed) {
pointing_device_set_cpi(pointing_device_get_cpi()+100);
}
return false;
case CK_DPID: /* Decrease trackpad DPI */
if (record->event.pressed) {
pointing_device_set_cpi(pointing_device_get_cpi()-100);
}
return false;
case CK_SCRL: /* Toggle set_scrolling when CK_SCRL key is pressed or released */
set_scrolling = record->event.pressed;
return false;
}
/* Accented letters */
if (accent_state != ACCENT_NONE && record->event.pressed)
{
switch (keycode) {
case KC_A:
SEND_STRING(SS_ACCENT_A_GRAVE);
break;
case KC_C:
SEND_STRING(SS_ACCENT_C_CEDIL);
break;
case KC_E:
switch (accent_state) {
case ACCENT_LEFT:
SEND_STRING(SS_ACCENT_E_ACUTE); break;
case ACCENT_RIGHT:
SEND_STRING(SS_ACCENT_E_GRAVE); break;
case ACCENT_NONE:
break;
}
break;
case KC_O:
SEND_STRING(SS_ACCENT_O_CIRCU);
break;
case KC_U:
SEND_STRING(SS_ACCENT_U_GRAVE);
break;
}
accent_state = ACCENT_NONE;
return false;
}
return true;
}
bool shutdown_user(bool jump_to_bootloader) {
oled_clear();
oled_set_cursor(0, 2);
if (jump_to_bootloader) {
oled_write_P(PSTR("FLASH"), false);
} else {
oled_write_P(PSTR("RESET"), false);
}
oled_render_dirty(true);
return false;
}
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return OLED_ROTATION_270;
}
bool oled_task_user(void) {
/* Print cornia logo */
cornia_render_logo();
/* Print layer status */
oled_set_cursor(0, 7);
switch (get_highest_layer(layer_state)) {
case _ALPHA:
oled_write_ln("ALPHA", 0);
break;
case _NAV:
oled_write_ln("NAV", 0);
break;
case _NUM:
oled_write_ln("NUM", 0);
break;
case _ADJUST:
oled_write_ln("ADJUS", 0);
break;
case _G0:
oled_write_ln("GAME0", 0);
break;
case _G1:
oled_write_ln("GAME1", 0);
break;
}
return false;
}
report_mouse_t pointing_device_task_user(report_mouse_t mouse_report) {
/* Check if drag scrolling is active */
if (set_scrolling) {
/* Calculate and accumulate scroll values based on mouse movement and divisors */
scroll_accumulated_h += (float)mouse_report.x / SCROLL_DIVISOR_H;
scroll_accumulated_v += (float)mouse_report.y / SCROLL_DIVISOR_V;
/* Assign integer parts of accumulated scroll values to the mouse report */
mouse_report.h = (int8_t)scroll_accumulated_h;
mouse_report.v = (int8_t)scroll_accumulated_v;
/* Update accumulated scroll values by subtracting the integer parts */
scroll_accumulated_h -= (int8_t)scroll_accumulated_h;
scroll_accumulated_v -= (int8_t)scroll_accumulated_v;
/* Clear the X and Y values of the mouse report */
mouse_report.x = 0;
mouse_report.y = 0;
}
return mouse_report;
}

View File

@ -0,0 +1,55 @@
/* Copyright 2024 Vaarai
*
* 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
#include QMK_KEYBOARD_H
/* Trackpad srolling speed adjustment */
#define SCROLL_DIVISOR_H 8.0
#define SCROLL_DIVISOR_V 8.0
/* Trackpad srolling enablement flag */
extern bool set_scrolling;
/* Layers definitions */
enum layers {
_ALPHA,
_NAV,
_NUM,
_ADJUST,
_G0,
_G1
};
/* Custom Keycodes (CK_xxx) */
#define CK_SSHT LSG(KC_S)
#define CK_SELL LSFT(LCTL(KC_LEFT))
#define CK_SELR LSFT(LCTL(KC_RIGHT))
typedef enum {
CK_RKJMP = SAFE_RANGE, /* Warframe rocket/bullet jump */
CK_DPII,
CK_DPID,
CK_SCRL,
} cornia_custom_keycodes_t;
#define SS_ACCENT_A_GRAVE SS_DOWN(X_LALT) SS_TAP(X_P1) SS_TAP(X_P3) SS_TAP(X_P3) SS_UP(X_LALT) /* à */
#define SS_ACCENT_C_CEDIL SS_DOWN(X_LALT) SS_TAP(X_P1) SS_TAP(X_P3) SS_TAP(X_P5) SS_UP(X_LALT) /* ç */
#define SS_ACCENT_E_ACUTE SS_DOWN(X_LALT) SS_TAP(X_P1) SS_TAP(X_P3) SS_TAP(X_P0) SS_UP(X_LALT) /* é */
#define SS_ACCENT_E_GRAVE SS_DOWN(X_LALT) SS_TAP(X_P1) SS_TAP(X_P3) SS_TAP(X_P8) SS_UP(X_LALT) /* è */
#define SS_ACCENT_O_CIRCU SS_DOWN(X_LALT) SS_TAP(X_P1) SS_TAP(X_P4) SS_TAP(X_P7) SS_UP(X_LALT) /* ô */
#define SS_ACCENT_U_GRAVE SS_DOWN(X_LALT) SS_TAP(X_P0) SS_TAP(X_P2) SS_TAP(X_P4) SS_TAP(X_P9) SS_UP(X_LALT) /* ù */

View File

@ -0,0 +1,9 @@
SRC += tap_dances.c
MOUSEKEY_ENABLE = yes
CAPS_WORD_ENABLE = yes
TAP_DANCE_ENABLE = yes
# Cirque Trackpad I²C configuration
POINTING_DEVICE_ENABLE = yes
POINTING_DEVICE_DRIVER = cirque_pinnacle_i2c

View File

@ -0,0 +1,154 @@
/* Copyright 2024 Vaarai
*
* 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
#include "./tap_dances.h"
#include "./keymap.h"
/* define a type containing as many tapdance states as you need */
typedef enum {
SINGLE_TAP,
SINGLE_HOLD,
DOUBLE_TAP,
DOUBLE_HOLD,
OTHER_TAP
} td_state_t;
/* Create a global instance of the tapdance state type */
static td_state_t td_state;
accent_state_t accent_state = ACCENT_NONE;
tap_dance_action_t tap_dance_actions[TAP_DANCE_ACTIONS_COUNT] = {
[TD_SFT_CAPSW] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_shift_capsword_finished, dance_shift_capsword_reset),
[TD_NAV_ACCENT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_nav_accent_finished, dance_nav_accent_reset),
[TD_NUM_ACCENT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_num_accent_finished, dance_num_accent_reset)
};
int cur_dance (tap_dance_state_t *state) {
if (state->count == 1) {
if (state->interrupted || !state->pressed)
{
return SINGLE_TAP;
} else {
return SINGLE_HOLD;
}
}
if (state->count == 2)
{
if (state->interrupted || !state->pressed)
{
return DOUBLE_TAP;
} else {
return DOUBLE_HOLD;
}
} else {
return OTHER_TAP;
}
}
void dance_shift_capsword_finished (tap_dance_state_t *state, void *user_data)
{
td_state = cur_dance(state);
switch (td_state) {
case SINGLE_TAP:
case SINGLE_HOLD:
register_code(KC_LSFT);
break;
case DOUBLE_TAP:
case DOUBLE_HOLD:
caps_word_on();
break;
case OTHER_TAP:
break;
}
}
void dance_shift_capsword_reset (tap_dance_state_t *state, void *user_data)
{
switch (td_state) {
case SINGLE_TAP:
case SINGLE_HOLD:
unregister_code(KC_LSFT);
break;
case DOUBLE_TAP:
case DOUBLE_HOLD:
case OTHER_TAP:
break;
}
}
void dance_nav_accent_finished (tap_dance_state_t *state, void *user_data)
{
td_state = cur_dance(state);
switch (td_state) {
case SINGLE_TAP:
case SINGLE_HOLD:
layer_on(_NAV);
break;
case DOUBLE_TAP:
case DOUBLE_HOLD:
accent_state = ACCENT_LEFT;
break;
case OTHER_TAP:
break;
}
}
void dance_nav_accent_reset (tap_dance_state_t *state, void *user_data)
{
switch (td_state) {
case SINGLE_TAP:
case SINGLE_HOLD:
layer_off(_NAV);
break;
case DOUBLE_TAP:
case DOUBLE_HOLD:
case OTHER_TAP:
break;
}
}
void dance_num_accent_finished (tap_dance_state_t *state, void *user_data)
{
td_state = cur_dance(state);
switch (td_state) {
case SINGLE_TAP:
case SINGLE_HOLD:
layer_on(_NUM);
break;
case DOUBLE_TAP:
case DOUBLE_HOLD:
accent_state = ACCENT_RIGHT;
break;
case OTHER_TAP:
break;
}
}
void dance_num_accent_reset (tap_dance_state_t *state, void *user_data)
{
switch (td_state) {
case SINGLE_TAP:
case SINGLE_HOLD:
layer_off(_NUM);
break;
case DOUBLE_TAP:
case DOUBLE_HOLD:
case OTHER_TAP:
break;
}
}

View File

@ -0,0 +1,47 @@
/* Copyright 2024 Vaarai
*
* 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
#include QMK_KEYBOARD_H
/* Tap dances definitions */
enum tap_dances {
TD_SFT_CAPSW,
TD_NAV_ACCENT,
TD_NUM_ACCENT,
TAP_DANCE_ACTIONS_COUNT /* Utility to get TD_xxx count */
};
/* Accented letters */
typedef enum {
ACCENT_NONE,
ACCENT_LEFT,
ACCENT_RIGHT
} accent_state_t;
extern accent_state_t accent_state;
extern tap_dance_action_t tap_dance_actions[TAP_DANCE_ACTIONS_COUNT];
void dance_shift_capsword_finished (tap_dance_state_t *state, void *user_data);
void dance_shift_capsword_reset (tap_dance_state_t *state, void *user_data);
void dance_nav_accent_finished (tap_dance_state_t *state, void *user_data);
void dance_nav_accent_reset (tap_dance_state_t *state, void *user_data);
void dance_num_accent_finished (tap_dance_state_t *state, void *user_data);
void dance_num_accent_reset (tap_dance_state_t *state, void *user_data);

View File

@ -0,0 +1,52 @@
# Cornia Keyboard
![Cornia v1](https://imgur.com/3vRlvi3)
A split keyboard with 3x6 column strongly staggered keys and 3 thumb keys
Keyboard Maintainer: [Vaarai](https://github.com/Vaarai)
Hardware Supported: Cornia PCB, RP2040 / 0xCB-Helios
Hardware Availability: [PCB Data](https://github.com/Vaarai/Cornia)
Make example for this keyboard (after setting up your build environment):
```sh
make cornia/v1:default
```
Flashing example for this keyboard:
```sh
make cornia/v1: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
The Cornia PCBs have a reset button on the bottom side near to the TRRS jack.
To enter in to the bootloader you can either:
- Hold reset when plugging in that half of the keyboard.
- Double press reset if firmware was already flashed and if RP2040 is used
- Press NAV+NUM+ESC if firmware was already flashed no matter what controller is used
## Keymaps
Two keymaps are available for now, below are their [KLE](https://www.keyboard-layout-editor.com/) views:
- [Default QWERTY layout for Cornia keyboard](https://www.keyboard-layout-editor.com/#/gists/5af136790cefe4b35cdf02ca52c1fccc)
- [Fire layout for Cornia keyboard](https://www.keyboard-layout-editor.com/#/gists/a40345c92e1f3f326426ef890ebf4d1c) (Based on [Fire (Oxey)](https://docs.google.com/document/d/1Ic-h8UxGe5-Q0bPuYNgE3NoWiI8ekeadvSQ5YysrwII) layout)
## OLED Display & Cirque Trackpad
The Corne Keyboard also support OLED Display and Cirque Trackpad through I²C, an implementation is available in `fire` keymap.
To use it please make with the following command:
```sh
make cornia:fire
```
And flash with:
```sh
make cornia:fire:flash
```

View File

@ -0,0 +1,12 @@
{
"keyboard_name": "Cornia v0.6",
"usb": {
"pid": "0x0600",
"device_version": "0.6.0"
},
"diode_direction": "COL2ROW",
"matrix_pins": {
"cols": [ "GP29", "GP28", "GP27", "GP26", "GP22", "GP20" ],
"rows": [ "GP4", "GP5", "GP6", "GP7" ]
}
}

View File

@ -0,0 +1,21 @@
{
"keyboard_name": "Cornia v1",
"usb": {
"pid": "0x1000",
"device_version": "1.0.0"
},
"split": {
"handedness": {
"pin": "GP25"
}
},
"matrix_pins": {
"direct":[
["GP27", "GP4", "GP28", "GP3", "GP29", "GP2"],
["GP5", "GP26", "GP6", "GP22", "GP7", "GP20"],
["GP8", "GP15", "GP9", "GP14", "GP12", "GP13"],
[ null, null, null, "GP16", "GP23", "GP21"]
]
}
}

View File

@ -1,5 +1,6 @@
"""This script automates the copying of the default keymap into your own keymap. """This script automates the copying of the default keymap into your own keymap.
""" """
import re
import shutil import shutil
from milc import cli from milc import cli
@ -13,6 +14,13 @@ from qmk.keyboard import keyboard_completer, keyboard_folder
from qmk.userspace import UserspaceDefs from qmk.userspace import UserspaceDefs
def validate_keymap_name(name):
"""Returns True if the given keymap name contains only a-z, 0-9 and underscore characters.
"""
regex = re.compile(r'^[a-zA-Z0-9][a-zA-Z0-9_]+$')
return bool(regex.match(name))
def prompt_keyboard(): def prompt_keyboard():
prompt = """{fg_yellow}Select Keyboard{style_reset_all} prompt = """{fg_yellow}Select Keyboard{style_reset_all}
If you`re unsure you can view a full list of supported keyboards with {fg_yellow}qmk list-keyboards{style_reset_all}. If you`re unsure you can view a full list of supported keyboards with {fg_yellow}qmk list-keyboards{style_reset_all}.
@ -60,6 +68,10 @@ def new_keymap(cli):
cli.log.error(f'Default keymap {{fg_cyan}}{keymap_path_default}{{fg_reset}} does not exist!') cli.log.error(f'Default keymap {{fg_cyan}}{keymap_path_default}{{fg_reset}} does not exist!')
return False return False
if not validate_keymap_name(user_name):
cli.log.error('Keymap names must contain only {fg_cyan}a-z{fg_reset}, {fg_cyan}0-9{fg_reset} and {fg_cyan}_{fg_reset}! Please choose a different name.')
return False
if keymap_path_new.exists(): if keymap_path_new.exists():
cli.log.error(f'Keymap {{fg_cyan}}{user_name}{{fg_reset}} already exists! Please choose a different name.') cli.log.error(f'Keymap {{fg_cyan}}{user_name}{{fg_reset}} already exists! Please choose a different name.')
return False return False

View File

@ -29,6 +29,7 @@ def _convert_macros(via_macros):
if len(via_macros) == 0: if len(via_macros) == 0:
return list() return list()
split_regex = re.compile(r'(}\,)|(\,{)') split_regex = re.compile(r'(}\,)|(\,{)')
macro_group_regex = re.compile(r'({.+?})')
macros = list() macros = list()
for via_macro in via_macros: for via_macro in via_macros:
# Split VIA macro to its elements # Split VIA macro to its elements
@ -38,13 +39,28 @@ def _convert_macros(via_macros):
macro_data = list() macro_data = list()
for m in macro: for m in macro:
if '{' in m or '}' in m: if '{' in m or '}' in m:
# Found keycode(s) # Split macro groups
keycodes = m.split(',') macro_groups = macro_group_regex.findall(m)
# Remove whitespaces and curly braces from around keycodes for macro_group in macro_groups:
keycodes = list(map(lambda s: s.strip(' {}'), keycodes)) # Remove whitespaces and curly braces from around group
# Remove the KC prefix macro_group = macro_group.strip(' {}')
keycodes = list(map(lambda s: s.replace('KC_', ''), keycodes))
macro_data.append({"action": "tap", "keycodes": keycodes}) macro_action = 'tap'
macro_keycodes = []
if macro_group[0] == '+':
macro_action = 'down'
macro_keycodes.append(macro_group[1:])
elif macro_group[0] == '-':
macro_action = 'up'
macro_keycodes.append(macro_group[1:])
else:
macro_keycodes.extend(macro_group.split(',') if ',' in macro_group else [macro_group])
# Remove the KC prefixes
macro_keycodes = list(map(lambda s: s.replace('KC_', ''), macro_keycodes))
macro_data.append({"action": macro_action, "keycodes": macro_keycodes})
else: else:
# Found text # Found text
macro_data.append(m) macro_data.append(m)
@ -54,13 +70,13 @@ def _convert_macros(via_macros):
def _fix_macro_keys(keymap_data): def _fix_macro_keys(keymap_data):
macro_no = re.compile(r'MACRO0?([0-9]{1,2})') macro_no = re.compile(r'MACRO0?\(([0-9]{1,2})\)')
for i in range(0, len(keymap_data)): for i in range(0, len(keymap_data)):
for j in range(0, len(keymap_data[i])): for j in range(0, len(keymap_data[i])):
kc = keymap_data[i][j] kc = keymap_data[i][j]
m = macro_no.match(kc) m = macro_no.match(kc)
if m: if m:
keymap_data[i][j] = f'MACRO_{m.group(1)}' keymap_data[i][j] = f'MC_{m.group(1)}'
return keymap_data return keymap_data