keyboard-layout-editor icon indicating copy to clipboard operation
keyboard-layout-editor copied to clipboard

Export to JSON may loose float values accuracy

Open adamws opened this issue 2 years ago • 0 comments

Exporting json from following layout (two first keys of Kinesis Advantage preset):

[{f:1,f2:2,w:0.675,h:0.85},"\nEsc",{x:0.075,w:0.675,h:0.85},"\nF1"],

results in following json file:

[
  [
    {
      "f": 1,
      "f2": 2,
      "w": 0.675,
      "h": 0.85
    },
    "\nEsc",
    {
      "x": 0.07499999999999996,
      "w": 0.675,
      "h": 0.85
    },
    "\nF1"
  ]
]

x property of second key lost accuracy.

adamws avatar Aug 13 '23 13:08 adamws