rotary encoder

This commit is contained in:
takashicompany 2024-09-01 15:28:03 +09:00
parent 739d14215c
commit 072e2b0224
3 changed files with 144 additions and 27 deletions

View File

@ -1,47 +1,158 @@
{
"manufacturer": "takashicompany",
"keyboard_name": "takashicompany/jourkey",
"keyboard_name": "Jourkey",
"maintainer": "takashicompany",
"bootloader": "atmel-dfu",
"development_board": "promicro",
"diode_direction": "COL2ROW",
"encoder": {
"rotary": [
{
"pin_a": "D1",
"pin_b": "D0"
}
]
},
"features": {
"bootmagic": true,
"command": false,
"console": false,
"encoder": true,
"extrakey": true,
"mousekey": true,
"nkro": true
},
"matrix_pins": {
"cols": ["C2", "C2", "C2", "C2"],
"rows": ["D1", "D1", "D1", "D1"]
"direct": [
[
"D4",
"C6",
"D7",
"E6",
"B4",
"F5",
"F6",
"F7",
"B5",
"B1",
"B3",
"B2",
"B6"
]
]
},
"processor": "atmega32u4",
"url": "",
"usb": {
"device_version": "1.0.0",
"pid": "0x0000",
"vid": "0xFEED"
"pid": "0x0062",
"vid": "0x7463"
},
"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": [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": [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": [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": [
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": 0,
"y": 1
},
{
"matrix": [
0,
6
],
"x": 1.5,
"y": 1
},
{
"matrix": [
0,
7
],
"x": 2.5,
"y": 1
},
{
"matrix": [
0,
8
],
"x": 3.5,
"y": 1
},
{
"matrix": [
0,
9
],
"x": 0,
"y": 2
},
{
"matrix": [
0,
10
],
"x": 1.75,
"y": 2
},
{
"matrix": [
0,
11
],
"x": 2.75,
"y": 2
},
{
"matrix": [
0,
12
],
"x": 3.75,
"y": 2
}
]
}
}

View File

@ -16,9 +16,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*
*/
[0] = LAYOUT(
KC_P7, KC_P8, KC_P9, KC_PSLS,
KC_P4, KC_P5, KC_P6, KC_PAST,
KC_P1, KC_P2, KC_P3, KC_PMNS,
KC_P0, KC_PDOT, KC_PENT, KC_PPLS
KC_1, KC_2, KC_3, KC_4, KC_5,
KC_6, KC_7, KC_8, KC_9,
KC_0, KC_A, KC_B, KC_C
)
};
#if defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[0] = { ENCODER_CCW_CW(KC_X, KC_Y) }
};
#endif

View File

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