@ -195,7 +195,7 @@ function App() {
const allUserSettings = useUserSettingsRoot ( ) ;
const {
captureFormat , setCaptureFormat , customOutDir , setCustomOutDir , keyframeCut , setKeyframeCut , preserveMovData , setPreserveMovData , movFastStart , setMovFastStart , avoidNegativeTs , autoMerge , timecodeFormat , invertCutSegments , setInvertCutSegments , autoExportExtraStreams , askBeforeClose , enableAskForImportChapters , enableAskForFileOpenAction , playbackVolume , setPlaybackVolume , autoSaveProjectFile , wheelSensitivity , invertTimelineScroll , language , ffmpegExperimental , hideNotifications , autoLoadTimecode , autoDeleteMergedSegments , exportConfirmEnabled , setExportConfirmEnabled , segmentsToChapters , setSegmentsToChapters , preserveMetadataOnMerge , setPreserveMetadataOnMerge , simpleMode , setSimpleMode , outSegTemplate , setOutSegTemplate , keyboardSeekAccFactor , keyboardNormalSeekSpeed , treatInputFileModifiedTimeAsStart, treatOutputFileModifiedTimeAsStart , outFormatLocked , setOutFormatLocked , safeOutputFileName , setSafeOutputFileName , enableAutoHtml5ify , segmentsToChaptersOnly , keyBindings , setKeyBindings , resetKeyBindings , enableSmartCut , customFfPath , storeProjectInWorkingDir , setStoreProjectInWorkingDir , enableOverwriteOutput , mouseWheelZoomModifierKey , captureFrameMethod , captureFrameQuality , captureFrameFileNameFormat , enableNativeHevc , cleanupChoices , setCleanupChoices , darkMode , setDarkMode , preferStrongColors , outputFileNameMinZeroPadding , cutFromAdjustmentFrames ,
captureFormat , setCaptureFormat , customOutDir , setCustomOutDir , keyframeCut , setKeyframeCut , preserveMovData , setPreserveMovData , movFastStart , setMovFastStart , avoidNegativeTs , autoMerge , timecodeFormat , invertCutSegments , setInvertCutSegments , autoExportExtraStreams , askBeforeClose , enableAskForImportChapters , enableAskForFileOpenAction , playbackVolume , setPlaybackVolume , autoSaveProjectFile , wheelSensitivity , invertTimelineScroll , language , ffmpegExperimental , hideNotifications , autoLoadTimecode , autoDeleteMergedSegments , exportConfirmEnabled , setExportConfirmEnabled , segmentsToChapters , setSegmentsToChapters , preserveMetadataOnMerge , setPreserveMetadataOnMerge , simpleMode , setSimpleMode , outSegTemplate , setOutSegTemplate , keyboardSeekAccFactor , keyboardNormalSeekSpeed , keyboardSeekSpeed2, keyboardSeekSpeed3 , treatInputFileModifiedTimeAsStart, treatOutputFileModifiedTimeAsStart , outFormatLocked , setOutFormatLocked , safeOutputFileName , setSafeOutputFileName , enableAutoHtml5ify , segmentsToChaptersOnly , keyBindings , setKeyBindings , resetKeyBindings , enableSmartCut , customFfPath , storeProjectInWorkingDir , setStoreProjectInWorkingDir , enableOverwriteOutput , mouseWheelZoomModifierKey , captureFrameMethod , captureFrameQuality , captureFrameFileNameFormat , enableNativeHevc , cleanupChoices , setCleanupChoices , darkMode , setDarkMode , preferStrongColors , outputFileNameMinZeroPadding , cutFromAdjustmentFrames ,
} = allUserSettings ;
useEffect ( ( ) = > {
@ -2087,6 +2087,15 @@ function App() {
seekAccelerationRef . current = 1 ;
}
function seekRel2 ( { keyup , amount } : { keyup : boolean | undefined , amount : number } ) {
if ( keyup ) {
seekReset ( ) ;
return ;
}
seekRel ( seekAccelerationRef . current * amount ) ;
seekAccelerationRef . current *= keyboardSeekAccFactor ;
}
const ret : Record < MainKeyboardAction , ( ( a : { keyup ? : boolean | undefined } ) = > boolean ) | ( ( a : { keyup? : boolean | undefined } ) = > void ) > = {
// NOTE: Do not change these keys because users have bound keys by these names in their config files
// For actions, see also KeyboardShortcuts.jsx
@ -2111,22 +2120,12 @@ function App() {
splitCurrentSegment ,
increaseRotation ,
goToTimecode ,
seekBackwards ( { keyup } ) {
if ( keyup ) {
seekReset ( ) ;
return ;
}
seekRel ( keyboardNormalSeekSpeed * seekAccelerationRef . current * - 1 ) ;
seekAccelerationRef . current *= keyboardSeekAccFactor ;
} ,
seekForwards ( { keyup } ) {
if ( keyup ) {
seekReset ( ) ;
return ;
}
seekRel ( keyboardNormalSeekSpeed * seekAccelerationRef . current ) ;
seekAccelerationRef . current *= keyboardSeekAccFactor ;
} ,
seekBackwards : ( { keyup } ) = > seekRel2 ( { keyup , amount : - 1 * keyboardNormalSeekSpeed } ) ,
seekBackwards2 : ( { keyup } ) = > seekRel2 ( { keyup , amount : - 1 * keyboardSeekSpeed2 } ) ,
seekBackwards3 : ( { keyup } ) = > seekRel2 ( { keyup , amount : - 1 * keyboardSeekSpeed3 } ) ,
seekForwards : ( { keyup } ) = > seekRel2 ( { keyup , amount : keyboardNormalSeekSpeed } ) ,
seekForwards2 : ( { keyup } ) = > seekRel2 ( { keyup , amount : keyboardSeekSpeed2 } ) ,
seekForwards3 : ( { keyup } ) = > seekRel2 ( { keyup , amount : keyboardSeekSpeed3 } ) ,
seekBackwardsPercent : ( ) = > { seekRelPercent ( - 0.01 ) ; return false ; } ,
seekForwardsPercent : ( ) = > { seekRelPercent ( 0.01 ) ; return false ; } ,
seekBackwardsKeyframe : ( ) = > seekClosestKeyframe ( - 1 ) ,
@ -2220,7 +2219,7 @@ function App() {
} ;
return ret ;
} , [ addSegment , alignSegmentTimesToKeyframes , apparentCutSegments , askStartTimeOffset , batchFileJump , batchOpenSelectedFile , captureSnapshot , captureSnapshotAsCoverArt , changePlaybackRate , checkFileOpened , cleanupFilesDialog , clearSegments , closeBatch , closeFileWithConfirm , combineOverlappingSegments , combineSelectedSegments , concatBatch , convertFormatBatch , copySegmentsToClipboard , createFixedDurationSegments , createNumSegments , createRandomSegments , createSegmentsFromKeyframes , currentSegIndexSafe , cutSegments . length , cutSegmentsHistory , deselectAllSegments , detectBlackScenes , detectSceneChanges , detectSilentScenes , duplicateCurrentSegment , editCurrentSegmentTags , extractAllStreams , extractCurrentSegmentFramesAsImages , extractSelectedSegmentsFramesAsImages , fillSegmentsGaps , goToTimecode , handleShowStreamsSelectorClick , increaseRotation , invertAllSegments , invertSelectedSegments , jumpCutEnd , jumpCutStart , jumpSeg , jumpTimelineEnd , jumpTimelineStart , keyboardNormalSeekSpeed , keyboardSeekAccFactor , onExportPress, onLabelSegment , openFilesDialog , openSendReportDialogWithState , pause , play , removeCutSegment , removeSelectedSegments , reorderSegsByStartTime , seekClosestKeyframe , seekRel , seekRelPercent , selectAllSegments , selectOnlyCurrentSegment , setCurrentSegIndex , setCutEnd , setCutStart , setPlaybackVolume , shiftAllSegmentTimes , shortStep , showIncludeExternalStreamsDialog , shuffleSegments , splitCurrentSegment , timelineToggleComfortZoom , toggleCaptureFormat , toggleCurrentSegmentSelected , toggleFullscreenVideo , toggleKeyframeCut , toggleLastCommands , toggleLoopSelectedSegments , togglePlay , toggleSegmentsList , toggleSettings , toggleShowKeyframes , toggleShowThumbnails , toggleStreamsSelector , toggleStripAudio , toggleStripThumbnail , toggleWaveformMode , tryFixInvalidDuration , userHtml5ifyCurrentFile , zoomRel ] ) ;
} , [ addSegment , alignSegmentTimesToKeyframes , apparentCutSegments , askStartTimeOffset , batchFileJump , batchOpenSelectedFile , captureSnapshot , captureSnapshotAsCoverArt , changePlaybackRate , checkFileOpened , cleanupFilesDialog , clearSegments , closeBatch , closeFileWithConfirm , combineOverlappingSegments , combineSelectedSegments , concatBatch , convertFormatBatch , copySegmentsToClipboard , createFixedDurationSegments , createNumSegments , createRandomSegments , createSegmentsFromKeyframes , currentSegIndexSafe , cutSegments . length , cutSegmentsHistory , deselectAllSegments , detectBlackScenes , detectSceneChanges , detectSilentScenes , duplicateCurrentSegment , editCurrentSegmentTags , extractAllStreams , extractCurrentSegmentFramesAsImages , extractSelectedSegmentsFramesAsImages , fillSegmentsGaps , goToTimecode , handleShowStreamsSelectorClick , increaseRotation , invertAllSegments , invertSelectedSegments , jumpCutEnd , jumpCutStart , jumpSeg , jumpTimelineEnd , jumpTimelineStart , keyboardNormalSeekSpeed , keyboardSeekAccFactor , keyboardSeekSpeed2, keyboardSeekSpeed3 , onExportPress, onLabelSegment , openFilesDialog , openSendReportDialogWithState , pause , play , removeCutSegment , removeSelectedSegments , reorderSegsByStartTime , seekClosestKeyframe , seekRel , seekRelPercent , selectAllSegments , selectOnlyCurrentSegment , setCurrentSegIndex , setCutEnd , setCutStart , setPlaybackVolume , shiftAllSegmentTimes , shortStep , showIncludeExternalStreamsDialog , shuffleSegments , splitCurrentSegment , timelineToggleComfortZoom , toggleCaptureFormat , toggleCurrentSegmentSelected , toggleFullscreenVideo , toggleKeyframeCut , toggleLastCommands , toggleLoopSelectedSegments , togglePlay , toggleSegmentsList , toggleSettings , toggleShowKeyframes , toggleShowThumbnails , toggleStreamsSelector , toggleStripAudio , toggleStripThumbnail , toggleWaveformMode , tryFixInvalidDuration , userHtml5ifyCurrentFile , zoomRel ] ) ;
const getKeyboardAction = useCallback ( ( action : MainKeyboardAction ) = > mainActions [ action ] , [ mainActions ] ) ;