diff options
author | Keenan Brock <keenan@thebrocks.net> | 2020-04-26 11:34:07 -0400 |
---|---|---|
committer | Keenan Brock <keenan@thebrocks.net> | 2020-04-26 12:20:40 -0400 |
commit | 5c666398d55708915091a08299dc7d493b37db3c (patch) | |
tree | e35047da8f008a4338f1619b27fcf01c1c2b1984 /lib/python/kle2xy.py | |
parent | a47915d2d264ac78ae3c694b56aa00650ce12859 (diff) | |
download | qmk_firmware-5c666398d55708915091a08299dc7d493b37db3c.tar.gz qmk_firmware-5c666398d55708915091a08299dc7d493b37db3c.zip |
kle2info: trim down x and y output
fixes quirks with float implementation.
before:
{"label":"Esc", "x":0.66, "y":1.45}, {"label":"!", "x":1.6600000000000001, "y":1.45}
after:
{"label":"Esc", "x":0.66, "y":1.45}, {"label":"!", "x":1.66, "y":1.45}
Diffstat (limited to 'lib/python/kle2xy.py')
-rw-r--r-- | lib/python/kle2xy.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/python/kle2xy.py b/lib/python/kle2xy.py index bff1d025b..003476f92 100644 --- a/lib/python/kle2xy.py +++ b/lib/python/kle2xy.py | |||
@@ -110,8 +110,8 @@ class KLE2xy(list): | |||
110 | 110 | ||
111 | else: | 111 | else: |
112 | current_key['name'] = key | 112 | current_key['name'] = key |
113 | current_key['row'] = current_row | 113 | current_key['row'] = round(current_row, 2) |
114 | current_key['column'] = current_col | 114 | current_key['column'] = round(current_col, 2) |
115 | 115 | ||
116 | # Determine the X center | 116 | # Determine the X center |
117 | x_center = (current_key['width'] * self.key_width) / 2 | 117 | x_center = (current_key['width'] * self.key_width) / 2 |