From 647492cc825a6e8f9c5b9cbad9dfb2220c6a2a84 Mon Sep 17 00:00:00 2001 From: Lawrence Brooks <84.lbrooks@gmail.com> Date: Fri, 11 Oct 2024 12:19:14 -0400 Subject: [PATCH] fix: Select correct Superkey/Macro in Layout Editor Wrong selection could still occur by the following steps: 1) Select a key that does NOT have a Superkey/Macro 2) Assign a Superkey/Macro 3) Click another key which does NOT have a Superkey/Macro assigned. Error: The Superkey/Macro set on the previous key is still selected. Maybe related to: https://github.com/radix-ui/primitives/issues/3089 Signed-off-by: Lawrence Brooks <84.lbrooks@gmail.com> --- src/renderer/modules/KeysTabs/MacroTab.tsx | 7 ++----- src/renderer/modules/KeysTabs/SuperkeysTab.tsx | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/renderer/modules/KeysTabs/MacroTab.tsx b/src/renderer/modules/KeysTabs/MacroTab.tsx index 2bf1794d..d0b571ba 100644 --- a/src/renderer/modules/KeysTabs/MacroTab.tsx +++ b/src/renderer/modules/KeysTabs/MacroTab.tsx @@ -57,6 +57,7 @@ const MacroTab = (props: MacroTabProps) => { return macrosContainer; }); + const currentlySelectedMacroIndex = macros.length > 0 && props.keyCode.modified === 53852 ? String(props.keyCode.base) : undefined; return (