Moved keymap.c to keymap.json

This commit is contained in:
Vino Rodrigues 2024-11-14 08:00:10 +11:00
parent 5fe483e3d6
commit 73137509d5
4 changed files with 42 additions and 37 deletions

View File

@ -69,12 +69,13 @@
"ws2812": {
"pin": "C15"
},
"community_layouts": ["ortho_3x3"],
"layouts": {
"LAYOUT_ortho_3x3": {
"layout": [
{"label": "1", "matrix": [0, 0], "x": 0, "y": 0},
{"label": "2", "matrix": [0, 1], "x": 1, "y": 0},
{"label": "Knob", "matrix": [0, 2], "x": 2, "y": 0},
{"label": "Knob", "matrix": [0, 2], "x": 2, "y": 0, "encoder": 0},
{"label": "3", "matrix": [1, 0], "x": 0, "y": 1},
{"label": "4", "matrix": [1, 1], "x": 1, "y": 1},
{"label": "5", "matrix": [1, 2], "x": 2, "y": 1},

View File

@ -1,35 +0,0 @@
// Copyright 2024 Binepad (@binepad)
// SPDX-License-Identifier: GPL-2.0-or-later
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
*
* 1 2 K
*
* 3 4 5
*
* 6 7 8
*
*/
[0] = LAYOUT_ortho_3x3(
KC_P1, KC_P2, KC_MUTE,
KC_P3, KC_P4, KC_P5,
KC_P6, KC_P7, LT(1, KC_P8)
),
[1] = LAYOUT_ortho_3x3(
RGB_HUI, RGB_SAI, RGB_SPI,
RGB_HUD, RGB_SAD, RGB_SPD,
RGB_TOG, RGB_MOD, _______
)
};
#if defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[1] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) }
};
#endif

View File

@ -0,0 +1,40 @@
{
"keyboard": "binepad/bnk8",
"version": 1,
"author": "binepad",
"notes": "Copyright 2024 Binepad (@binepad) \n SPDX-License-Identifier: GPL-2.0-or-later \n This file is a keymap.json file for binepad/bnk8",
"keymap": "default",
"layout": "LAYOUT_ortho_3x3",
"layers": [
[
"KC_P1", "KC_P2", "KC_MUTE",
"KC_P3", "KC_P4", "KC_P5",
"KC_P6", "KC_P7", "LT(1, KC_P8)"
],
[
"RGB_HUI", "RGB_SAI", "RGB_SPI",
"RGB_HUD", "RGB_SAD", "RGB_SPD",
"RGB_TOG", "RGB_MOD", "_______"
]
],
"config": {
"features": {
"encoder_map": true
}
},
"encoders": [
[
{
"ccw": "KC_VOLD",
"cw": "KC_VOLU"
}
],
[
{
"ccw": "RGB_VAD",
"cw": "RGB_VAI"
}
]
]
}

View File

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