diff --git a/src/Settings.jsx b/src/Settings.jsx index c5fee78d..37f3f549 100644 --- a/src/Settings.jsx +++ b/src/Settings.jsx @@ -1,6 +1,6 @@ import React, { memo, useCallback, useMemo } from 'react'; import { FaYinYang, FaKeyboard } from 'react-icons/fa'; -import { CleanIcon, CogIcon, Button, Table, NumericalIcon, KeyIcon, FolderCloseIcon, DocumentIcon, TimeIcon, Checkbox, Select } from 'evergreen-ui'; +import { GlobeIcon, CleanIcon, CogIcon, Button, Table, NumericalIcon, KeyIcon, FolderCloseIcon, DocumentIcon, TimeIcon, Checkbox, Select } from 'evergreen-ui'; import { useTranslation } from 'react-i18next'; import CaptureFormatButton from './components/CaptureFormatButton'; @@ -10,7 +10,7 @@ import { askForFfPath } from './dialogs'; import { isMasBuild, isStoreBuild } from './util'; import { langNames } from './util/constants'; -import { keyMap } from './hooks/useTimelineScroll'; +import { modifierKeyNames } from './hooks/useTimelineScroll'; // eslint-disable-next-line react/jsx-props-no-spreading @@ -63,7 +63,7 @@ const Settings = memo(({ return ( <> - App language + App language setMouseWheelZoomModifierKey(e.target.value)}> - {Object.keys(keyMap).map((key) => ( - + {Object.entries(modifierKeyNames).map(([key, value]) => ( + ))} diff --git a/src/hooks/useTimelineScroll.js b/src/hooks/useTimelineScroll.js index 443d55a4..d95e4cc7 100644 --- a/src/hooks/useTimelineScroll.js +++ b/src/hooks/useTimelineScroll.js @@ -1,4 +1,5 @@ import { useCallback } from 'react'; +import { t } from 'i18next'; import normalizeWheel from './normalizeWheel'; @@ -9,6 +10,13 @@ export const keyMap = { meta: 'metaKey', }; +export const modifierKeyNames = { + ctrl: t('Ctrl'), + shift: t('Shift'), + alt: t('Alt'), + meta: t('⌘ Cmd / ⊞ Win'), +}; + function useTimelineScroll({ wheelSensitivity, mouseWheelZoomModifierKey, invertTimelineScroll, zoomRel, seekRel }) { const onWheel = useCallback((e) => { const { pixelX, pixelY } = normalizeWheel(e);