Skip to content

Commit

Permalink
Not needed isWindowsOrLinux check
Browse files Browse the repository at this point in the history
  • Loading branch information
Pablo Rodríguez Montalvo committed Sep 13, 2024
1 parent 7c0bc3b commit 9d6b46f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pods/toolbar/shortcut/shortcut.hook.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isMacOS, isWindowsOrLinux } from '@/common/helpers/platform.helpers';
import { isMacOS } from '@/common/helpers/platform.helpers';
import { useEffect } from 'react';

export interface ShortcutHookProps {
Expand All @@ -13,6 +13,7 @@ export const useShortcut = ({ targetKey, callback }: ShortcutHookProps) => {
//const isAltKeyPressed = event.getModifierState('Alt');
//const isCtrlKeyPressed = event.getModifierState('Control');
const isCtrlOrCmdPressed = event.ctrlKey || event.metaKey;

const ctrlKey = isMacOS() ? 'Meta' : 'Ctrl';
const pressedKey = event.key.toLowerCase();

Expand Down

0 comments on commit 9d6b46f

Please sign in to comment.