summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKeenan Brock <keenan@thebrocks.net>2020-04-26 11:34:07 -0400
committerFlorian Didron <fdidron@users.noreply.github.com>2020-06-12 17:00:27 +0900
commit2b10d303d4b09aa006b589b20c7e1f0d631a355d (patch)
treef4b11ad3d530b8a56092c4d3a82e1a30b58f9319 /lib
parentdf51ac1db18cb6c76ca2ede501809eaaf3f32735 (diff)
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')
-rw-r--r--lib/python/kle2xy.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/python/kle2xy.py b/lib/python/kle2xy.py
index bff1d025b7..003476f92e 100644
--- a/lib/python/kle2xy.py
+++ b/lib/python/kle2xy.py
@@ -110,8 +110,8 @@ class KLE2xy(list):
else:
current_key['name'] = key
- current_key['row'] = current_row
- current_key['column'] = current_col
+ current_key['row'] = round(current_row, 2)
+ current_key['column'] = round(current_col, 2)
# Determine the X center
x_center = (current_key['width'] * self.key_width) / 2