add Vial for doio kb16 rev2 (#875)

* add vial for kb16

* relocate vial keymap to rev 2 directory
This commit is contained in:
ClownFish 2025-04-11 01:38:24 -04:00 committed by GitHub
parent 767c3aed56
commit b620d059f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 218 additions and 0 deletions

View file

@ -0,0 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#pragma once
#define VIAL_KEYBOARD_UID {0x65, 0x9A, 0x6E, 0x3C, 0x47, 0x63, 0xB9, 0x9B}
#define VIAL_UNLOCK_COMBO_ROWS { 3, 0 }
#define VIAL_UNLOCK_COMBO_COLS { 0, 3 }

View file

@ -0,0 +1,132 @@
/* Copyright 2022 DOIO
* Copyright 2022 HorrorTroll <https://github.com/HorrorTroll>
*
* 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
// OLED animation
#include "lib/layer_status/layer_status.h"
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
1 2 3 4 Ply TO1
5 6 7 8
9 0 Ent
Mut
Fn2
! @ # $
% ^ & *
( )
*/
/* Row: 0 1 2 3 4 */
[0] = LAYOUT(
KC_1, KC_2, KC_3, KC_4, KC_MPLY,
KC_5, KC_6, KC_7, KC_8, TO(1),
KC_9, KC_0, KC_UP, KC_ENT, KC_MUTE,
MO(3), KC_LEFT, KC_DOWN, KC_RIGHT
),
/*
*/
/* Row: 0 1 2 3 4 */
[1] = LAYOUT(
_______, _______, _______, _______, _______,
_______, _______, _______, _______, TO(2),
_______, _______, _______, _______, _______,
_______, _______, _______, _______
),
/*
*/
/* Row: 0 1 2 3 4 */
[2] = LAYOUT(
_______, _______, _______, _______, _______,
_______, _______, _______, _______, TO(3),
_______, _______, _______, _______, _______,
_______, _______, _______, _______
),
/*
SpdSpi TO0
SadSai
PrvNxtHui
TogVadHudVai
*/
/* Row: 0 1 2 3 4 */
[3] = LAYOUT(
RM_SPDD, RM_SPDU, _______, QK_BOOT, _______,
RM_SATD, RM_SATU, _______, _______, TO(0),
RM_PREV, RM_NEXT, RM_HUEU, _______, _______,
RM_TOGG, RM_VALD, RM_HUED, RM_VALU
),
};
#ifdef OLED_ENABLE
bool oled_task_user(void) {
render_layer_status();
return true;
}
#endif
#ifdef ENCODER_MAP_ENABLE
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[0] = { ENCODER_CCW_CW(KC_MPRV, KC_MNXT), ENCODER_CCW_CW(KC_PGDN, KC_PGUP), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
[2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
[3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
};
#endif

View file

@ -0,0 +1,4 @@
ENCODER_MAP_ENABLE = yes
VIA_ENABLE = yes
VIAL_ENABLE = yes
VIALRGB_ENABLE = yes

View file

@ -0,0 +1,74 @@
{
"name": "KB16-01",
"vendorId": "0xD010",
"productId": "0x1601",
"matrix": {
"rows": 4,
"cols": 5
},
"lighting": "vialrgb",
"layouts": {
"keymap":[
[
"0,0",
"0,1",
"0,2",
"0,3",
{
"x": 0.25
},
"0,0\n\n\n\n\n\n\n\n\ne",
"0,1\n\n\n\n\n\n\n\n\ne",
{
"x": 0.25
},
"1,0\n\n\n\n\n\n\n\n\ne",
"1,1\n\n\n\n\n\n\n\n\ne"
],
[
"1,0",
"1,1",
"1,2",
"1,3",
{
"x": 0.75
},
"0,4",
{
"x": 1.25
},
"1,4"
],
[
"2,0",
"2,1",
"2,2",
"2,3"
],
[
{
"y": -0.75,
"x": 5.25
},
"2,0\n\n\n\n\n\n\n\n\ne",
"2,1\n\n\n\n\n\n\n\n\ne"
],
[
{
"y": -0.25
},
"3,0",
"3,1",
"3,2",
"3,3"
],
[
{
"y": -0.75,
"x": 5.75
},
"2,4"
]
]
}
}