nickcoutsos / keymap-editor

A web based graphical editor of ZMK keymaps.
http://nickcoutsos.github.io/keymap-editor
MIT License
1.21k stars 313 forks source link

Support rotary encoders and other features #12

Closed nickcoutsos closed 2 years ago

nickcoutsos commented 3 years ago

Need to look into how encoders should fit into a layout definition, but it looks like in ZMK they're bound separately from the regular keybinds for a layer. To make this work I would need to either make another array of array of binds (one for each layer) just for encoders or, more likely, change the schema from

"layers": [
  ["&kp Q", "&kp W", ...],
]

to

"layers": [{
  "keys": ["&kp Q", "&kp W", ...],
  "encoders": [...]
}]

This would be a backwards incompatible break from the convention of using QMK's keymap.json schema, but necessary. I think other features like combos may need to live there as well, unless they are independent of layers.

If the schema is changed it should also include a version and support for seamlessly updating old keymap files.

nickcoutsos commented 2 years ago

It's a little incomplete but editing sensor bindings now have basic support.