remap-keys / remap

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

KLE layout decals will break the parser #583

Closed federicoweber closed 3 years ago

federicoweber commented 3 years ago

KLE decals in the keymaps are breaking the JSON parser, returning the following error image

I think the reason there is they are using two pairs of key:value in the definition and the schema is not supporting that.

 {
   "a":7,
   "d":true
},
"5x12 1U"

You can test that with the following keyboard definition

{
   "name":"Gizmo Engineering GK6",
   "vendorId":"0x6532",
   "productId":"0x0001",
   "lighting":"none",
   "matrix":{
      "rows":5,
      "cols":12
   },
   "layouts":{
      "labels":[
        [
          "Bottom Row",
          "Default",
          "1x2U",
          "5x12 1U"
        ]
      ],
      "keymap":[
         [
            "0,0",
            "0,1",
            "0,2",
            "0,3",
            "0,4",
            "0,5",
            "0,6",
            "0,7",
            "0,8",
            "0,9",
            "0,10",
            "0,11"
         ],
         [
            "1,0",
            "1,1",
            "1,2",
            "1,3",
            "1,4",
            "1,5",
            "1,6",
            "1,7",
            "1,8",
            "1,9",
            "1,10",
            "1,11"
         ],
         [
            "2,0",
            "2,1",
            "2,2",
            "2,3",
            "2,4",
            "2,5",
            "2,6",
            "2,7",
            "2,8",
            "2,9",
            "2,10",
            "2,11"
         ],
         [
            "3,0",
            "3,1",
            "3,2",
            "3,3",
            "3,4",
            "3,5",
            "3,6",
            "3,7",
            "3,8",
            "3,9",
            "3,10",
            "3,11"
         ],
         [
            "4,0\n\n\n0,0",
            "4,1\n\n\n0,0",
            "4,2\n\n\n0,0",
            "4,3\n\n\n0,0",
            {
               "w":2
            },
            "4,4\n\n\n0,0",
            {
               "w":2
            },
            "4,7\n\n\n0,0",
            "4,8\n\n\n0,0",
            "4,9\n\n\n0,0",
            "4,10\n\n\n0,0",
            "4,11\n\n\n0,0"
         ],
         [
            {
               "a":4
            },
            "4,0\n\n\n0,1",
            "4,1\n\n\n0,1",
            "4,2\n\n\n0,1",
            "4,3\n\n\n0,1",
            "4,4\n\n\n0,1",
            {
               "w":2
            },
            "4,5\n\n\n0,1",
            "4,7\n\n\n0,1",
            "4,8\n\n\n0,1",
            "4,9\n\n\n0,1",
            "4,10\n\n\n0,1",
            "4,11\n\n\n0,1"
         ],
         [
            {
               "a":4
            },
            "4,0\n\n\n0,2",
            "4,1\n\n\n0,2",
            "4,2\n\n\n0,2",
            "4,3\n\n\n0,2",
            "4,4\n\n\n0,2",
            "4,5\n\n\n0,2",
            "4,6\n\n\n0,2",
            "4,7\n\n\n0,2",
            "4,8\n\n\n0,2",
            "4,9\n\n\n0,2",
            "4,10\n\n\n0,2",
            "4,11\n\n\n0,2",
            {
              "a":7,
              "d":true
            },
            "5x12 1U"
         ]
      ]
   }
}

Thanks!

federicoweber commented 3 years ago

Oh wow that was fast. Thanks!

adamrocker commented 3 years ago

@federicoweber Sorry for the late contact. I've fixed this issue and made sure that it works find as you know :)