diff options
Diffstat (limited to 'lib/python/kle2xy.py')
-rw-r--r-- | lib/python/kle2xy.py | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/lib/python/kle2xy.py b/lib/python/kle2xy.py index ea16a4b5e..929144319 100644 --- a/lib/python/kle2xy.py +++ b/lib/python/kle2xy.py | |||
@@ -4,6 +4,7 @@ | |||
4 | import hjson | 4 | import hjson |
5 | from decimal import Decimal | 5 | from decimal import Decimal |
6 | 6 | ||
7 | |||
7 | class KLE2xy(list): | 8 | class KLE2xy(list): |
8 | """Abstract interface for interacting with a KLE layout. | 9 | """Abstract interface for interacting with a KLE layout. |
9 | """ | 10 | """ |
@@ -13,17 +14,7 @@ class KLE2xy(list): | |||
13 | self.name = name | 14 | self.name = name |
14 | self.invert_y = invert_y | 15 | self.invert_y = invert_y |
15 | self.key_width = Decimal('19.05') | 16 | self.key_width = Decimal('19.05') |
16 | self.key_skel = { | 17 | self.key_skel = {'decal': False, 'border_color': 'none', 'keycap_profile': '', 'keycap_color': 'grey', 'label_color': 'black', 'label_size': 3, 'label_style': 4, 'width': Decimal('1'), 'height': Decimal('1'), 'x': Decimal('0'), 'y': Decimal('0')} |
17 | 'decal': False, | ||
18 | 'border_color': 'none', | ||
19 | 'keycap_profile': '', | ||
20 | 'keycap_color': 'grey', | ||
21 | 'label_color': 'black', | ||
22 | 'label_size': 3, | ||
23 | 'label_style': 4, | ||
24 | 'width': Decimal('1'), 'height': Decimal('1'), | ||
25 | 'x': Decimal('0'), 'y': Decimal('0') | ||
26 | } | ||
27 | self.rows = Decimal(0) | 18 | self.rows = Decimal(0) |
28 | self.columns = Decimal(0) | 19 | self.columns = Decimal(0) |
29 | 20 | ||
@@ -34,13 +25,13 @@ class KLE2xy(list): | |||
34 | def width(self): | 25 | def width(self): |
35 | """Returns the width of the keyboard plate. | 26 | """Returns the width of the keyboard plate. |
36 | """ | 27 | """ |
37 | return (Decimal(self.columns) * self.key_width) + self.key_width/2 | 28 | return (Decimal(self.columns) * self.key_width) + self.key_width / 2 |
38 | 29 | ||
39 | @property | 30 | @property |
40 | def height(self): | 31 | def height(self): |
41 | """Returns the height of the keyboard plate. | 32 | """Returns the height of the keyboard plate. |
42 | """ | 33 | """ |
43 | return (self.rows * self.key_width) + self.key_width/2 | 34 | return (self.rows * self.key_width) + self.key_width / 2 |
44 | 35 | ||
45 | @property | 36 | @property |
46 | def size(self): | 37 | def size(self): |