Skip to content

Commit

Permalink
kle2info: trim down x and y output
Browse files Browse the repository at this point in the history
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}
  • Loading branch information
kbrock committed Apr 26, 2020
1 parent a47915d commit 5c66639
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/python/kle2xy.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ def parse_layout(self, layout): # noqa FIXME(skullydazed): flake8 says this ha

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
Expand Down

0 comments on commit 5c66639

Please sign in to comment.