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
When parsing a ZMK layout with keymap parse -z <keyboard>.keymap, we look up the keymap filename, infer the ZMK keyboard name, and then look up if it exists in https://github.com/caksoylar/keymap-drawer/blob/main/resources/zmk_keyboard_layouts.yaml. If it doesn't, then we don't output a layout field in the keymap YAML and expect the user to correct it in the keymap draw call.
Instead of this implicit workflow, we can make the concept of ZMK keyboard name explicit by simply outputting layout: { zmk_keyboard: <keyboard> } and defer any mapping look-ups to the draw phase. This allows us to do a few things better:
Maintain a separate database of ZMK layouts, without a qmk_keyboard indirection
Even if the keyboard name is not known, parse and output the layout_name for the chosen physical layout/matrix transform
This can then be combined with --dts-layout/--qmk-info-json to keymap draw, where it can be used to choose between multiple layouts (without having to manually provide --layout-name)
This will particularly help the CI workflow, since we can look-up a overlay/dts/dtsi that contains the layout and not have to blindly select one of the defined layouts in it
No longer exposing to the user the term qmk_keyboard when what they do has nothing to do with QMK
Implementation shouldn't be hard, we just need to expose zmk_keyboard/--zmk-keyboard options, output it via keymap parse, and move the layout mappings to happen during keymap draw instead.
The text was updated successfully, but these errors were encountered:
When parsing a ZMK layout with
keymap parse -z <keyboard>.keymap
, we look up the keymap filename, infer the ZMK keyboard name, and then look up if it exists in https://github.com/caksoylar/keymap-drawer/blob/main/resources/zmk_keyboard_layouts.yaml. If it doesn't, then we don't output alayout
field in the keymap YAML and expect the user to correct it in thekeymap draw
call.Instead of this implicit workflow, we can make the concept of ZMK keyboard name explicit by simply outputting
layout: { zmk_keyboard: <keyboard> }
and defer any mapping look-ups to the draw phase. This allows us to do a few things better:qmk_keyboard
indirectionlayout_name
for the chosen physical layout/matrix transform--dts-layout/--qmk-info-json
tokeymap draw
, where it can be used to choose between multiple layouts (without having to manually provide--layout-name
)overlay/dts/dtsi
that contains the layout and not have to blindly select one of the defined layouts in itqmk_keyboard
when what they do has nothing to do with QMKImplementation shouldn't be hard, we just need to expose
zmk_keyboard
/--zmk-keyboard
options, output it viakeymap parse
, and move the layout mappings to happen duringkeymap draw
instead.The text was updated successfully, but these errors were encountered: