diff --git a/src/keyboard/Keymap.tsx b/src/keyboard/Keymap.tsx index 96d60fe..e483f3a 100644 --- a/src/keyboard/Keymap.tsx +++ b/src/keyboard/Keymap.tsx @@ -63,7 +63,7 @@ export const Keymap = ({ y: k.y / 100.0, width: k.width / 100, height: k.height / 100.0, - r: k.r / 100.0, + r: (k.r || 0) / 100.0, rx: (k.rx || 0) / 100.0, ry: (k.ry || 0) / 100.0, children: {label}, diff --git a/src/keyboard/PhysicalLayout.tsx b/src/keyboard/PhysicalLayout.tsx index 0b6facb..54d0282 100644 --- a/src/keyboard/PhysicalLayout.tsx +++ b/src/keyboard/PhysicalLayout.tsx @@ -7,6 +7,9 @@ export type KeyPosition = PropsWithChildren<{ height: number; x: number; y: number; + r?: number; + rx?: number; + ry?: number; }>; interface PhysicalLayoutProps { diff --git a/src/keyboard/PhysicalLayoutPicker.tsx b/src/keyboard/PhysicalLayoutPicker.tsx index 7e2907e..0e87c67 100644 --- a/src/keyboard/PhysicalLayoutPicker.tsx +++ b/src/keyboard/PhysicalLayoutPicker.tsx @@ -66,12 +66,17 @@ export const PhysicalLayoutPicker = ({ ({ - x: x / 100.0, - y: y / 100.0, - width: width / 100.0, - height: height / 100.0, - }))} + positions={l.keys.map( + ({ x, y, width, height, r, rx, ry }) => ({ + x: x / 100.0, + y: y / 100.0, + width: width / 100.0, + height: height / 100.0, + r: (r || 0) / 100.0, + rx: (rx || 0) / 100.0, + ry: (ry || 0) / 100.0, + }) + )} />