The swiss army knife of lossless video/audio editing
fix dialog shortcut issue
Mikael Finstad96baa9a93197
diff --git a/src/App.tsx b/src/App.tsxindex a47c941d..0daf23b8 100644--- a/src/App.tsx+++ b/src/App.tsx@@ -2148,9 +2148,15 @@ function App() {toggleKeyboardShortcuts,toggleSettings,openSendReportDialog: () => { openSendReportDialogWithState(); },- detectBlackScenes,- detectSilentScenes,- detectSceneChanges,+ detectBlackScenes: ({ keyup }) => {+ if (keyup) detectBlackScenes();+ },+ detectSilentScenes: ({ keyup }) => {+ if (keyup) detectSilentScenes();+ },+ detectSceneChanges: ({ keyup }) => {+ if (keyup) detectSceneChanges();+ },createSegmentsFromKeyframes,toggleWaveformMode,toggleShowThumbnails,diff --git a/src/hooks/useKeyboard.js b/src/hooks/useKeyboard.jsindex a2588373..aaf937f8 100644--- a/src/hooks/useKeyboard.js+++ b/src/hooks/useKeyboard.js@@ -4,7 +4,9 @@ import { useEffect, useRef } from 'react';// Also document.addEventListener needs custom handling of modifier keys or C will be triggered by CTRL+C, etcimport Mousetrap from 'mousetrap';-const keyupActions = new Set(['seekBackwards', 'seekForwards']);+// for all dialog actions (e.g. detectSceneChanges) we must use keyup, or we risk having the button press inserted into the dialog's input element right after the dialog opens+// todo use keyup for most events?+const keyupActions = new Set(['seekBackwards', 'seekForwards', 'detectBlackScenes', 'detectSilentScenes', 'detectSceneChanges']);export default ({ keyBindings, onKeyPress: onKeyPressProp }) => {const onKeyPressRef = useRef();