remap-keys / remap

Keymap Customization Web app for your keyboard.
https://remap-keys.app
Other
227 stars 27 forks source link

Support encoders in the KeyboardModel with alignment. #736

Closed yoichiro closed 1 year ago

yoichiro commented 1 year ago

Related: #201

This pull request adds a new logic to determine whether the key is an encoder or not with alighment.

There is the following pattern to specify an encoder:

(Left Top) (Center) (Right Bottom) -> (Label)
           e0                      -> "{a:3},"e0",{a:4}" or "{a:7},"e0",{a:4}"
0,1        e0                      -> "0,1\n\n\n\n\n\n\n\n\ne0"
           e0        0,1           -> "\n\n\n0,1\n\n\n\n\n\ne0"
0,1        e0        0,2           -> "0,1\n\n\n0,2\n\n\n\n\n\ne0"

I would like to add the new logic to support the specification above so that each key model can have an encoder ID.

Also, if some key has an encode ID and there is no position, I think that the key is not "Decal", but is "Encoder". That is, all encoders should be displayed on the keyboard layout, and the "Decal" is not applied for encoders because the meaning of "Decal" is what the key is not displayed on the keyboard layout.

yoichiro commented 1 year ago

@adamrocker Could you review this pull request? Thanks in advance!