Remove the keyboard shortcut setting
This commit is contained in:
parent
6f13989819
commit
4114622d44
3 changed files with 0 additions and 27 deletions
|
@ -28,7 +28,6 @@ import { ReactComponent as OverflowIcon } from "../icons/Overflow.svg";
|
||||||
import { SelectInput } from "../input/SelectInput";
|
import { SelectInput } from "../input/SelectInput";
|
||||||
import { useMediaHandler } from "./useMediaHandler";
|
import { useMediaHandler } from "./useMediaHandler";
|
||||||
import {
|
import {
|
||||||
useKeyboardShortcuts,
|
|
||||||
useSpatialAudio,
|
useSpatialAudio,
|
||||||
useShowInspector,
|
useShowInspector,
|
||||||
useOptInAnalytics,
|
useOptInAnalytics,
|
||||||
|
@ -65,7 +64,6 @@ export const SettingsModal = (props: Props) => {
|
||||||
const [optInAnalytics, setOptInAnalytics] = useOptInAnalytics();
|
const [optInAnalytics, setOptInAnalytics] = useOptInAnalytics();
|
||||||
const [developerSettingsTab, setDeveloperSettingsTab] =
|
const [developerSettingsTab, setDeveloperSettingsTab] =
|
||||||
useDeveloperSettingsTab();
|
useDeveloperSettingsTab();
|
||||||
const [keyboardShortcuts, setKeyboardShortcuts] = useKeyboardShortcuts();
|
|
||||||
const [newGrid, setNewGrid] = useNewGrid();
|
const [newGrid, setNewGrid] = useNewGrid();
|
||||||
|
|
||||||
const downloadDebugLog = useDownloadDebugLog();
|
const downloadDebugLog = useDownloadDebugLog();
|
||||||
|
@ -176,21 +174,6 @@ export const SettingsModal = (props: Props) => {
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<h4>Keyboard</h4>
|
|
||||||
<FieldRow>
|
|
||||||
<InputField
|
|
||||||
id="keyboardShortcuts"
|
|
||||||
label={t("Single-key keyboard shortcuts")}
|
|
||||||
type="checkbox"
|
|
||||||
checked={keyboardShortcuts}
|
|
||||||
description={t(
|
|
||||||
"Whether to enable single-key keyboard shortcuts, e.g. 'm' to mute/unmute the mic."
|
|
||||||
)}
|
|
||||||
onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
|
|
||||||
setKeyboardShortcuts(event.target.checked)
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</FieldRow>
|
|
||||||
<h4>Analytics</h4>
|
<h4>Analytics</h4>
|
||||||
<FieldRow>
|
<FieldRow>
|
||||||
<InputField
|
<InputField
|
||||||
|
|
|
@ -98,9 +98,6 @@ export const useOptInAnalytics = (): DisableableSetting<boolean | null> => {
|
||||||
return [false, null];
|
return [false, null];
|
||||||
};
|
};
|
||||||
|
|
||||||
export const useKeyboardShortcuts = () =>
|
|
||||||
useSetting("keyboard-shortcuts", true);
|
|
||||||
|
|
||||||
export const useNewGrid = () => useSetting("new-grid", false);
|
export const useNewGrid = () => useSetting("new-grid", false);
|
||||||
|
|
||||||
export const useDeveloperSettingsTab = () =>
|
export const useDeveloperSettingsTab = () =>
|
||||||
|
|
|
@ -16,7 +16,6 @@ limitations under the License.
|
||||||
|
|
||||||
import { RefObject, useCallback, useRef } from "react";
|
import { RefObject, useCallback, useRef } from "react";
|
||||||
|
|
||||||
import { getSetting } from "./settings/useSetting";
|
|
||||||
import { useEventTarget } from "./useEvents";
|
import { useEventTarget } from "./useEvents";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -49,9 +48,6 @@ export function useCallViewKeyboardShortcuts(
|
||||||
(event: KeyboardEvent) => {
|
(event: KeyboardEvent) => {
|
||||||
if (focusElement.current === null) return;
|
if (focusElement.current === null) return;
|
||||||
if (!mayReceiveKeyEvents(focusElement.current)) 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") {
|
if (event.key === "m") {
|
||||||
toggleMicrophoneMuted();
|
toggleMicrophoneMuted();
|
||||||
|
@ -78,9 +74,6 @@ export function useCallViewKeyboardShortcuts(
|
||||||
(event: KeyboardEvent) => {
|
(event: KeyboardEvent) => {
|
||||||
if (focusElement.current === null) return;
|
if (focusElement.current === null) return;
|
||||||
if (!mayReceiveKeyEvents(focusElement.current)) return;
|
if (!mayReceiveKeyEvents(focusElement.current)) return;
|
||||||
// Check if keyboard shortcuts are enabled
|
|
||||||
const keyboardShortcuts = getSetting("keyboard-shortcuts", true);
|
|
||||||
if (!keyboardShortcuts) return;
|
|
||||||
|
|
||||||
if (event.key === " ") {
|
if (event.key === " ") {
|
||||||
spacebarHeld.current = false;
|
spacebarHeld.current = false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue