You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code seems to remove surrounding parentheses before splitting a keymap into chunks. However it seems that if the last key in a keymap ends with a parentheses this one will be stripped as well and therefore the key is parsed incorrectly.
See for example the Model01 keymap from QMK. The last two keys (the palm keys) are both defined as MO(FUN). But when running keymapviz over (via PR #90) it the last one is incorrectly parsed as MO.
/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┐
* │QK_BOO│ 1 │ 2 │ 3 │ 4 │ 5 │RGB_MO│ │ │ 6 │ 7 │ 8 │ 9 │ 0 │TG(NUM│
* ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤
* │ GRV │ Q │ W │ E │ R │ T │ │ │ │ Y │ U │ I │ O │ P │ EQL │
* ├──────┼──────┼──────┼──────┼──────┼──────┤ TAB │ │ ENT ├──────┼──────┼──────┼──────┼──────┼──────┤
* │ PGUP │ A │ S │ D │ F │ G ├──────┤ ├──────┤ H │ J │ K │ L │ SCLN │ QUOT │
* ├──────┼──────┼──────┼──────┼──────┼──────┤ │ │ ├──────┼──────┼──────┼──────┼──────┼──────┤
* │ PGDN │ Z │ X │ C │ V │ B │ ESC │ │ │ N │ M │ COMM │ DOT │ SLSH │ MINS │
* └──────┴──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┴──────┘
*
* ┌──────┬──────┐ ┌──────┬──────┐
* │ LCTL │ BSPC ├──────┐ ┌──────┤ SPC │ RCTL │
* │ │ │ LGUI ├──────┐ ┌──────┤ RALT │ │ │
* └──────┴──────┤ │ LSFT │ │ RSFT │ ├──────┴──────┘
* └──────┤ │ │ ├──────┘
* ┌──────┐ └──────┘ └──────┘ ┌──────┐
* │ │ │ │
* │MO(FUN│ │ MO │
* │ │ │ │
* └──────┘ └──────┘
* generated by [keymapviz] */
This is not specific to PR #90. It happens with already existing code, too.
The text was updated successfully, but these errors were encountered:
hupfdule
added a commit
to hupfdule/keymapviz
that referenced
this issue
Jun 30, 2023
The code seems to remove surrounding parentheses before splitting a keymap into chunks. However it seems that if the last key in a keymap ends with a parentheses this one will be stripped as well and therefore the key is parsed incorrectly.
See for example the Model01 keymap from QMK. The last two keys (the palm keys) are both defined as
MO(FUN)
. But when running keymapviz over (via PR #90) it the last one is incorrectly parsed asMO
.This is not specific to PR #90. It happens with already existing code, too.
The text was updated successfully, but these errors were encountered: