Skip to content

Commit

Permalink
add encoder support to Imprint function row
Browse files Browse the repository at this point in the history
  • Loading branch information
RealET committed Mar 14, 2024
1 parent a3ab9e7 commit 98f5e5a
Show file tree
Hide file tree
Showing 3 changed files with 146 additions and 98 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______
)
};

const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_LEFT, KC_RIGHT) },
[1] = { 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) },
[3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
[4] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
[5] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
[6] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
[7] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
[8] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
[9] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
};
226 changes: 128 additions & 98 deletions keyboards/cyboard/imprint/imprint_function_row/keymaps/vial/vial.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,130 +45,160 @@
"keymap":
[
[
"6,5",
"6,4",
"6,3",
"6,2",
"6,1",
"6,0",
{
"6,5",
"6,4",
"6,3",
"6,2",
"6,1",
"6,0",
{
"x": 5.5
},
"13,0",
"13,1",
"13,2",
"13,3",
"13,4",
"13,5"
},
"13,0",
"13,1",
"13,2",
"13,3",
"13,4",
"13,5"
],
[
"5,5",
"5,4",
"5,3",
"5,2",
"5,1",
"5,0",
{
"5,5",
"5,4",
"5,3",
"5,2",
"5,1",
"5,0",
{
"x": 5.5
},
"12,0",
"12,1",
"12,2",
"12,3",
"12,4",
"12,5"
},
"12,0",
"12,1",
"12,2",
"12,3",
"12,4",
"12,5"
],
[
{
"y": -0.75,
"x": 6.25
},
"0,0\n\n\n\n\n\n\n\n\ne",
"0,1\n\n\n\n\n\n\n\n\ne",
{
"x": 1
},
"1,0\n\n\n\n\n\n\n\n\ne",
"1,1\n\n\n\n\n\n\n\n\ne"
],
[
"4,5",
"4,4",
"4,3",
"4,2",
"4,1",
"4,0",
{
{
"y": -0.25
},
"4,5",
"4,4",
"4,3",
"4,2",
"4,1",
"4,0",
{
"x": 5.5
},
"11,0",
"11,1",
"11,2",
"11,3",
"11,4",
"11,5"
},
"11,0",
"11,1",
"11,2",
"11,3",
"11,4",
"11,5"
],
[
{
"y": -0.75,
"x": 6.75
},
"0,0",
{
"x": 2
},
"7,0"
],
[
"3,5",
"3,4",
"3,3",
"3,2",
"3,1",
"3,0",
{
{
"y": -0.25
},
"3,5",
"3,4",
"3,3",
"3,2",
"3,1",
"3,0",
{
"x": 5.5
},
"10,0",
"10,1",
"10,2",
"10,3",
"10,4",
"10,5"
},
"10,0",
"10,1",
"10,2",
"10,3",
"10,4",
"10,5"
],
[
"2,5",
"2,4",
"2,3",
"2,2",
"2,1",
"2,0",
{
"2,5",
"2,4",
"2,3",
"2,2",
"2,1",
"2,0",
{
"x": 5.5
},
"9,0",
"9,1",
"9,2",
"9,3",
"9,4",
"9,5"
},
"9,0",
"9,1",
"9,2",
"9,3",
"9,4",
"9,5"
],
[
{
{
"x": 2
},
"1,3",
"1,2",
{
},
"1,3",
"1,2",
{
"x": 9.5
},
"8,2",
"8,3"
},
"8,2",
"8,3"
],
[
{
{
"y": -0.5,
"x": 5.5
},
"0,3",
"0,2",
"0,1",
{
},
"0,3",
"0,2",
"0,1",
{
"x": 0.5
},
"7,1",
"7,2",
"7,3"
},
"7,1",
"7,2",
"7,3"
],
[
{
{
"x": 5.5
},
"0,7",
"0,6",
"0,5",
{
},
"0,7",
"0,6",
"0,5",
{
"x": 0.5
},
"7,5",
"7,6",
"7,7"
},
"7,5",
"7,6",
"7,7"
]
]
}
Expand Down
5 changes: 5 additions & 0 deletions keyboards/cyboard/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
"rows": ["GP2", "GP3", "GP8", "GP4", "GP13", "GP9", "GP14"],
"cols": ["GP1", "GP10", "GP11", "GP12", "GP7", "GP6", "GP5", "GP19"]
},
"encoder": {
"rotary": [
{"pin_a": "GP18", "pin_b": "GP16"}
]
},
"split": {
"enabled": true
},
Expand Down

0 comments on commit 98f5e5a

Please sign in to comment.