File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,11 @@ def _valid_community_layout(layout):
50
50
return (Path ('layouts/default' ) / layout ).exists ()
51
51
52
52
53
+ def _get_key_left_position (key ):
54
+ # Special case for ISO enter
55
+ return key ['x' ] - 0.25 if key .get ('h' , 1 ) == 2 and key .get ('w' , 1 ) == 1.25 else key ['x' ]
56
+
57
+
53
58
def _additional_validation (keyboard , info_data ):
54
59
"""Non schema checks
55
60
"""
@@ -64,7 +69,7 @@ def _additional_validation(keyboard, info_data):
64
69
65
70
# Warn if physical positions are offset (at least one key should be at x=0, and at least one key at y=0)
66
71
for layout_name , layout_data in layouts .items ():
67
- offset_x = min ([k [ 'x' ] for k in layout_data ['layout' ]])
72
+ offset_x = min ([_get_key_left_position ( k ) for k in layout_data ['layout' ]])
68
73
if offset_x > 0 :
69
74
_log_warning (info_data , f'Layout "{ layout_name } " is offset on X axis by { offset_x } ' )
70
75
You can’t perform that action at this time.
0 commit comments