diff --git a/gui/src/App.tsx b/gui/src/App.tsx index b120f6279..a89748f5f 100644 --- a/gui/src/App.tsx +++ b/gui/src/App.tsx @@ -56,6 +56,8 @@ import { ElectronContextC, provideElectron } from './hooks/electron'; import { AppLocalizationProvider } from './i18n/config'; import { openUrl } from './hooks/crossplatform'; import { UdevRulesModal } from './components/onboarding/UdevRulesModal'; +import { NewKeybindSettings } from './components/settings/pages/newKeybindSettings'; +import { NewKeybindsRow } from './components/commons/newKeybindsRow'; export const GH_REPO = 'SlimeVR/SlimeVR-Server'; export const VersionContext = createContext(''); @@ -141,7 +143,7 @@ function Layout() { } /> } /> } /> - } /> + } /> { - const initialKeys = ['CTRL', 'ALT']; + const initialKeys: string[] = []; setOldKeys(keys); setLocalKeys(initialKeys); onKeysChange(initialKeys); @@ -92,8 +91,8 @@ export const KeybindRecorder = forwardRef< onBlur={handleOnBlur} onKeyDown={handleKeyDown} /> -
-
+
+
{Array.from({ length: maxKeybindLength }).map((_, i) => { const key = displayKeys[i]; const isActive = isRecording && i === activeIndex; @@ -102,8 +101,8 @@ export const KeybindRecorder = forwardRef<
+ {/*
{displayKeys.length < maxKeybindLength && isRecording ? l10n.getString('settings-keybinds_now-recording') : l10n.getString('settings-keybinds_record-keybind')}
+ */}
); diff --git a/gui/src/components/commons/KeybindRow.tsx b/gui/src/components/commons/KeybindRow.tsx index 345cab8e0..bcd1a89a0 100644 --- a/gui/src/components/commons/KeybindRow.tsx +++ b/gui/src/components/commons/KeybindRow.tsx @@ -2,12 +2,14 @@ import { Controller, Control, UseFormResetField } from 'react-hook-form'; import { Button } from './Button'; import { NumberSelector } from './NumberSelector'; import { KeybindRecorder } from './KeybindRecorder'; +import { KeybindRecorderModal } from './KeybindRecorderModal'; import { useLocaleConfig } from '@/i18n/config'; import { Typography } from './Typography'; import './KeybindRow.scss'; export function KeybindRow({ id, + label, control, resetField, name, @@ -44,15 +46,24 @@ export function KeybindRow({ /> )} /> - secondsFormat.format(value)} - min={0} - max={10} - step={0.2} - /> -
+ + secondsFormat.format(value)} + min={0} + max={10} + step={0.2} + /> +