diff --git a/src-web/components/EnvironmentEditDialog.tsx b/src-web/components/EnvironmentEditDialog.tsx index 5362d53f..8797b9b2 100644 --- a/src-web/components/EnvironmentEditDialog.tsx +++ b/src-web/components/EnvironmentEditDialog.tsx @@ -98,6 +98,8 @@ export const EnvironmentEditDialog = function ({ initialEnvironment }: Props) { , 'color' | 'onC leftSlot?: ReactNode; rightSlot?: ReactNode; hotkeyAction?: HotkeyAction; + hotkeyPriority?: number; }; export const Button = forwardRef(function Button( @@ -39,6 +40,7 @@ export const Button = forwardRef(function Button rightSlot, disabled, hotkeyAction, + hotkeyPriority, title, onClick, ...props @@ -94,9 +96,13 @@ export const Button = forwardRef(function Button () => buttonRef.current, ); - useHotKey(hotkeyAction ?? null, () => { - buttonRef.current?.click(); - }); + useHotKey( + hotkeyAction ?? null, + () => { + buttonRef.current?.click(); + }, + { priority: hotkeyPriority }, + ); return (