-
-
Notifications
You must be signed in to change notification settings - Fork 39.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update dynamis keyboard #17625
Update dynamis keyboard #17625
Conversation
@drashna Could you check my PR? |
These appear to be relatively significant changes to the matrix; does this represent new hardware that should in fact be managed in a rev2 folder? |
This PR is 4 hours old, and has not been reviewed at all, yet. There is no need to tag me, at this point. In this context, this sort of ping is actually quite rude. Pull Request reviews are something that is done in our free time. We are not paid nor compensated for the time we spend reviewing, as it is a labor of love. As such, this means that it can take time for us to get to your Pull Request. Things like family, or life can get in the way of us getting to PRs, and burnout is a serious consideration. The QMK firmware repository averages 200 PRs opened and 200 PRs merged every month, so please have patience. And to be clear, I'm not angry here, but this is behavior that we want to nip in the bud before it becomes a problem. |
Dear drashna, I apologize for my rude behavior. I mistaked the usage of @ tag... Thank you for pointing it out. |
Co-authored-by: Drashna Jaelre <drashna@live.com>
No. This code is newly version firmware of dynamis keyboard, and support the same hardware. |
No worries. If it's been ... a while (eg, weeks), that's fine. Also, if you exclude the "@", it won't tag that user. Eg, tagging a user is for getting their attention, but in this case, there is no need to get my attention (it's new, so I'll definitely see it when I go through PRs) |
keyboards/bbrfkr/dynamis/dynamis.h
Outdated
{ C90, C91, C92, C93, C94, C95, C96 }, \ | ||
{ KC_WH_D, KC_WH_U, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ C90, C91, C92, C93, C94, C95, C96 }, \ | |
{ KC_WH_D, KC_WH_U, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ | |
{ C90, C91, C92, C93, C94, C95, C96 } \ |
keyboards/bbrfkr/dynamis/dynamis.h
Outdated
{ C90, C91, C92, C93, C94, C95, C96 }, \ | ||
{ KC_WH_D, KC_WH_U, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ C90, C91, C92, C93, C94, C95, C96 }, \ | |
{ KC_WH_D, KC_WH_U, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ | |
{ C90, C91, C92, C93, C94, C95, C96 } \ |
keyboards/bbrfkr/dynamis/config.h
Outdated
@@ -26,9 +26,9 @@ | |||
#define PRODUCT dynamis | |||
|
|||
/* key matrix */ | |||
#define MATRIX_ROWS 10 | |||
#define MATRIX_ROWS 11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#define MATRIX_ROWS 11 | |
#define MATRIX_ROWS 10 |
keyboards/bbrfkr/dynamis/config.h
Outdated
#define MATRIX_COLS 7 | ||
#define MATRIX_ROW_PINS { B6, B4, D6, D5, D1, C6, B5, D7, D4, D0 } | ||
#define MATRIX_ROW_PINS { B6, B4, D6, D5, D1, C6, B5, D7, D4, D0, D2 } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is D2 actually being used here? Or just being used as a place holder?
#define MATRIX_ROW_PINS { B6, B4, D6, D5, D1, C6, B5, D7, D4, D0, D2 } | |
#define MATRIX_ROW_PINS { B6, B4, D6, D5, D1, C6, B5, D7, D4, D0 } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
D2 is for the encoder. I think that the default via keymap for encoder cannot be defined if this doesn't exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can undefine and redefine the values for the via keymap, actually.
Which is the ideal option here, since you're creating blank spots in the layout that are ONLY used for the encoders.
Also, you should use NO_PIN
instead of assigning a pin here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. I replaced D2
to NO_PIN
.
I didn't notice that this pr conflicted. The conflict has been resolved. |
keyevent_t encoder_ccw = { | ||
.key = (keypos_t){.row = 10, .col = 1}, | ||
.pressed = false | ||
}; | ||
|
||
keyevent_t encoder_cw = { | ||
.key = (keypos_t){.row = 10, .col = 0}, | ||
.pressed = false | ||
}; | ||
|
||
void matrix_scan_user(void) { | ||
if (IS_PRESSED(encoder_ccw)) { | ||
encoder_ccw.pressed = false; | ||
encoder_ccw.time = (timer_read() | 1); | ||
action_exec(encoder_ccw); | ||
} | ||
|
||
if (IS_PRESSED(encoder_cw)) { | ||
encoder_cw.pressed = false; | ||
encoder_cw.time = (timer_read() | 1); | ||
action_exec(encoder_cw); | ||
} | ||
} | ||
|
||
bool encoder_update_user(uint8_t index, bool clockwise) { | ||
if (clockwise) { | ||
encoder_cw.pressed = true; | ||
encoder_cw.time = (timer_read() | 1); | ||
action_exec(encoder_cw); | ||
} else { | ||
encoder_ccw.pressed = true; | ||
encoder_ccw.time = (timer_read() | 1); | ||
action_exec(encoder_ccw); | ||
} | ||
return false; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keyevent_t encoder_ccw = { | |
.key = (keypos_t){.row = 10, .col = 1}, | |
.pressed = false | |
}; | |
keyevent_t encoder_cw = { | |
.key = (keypos_t){.row = 10, .col = 0}, | |
.pressed = false | |
}; | |
void matrix_scan_user(void) { | |
if (IS_PRESSED(encoder_ccw)) { | |
encoder_ccw.pressed = false; | |
encoder_ccw.time = (timer_read() | 1); | |
action_exec(encoder_ccw); | |
} | |
if (IS_PRESSED(encoder_cw)) { | |
encoder_cw.pressed = false; | |
encoder_cw.time = (timer_read() | 1); | |
action_exec(encoder_cw); | |
} | |
} | |
bool encoder_update_user(uint8_t index, bool clockwise) { | |
if (clockwise) { | |
encoder_cw.pressed = true; | |
encoder_cw.time = (timer_read() | 1); | |
action_exec(encoder_cw); | |
} else { | |
encoder_ccw.pressed = true; | |
encoder_ccw.time = (timer_read() | 1); | |
action_exec(encoder_ccw); | |
} | |
return false; | |
} |
keyboards/bbrfkr/dynamis/config.h
Outdated
#define MATRIX_COLS 7 | ||
#define MATRIX_ROW_PINS { B6, B4, D6, D5, D1, C6, B5, D7, D4, D0 } | ||
#define MATRIX_ROW_PINS { B6, B4, D6, D5, D1, C6, B5, D7, D4, D0, NO_PIN } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To clarify, the NO_PIN
is there to facilitate encoder in the matrix, correct?
If so, then it needs to be reverted. It's not the proper way to handle this, especially as VIA now supports the encoder map feature.
https://docs.qmk.fm/#/feature_encoders?id=encoder-map
This allows for proper handling of all keycodes, without special cases, and for it be configured dynamically, by VIA
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your comment. But, I cannot find the document that the via support encoder map... So, I don't understand to construct a json file for supporting encoder map feature...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your sharing! I'll try it...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Now, this code supported encoder map.
The json for via is the following;
{
"name": "dynamis",
"vendorId": "0x6262",
"productId": "0x0001",
"lighting": "qmk_rgblight",
"matrix": {
"rows": 10,
"cols": 7
},
"layouts": {
"labels": [
"ISO Enter",
"Split Space",
"Split Left Shift",
"Split Right Shift",
"Split Backspace"
],
"keymap": [
[
{
"x": 15.5
},
"5,0\n\n\n4,1",
"9,0\n\n\n4,1"
],
[
{
"y": 0.25,
"x": 2.5
},
"0,0",
"0,1",
"0,2",
"0,3",
"0,4",
"0,5",
"0,6",
"5,6",
"5,5",
"5,4",
"5,3",
"5,2",
"5,1",
{
"w": 2
},
"5,0\n\n\n4,0"
],
[
{
"x": 2.5,
"w": 1.5
},
"1,0",
"1,1",
"1,2",
"1,3",
"1,4",
"1,5",
"1,6",
"6,6",
"6,5",
"6,4",
"6,3",
"6,2",
"6,1",
{
"w": 1.5
},
"6,0\n\n\n0,0",
{
"x": 4,
"w": 1.25,
"h": 2,
"w2": 1.5,
"h2": 1,
"x2": -0.25
},
"7,0\n\n\n0,1"
],
[
{
"x": 2.5,
"w": 1.75
},
"2,0",
"2,1",
"2,2",
"2,3",
"2,4",
"2,5",
"2,6",
"7,6",
"7,5",
"7,4",
"7,3",
"7,2",
{
"w": 2.25
},
"7,0\n\n\n0,0",
{
"x": 3
},
"7,1\n\n\n0,1"
],
[
{
"w": 1.25
},
"3,0\n\n\n2,1",
"3,1\n\n\n2,1",
{
"x": 0.25,
"w": 2.25
},
"3,1\n\n\n2,0",
"3,2",
"3,3",
"3,4",
"3,5",
"3,6",
"8,6",
"8,5",
"8,4",
"8,3",
"8,2",
{
"w": 2.75
},
"8,1\n\n\n3,0",
{
"x": 0.25
},
"9,1",
{
"a": 7
},
"e0",
{
"x": 0.25,
"a": 4,
"w": 1.75
},
"8,1\n\n\n3,1",
"8,0\n\n\n3,1"
],
[
{
"x": 2.5,
"w": 1.25
},
"4,0",
{
"w": 1.25
},
"4,1",
{
"w": 1.25
},
"4,2",
{
"w": 6.25
},
"4,3\n\n\n1,0",
{
"w": 1.25
},
"4,6",
{
"w": 1.25
},
"9,6",
{
"w": 1.25
},
"9,5",
{
"x": 0.5
},
"9,4",
"9,3",
"9,2"
],
[
{
"y": 0.25,
"x": 6.25,
"w": 2.25
},
"4,3\n\n\n1,1",
{
"w": 1.25
},
"4,4\n\n\n1,1",
{
"w": 2.75
},
"4,5\n\n\n1,1"
]
]
}
}
Thank you for your review! |
Co-authored-by: Drashna Jaelre <drashna@live.com>
Description
I updated the code of dynamis keyboard. In this work, the changes are the following:
Types of Changes
Issues Fixed or Closed by This PR
Checklist