From 4114622d44bf0568c9ce09be90cc1766af0d8f11 Mon Sep 17 00:00:00 2001 From: Robin Townsend Date: Wed, 19 Apr 2023 16:15:38 -0400 Subject: [PATCH] Remove the keyboard shortcut setting --- src/settings/SettingsModal.tsx | 17 ----------------- src/settings/useSetting.ts | 3 --- src/useCallViewKeyboardShortcuts.ts | 7 ------- 3 files changed, 27 deletions(-) diff --git a/src/settings/SettingsModal.tsx b/src/settings/SettingsModal.tsx index 6e38b5f..b126bb8 100644 --- a/src/settings/SettingsModal.tsx +++ b/src/settings/SettingsModal.tsx @@ -28,7 +28,6 @@ import { ReactComponent as OverflowIcon } from "../icons/Overflow.svg"; import { SelectInput } from "../input/SelectInput"; import { useMediaHandler } from "./useMediaHandler"; import { - useKeyboardShortcuts, useSpatialAudio, useShowInspector, useOptInAnalytics, @@ -65,7 +64,6 @@ export const SettingsModal = (props: Props) => { const [optInAnalytics, setOptInAnalytics] = useOptInAnalytics(); const [developerSettingsTab, setDeveloperSettingsTab] = useDeveloperSettingsTab(); - const [keyboardShortcuts, setKeyboardShortcuts] = useKeyboardShortcuts(); const [newGrid, setNewGrid] = useNewGrid(); const downloadDebugLog = useDownloadDebugLog(); @@ -176,21 +174,6 @@ export const SettingsModal = (props: Props) => { } > -

Keyboard

- - ) => - setKeyboardShortcuts(event.target.checked) - } - /> -

Analytics

=> { return [false, null]; }; -export const useKeyboardShortcuts = () => - useSetting("keyboard-shortcuts", true); - export const useNewGrid = () => useSetting("new-grid", false); export const useDeveloperSettingsTab = () => diff --git a/src/useCallViewKeyboardShortcuts.ts b/src/useCallViewKeyboardShortcuts.ts index e25cb04..11ea8f0 100644 --- a/src/useCallViewKeyboardShortcuts.ts +++ b/src/useCallViewKeyboardShortcuts.ts @@ -16,7 +16,6 @@ limitations under the License. import { RefObject, useCallback, useRef } from "react"; -import { getSetting } from "./settings/useSetting"; import { useEventTarget } from "./useEvents"; /** @@ -49,9 +48,6 @@ export function useCallViewKeyboardShortcuts( (event: KeyboardEvent) => { if (focusElement.current === null) return; if (!mayReceiveKeyEvents(focusElement.current)) return; - // Check if keyboard shortcuts are enabled - const keyboardShortcuts = getSetting("keyboard-shortcuts", true); - if (!keyboardShortcuts) return; if (event.key === "m") { toggleMicrophoneMuted(); @@ -78,9 +74,6 @@ export function useCallViewKeyboardShortcuts( (event: KeyboardEvent) => { if (focusElement.current === null) return; if (!mayReceiveKeyEvents(focusElement.current)) return; - // Check if keyboard shortcuts are enabled - const keyboardShortcuts = getSetting("keyboard-shortcuts", true); - if (!keyboardShortcuts) return; if (event.key === " ") { spacebarHeld.current = false;