Skip to content

Commit f5c5735

Browse files
committed
Update hotkeys implementation
1 parent 24b31fa commit f5c5735

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/commons/controlBar/ControlBarShareButton.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
import {
2-
NonIdealState,
3-
Popover,
4-
Position,
5-
Spinner,
6-
SpinnerSize,
7-
Tooltip
8-
} from '@blueprintjs/core';
1+
import { NonIdealState, Popover, Position, Spinner, SpinnerSize, Tooltip } from '@blueprintjs/core';
92
import { IconNames } from '@blueprintjs/icons';
3+
import { useHotkeys } from '@mantine/hooks';
104
import React, { useRef, useState } from 'react';
115
import * as CopyToClipboard from 'react-copy-to-clipboard';
126
import { usePlaygroundConfigurationEncoder } from 'src/features/playground/shareLinks/encoder/Encoder';
@@ -67,6 +61,7 @@ export const ControlBarShareButton: React.FC<ControlBarShareButtonProps> = props
6761
.catch(err => showWarningMessage(err.toString()))
6862
.finally(() => setIsLoading(false));
6963
};
64+
useHotkeys([['ctrl+w', generateLink]], []);
7065

7166
const handleCustomStringChange = (event: React.FormEvent<HTMLInputElement>) => {
7267
setCustomStringKeyword(event.currentTarget.value);

0 commit comments

Comments
 (0)