From 2106c4cefd8f901feb7b8124d90ef688cccad98f Mon Sep 17 00:00:00 2001 From: Gwilym Inzani Date: Tue, 25 Apr 2023 21:30:55 +0100 Subject: [PATCH] Key just works on weird keyboard layouts --- website/src/bindings.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/src/bindings.tsx b/website/src/bindings.tsx index 53bd33ac..027f573a 100644 --- a/website/src/bindings.tsx +++ b/website/src/bindings.tsx @@ -78,7 +78,7 @@ export const BindingsControl: FC<{ }> = ({ bindings, setBindings }) => { const [buttonToChange, setButtonToChange] = useState(null); - const setKey = (key: string, code: string) => { + const setKey = (key: string) => { if (buttonToChange === null) return; const nextBindings = { @@ -87,14 +87,14 @@ export const BindingsControl: FC<{ }; nextBindings.Displayed[buttonToChange] = toHumanName(key).toUpperCase(); - nextBindings.Actual[buttonToChange] = code; + nextBindings.Actual[buttonToChange] = key; setButtonToChange(null); setBindings(nextBindings); }; return ( - setKey(evt.key, evt.code)}> + setKey(evt.key)}> {BindingsOrder.map((x) => ( setButtonToChange(x)}