Skip to content

Commit

Permalink
MAT-554, apply show settings to shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesUoM committed Jul 10, 2024
1 parent a3fe54a commit 7a1e08c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/KeyboardControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { ParseKeys } from "i18next";
import React from "react";

import { useTranslation, Trans } from "react-i18next";
import { settings } from "../config";
import { flexGapReplacementStyle } from "../cssStyles";
import { getGroupName, KEYMAP, rewriteKeys } from "../globalKeys";
import { useTheme } from "../themes";
Expand Down Expand Up @@ -130,6 +131,9 @@ const KeyboardControls: React.FC = () => {
const groups: JSX.Element[] = [];
Object.entries(KEYMAP).forEach(([groupName, group], index) => {
const entries: { [groupName: string]: string[][]; } = {};
if (groupName === "subtitleList" && !settings.subtitles.show) {
return;
}
Object.entries(group).forEach(([, action]) => {
const sequences = action.key.split(",").map(item => item.trim());
entries[action.name] = Object.entries(sequences).map(([, sequence]) => {
Expand Down

0 comments on commit 7a1e08c

Please sign in to comment.