39aldo39 / klfc

Keyboard Layout Files Creator
GNU General Public License v3.0
215 stars 13 forks source link

empty slots not considered #57

Open jarnosz opened 2 weeks ago

jarnosz commented 2 weeks ago

hello! if i have a json keyboard with, say,

      "shiftlevels": [ "None", "Shift", "Alt+Control", "Shift+Alt+Control" ],
      "keys": [
        { "pos": "W", "shortcutPos": "W", "letters": [ "w", "W", "å", "Å" ], "capslock": true },
        { "pos": "R", "shortcutPos": "R", "letters": [ "r", "R" ], "capslock": true },
        { "pos": "T", "shortcutPos": "T", "letters": [ "t", "T" ], "capslock": true },
        { "pos": "Y", "shortcutPos": "Y", "letters": [ "y", "Y" ], "capslock": true },
        { "pos": "U", "shortcutPos": "U", "letters": [ "u", "U", "ū", "Ū" ], "capslock": true },
        { "pos": "I", "shortcutPos": "I", "letters": [ "i", "I", "ī", "Ī" ], "capslock": true },
        { "pos": "O", "shortcutPos": "O", "letters": [ "o", "O", "ō", "Ō" ], "capslock": true },

the klc keyboard spits out something like

10  Q   1   q   Q   q   q   q   q   // QWERTY Q: q, Q, q, q, q, q
11  W   1   w   W   w   00e5    00c5    w   // QWERTY W: w, W, w, å, Å, w
12  E   1   e   E   -1  0113    0112    // QWERTY E: e, E, , ē, Ē
13  R   1   r   R   r   r   r   r   // QWERTY R: r, R, r, r, r, r
14  T   1   t   T   t   t   t   t   // QWERTY T: t, T, t, t, t, t
15  Y   1   y   Y   y   y   y   y   // QWERTY Y: y, Y, y, y, y, y

if I call klfc <filename>.json --remove-empty-letters --klc <dirname>.

How can I get rid of the repeated, empty letters in the output?

What exactly does the --remove-empty-letters option do?

Is this behavior intended, or is it a bug?