f67d38b35cc5
shortcut_presets.rs
//! Built-in keyboard shortcut tables (command id, keys, panel; "" = application-wide).
//!
//! Key assignments are functional facts about how other editors are operated; these tables map
//! them onto FilmCraft's own command ids. No files from any other application are used.
//! Keys use FilmCraft's canonical notation (`Cmd` = ⌘ on macOS / Ctrl elsewhere, `Ctrl` = the
//! macOS Control key, `Alt` = ⌥ Option / Alt; `Backspace` = the Mac "delete" key, `Delete` = the
//! forward-delete key).
pub type Entry = (&'static str, &'static str, &'static str);
/// FilmCraft additions to the per-command defaults: panel-specific shortcuts.
pub const FILMCRAFT_PANEL: &[Entry] = &[
("project.delete", "Backspace", "Project"),
// the forward-delete key (Delete on Windows and Linux keyboards) clears timeline clips too;
// application-wide it is Project ▸ Clear (#243)
("edit.clear", "Delete", "Timeline"),
("file.newBin", "Cmd+B", "Project"),
("edit.undo", "Left", "History"),
("edit.redo", "Right", "History"),
("sequence.close", "Cmd+W", "Timeline"),
];
/// Premiere Pro's default keyboard (macOS) mapped onto FilmCraft commands. FilmCraft Default takes
/// every entry whose command has no shortcut yet and whose key is free (the shortcut audit);
/// the "Premiere Pro Compatible" preset applies all of them.
pub const PREMIERE: &[Entry] = &[
// Tools
("tool.selection", "V", ""),
("tool.trackSelectBackward", "Shift+A", ""),
("tool.trackSelectForward", "A", ""),
("tool.ripple", "B", ""),
("tool.rolling", "N", ""),
("tool.rateStretch", "R", ""),
("tool.razor", "C", ""),
("tool.slip", "Y", ""),
("tool.slide", "U", ""),
("tool.pen", "P", ""),
("tool.hand", "H", ""),
("tool.zoom", "Z", ""),
("tool.type", "T", ""),
// Multi-camera
("multicam.selectCamera1", "1", ""),
("multicam.selectCamera2", "2", ""),
("multicam.selectCamera3", "3", ""),
("multicam.selectCamera4", "4", ""),
("multicam.selectCamera5", "5", ""),
("multicam.selectCamera6", "6", ""),
("multicam.selectCamera7", "7", ""),
("multicam.selectCamera8", "8", ""),
("multicam.selectCamera9", "9", ""),
("multicam.cutToCamera1", "Ctrl+1", ""),
("multicam.cutToCamera2", "Ctrl+2", ""),
("multicam.cutToCamera3", "Ctrl+3", ""),
("multicam.cutToCamera4", "Ctrl+4", ""),
("multicam.cutToCamera5", "Ctrl+5", ""),
("multicam.cutToCamera6", "Ctrl+6", ""),
("multicam.cutToCamera7", "Ctrl+7", ""),
("multicam.cutToCamera8", "Ctrl+8", ""),
("multicam.cutToCamera9", "Ctrl+9", ""),
("multicam.recordToggle", "0", ""),
("multicam.toggleView", "Shift+0", ""),
// Application
("app.settings.general", "Cmd+,", ""),
("app.keyboardShortcuts", "Cmd+Alt+K", ""),
// File
("file.newProject", "Cmd+Alt+N", ""),
("file.newSequence", "Cmd+N", ""),
("file.newBin", "Cmd+/", ""),
("file.newBin", "Cmd+B", "Project"),
("file.open", "Cmd+O", ""),
("file.save", "Cmd+S", ""),
("file.saveAs", "Cmd+Shift+S", ""),
("file.saveCopy", "Cmd+Alt+S", ""),
("file.import", "Cmd+I", ""),
("mode.export", "Cmd+M", ""),
// Edit
("edit.undo", "Cmd+Z", ""),
("edit.redo", "Cmd+Shift+Z", ""),
("edit.cut", "Cmd+X", ""),
("edit.copy", "Cmd+C", ""),
("edit.paste", "Cmd+V", ""),
("edit.pasteInsert", "Cmd+Shift+V", ""),
("edit.clear", "Delete", ""),
("edit.clear", "Backspace", "Timeline"),
("edit.rippleDelete", "Shift+Delete", ""),
("edit.rippleDelete", "Alt+Backspace", "Timeline"),
("edit.duplicate", "Cmd+Shift+/", ""),
("edit.selectAll", "Cmd+A", ""),
("edit.deselectAll", "Cmd+Shift+A", ""),
// Clip
("clip.speedDuration", "Cmd+R", ""),
("source.insert", ",", ""),
("source.overwrite", ".", ""),
("clip.enable", "Cmd+Shift+E", ""),
("clip.link", "Cmd+L", ""),
("clip.group", "Cmd+G", ""),
("clip.ungroup", "Cmd+Shift+G", ""),
("clip.audioGain", "G", ""),
// Sequence
("sequence.renderEffectsInToOut", "Enter", ""),
("sequence.matchFrame", "F", ""),
("sequence.addEdit", "Cmd+K", ""),
("sequence.addEditAllTracks", "Cmd+Shift+K", ""),
("trim.edit", "Shift+T", ""),
("trim.extendToPlayhead", "E", ""),
("sequence.applyVideoTransition", "Cmd+D", ""),
("sequence.applyAudioTransition", "Cmd+Shift+D", ""),
("trim.applyDefaultTransition", "Shift+D", ""),
("sequence.lift", ";", ""),
("sequence.extract", "'", ""),
("view.zoomIn", "=", ""),
("view.zoomOut", "-", ""),
("sequence.snap", "S", ""),
// Markers
("markers.markIn", "I", ""),
("markers.markOut", "O", ""),
("markers.markClip", "X", ""),
("markers.markSelection", "/", ""),
("markers.goToIn", "Shift+I", ""),
("markers.goToOut", "Shift+O", ""),
("markers.clearIn", "Alt+I", ""),
("markers.clearOut", "Alt+O", ""),
("markers.clearInOut", "Alt+X", ""),
("markers.add", "M", ""),
("markers.goNext", "Shift+M", ""),
("markers.goPrev", "Cmd+Shift+M", ""),
("markers.clearCurrent", "Alt+M", ""),
("markers.clearAll", "Cmd+Alt+M", ""),
("markers.addRange", "Ctrl+Shift+M", ""),
("markers.addRangeInOut", "Ctrl+M", ""),
("sequence.reverseMatchFrame", "Shift+R", ""),
("sequence.goToNextGap", "Shift+;", ""),
("sequence.goToPrevGap", "Alt+;", ""),
("sequence.makeSubsequence", "Shift+U", ""),
// Window
("window.workspace.reset", "Alt+Shift+0", ""),
("window.workspace.editing", "Alt+Shift+1", ""),
("window.workspace.assembly", "Alt+Shift+2", ""),
("window.workspace.color", "Alt+Shift+3", ""),
("window.workspace.effects", "Alt+Shift+4", ""),
("window.workspace.audio", "Alt+Shift+5", ""),
("window.workspace.captionsandgraphics", "Alt+Shift+6", ""),
("window.panel.Project", "Shift+1", ""),
("window.panel.Source", "Shift+2", ""),
("window.panel.Timeline", "Shift+3", ""),
("window.panel.Program", "Shift+4", ""),
("window.panel.EffectControls", "Shift+5", ""),
("window.panel.AudioTrackMixer", "Shift+6", ""),
("window.panel.Effects", "Shift+7", ""),
("window.panel.MediaBrowser", "Shift+8", ""),
("window.panel.AudioClipMixer", "Shift+9", ""),
// Captions
("captions.newTrack", "Cmd+Alt+A", ""),
("captions.add", "Cmd+Alt+C", ""),
("captions.next", "Cmd+Alt+Down", "Timeline"),
("captions.previous", "Cmd+Alt+Up", "Timeline"),
// Navigation and playback
("playhead.nextEdit", "Down", ""),
("playhead.prevEdit", "Up", ""),
("playhead.start", "Home", ""),
("playhead.end", "End", ""),
("playhead.stepBack", "Left", ""),
("playhead.stepBack5", "Shift+Left", ""),
("playhead.stepForward", "Right", ""),
("playhead.stepForward5", "Shift+Right", ""),
("playback.toggle", "Space", ""),
("playback.reverse", "J", ""),
("playback.stop", "K", ""),
("playback.forward", "L", ""),
("playback.slowReverse", "Shift+J", ""),
("playback.slowForward", "Shift+L", ""),
("playback.playAround", "Shift+K", ""),
("playback.inToOut", "Alt+K", ""),
("view.zoomToSequence", "\\", ""),
// Trimming
("trim.ripplePrevious", "Q", ""),
("trim.rippleNext", "W", ""),
("trim.previous", "Alt+Q", ""),
("trim.next", "Alt+W", ""),
("trim.toggleType", "Ctrl+T", ""),
("trim.backward", "Alt+Left", ""),
("trim.backwardMany", "Alt+Shift+Left", ""),
("trim.forward", "Alt+Right", ""),
("trim.forwardMany", "Alt+Shift+Right", ""),
// Keyboard parity (M3.12): commands that only have a key
("file.close", "Cmd+W", ""),
("file.closeProject", "Cmd+Shift+W", ""),
("file.importFromMediaBrowser", "Cmd+Alt+I", ""),
("export.queue.add", "Alt+Shift+M", ""),
("file.mediaProperties", "Cmd+Shift+H", ""),
("edit.pasteAttributes", "Cmd+Alt+V", ""),
("edit.find", "Cmd+F", ""),
("edit.editOriginal", "Cmd+E", ""),
("clip.makeSubclip", "Cmd+U", ""),
("clip.audioChannels", "Shift+G", ""),
("graphics.newText", "Cmd+T", ""),
("graphics.newRectangle", "Cmd+Alt+R", ""),
("graphics.newEllipse", "Cmd+Alt+E", ""),
("graphics.bringToFront", "Cmd+Shift+]", ""),
("graphics.bringForward", "Cmd+]", ""),
("graphics.sendBackward", "Cmd+[", ""),
("graphics.sendToBack", "Cmd+Shift+[", ""),
("graphics.selectNextLayer", "Cmd+Alt+]", ""),
("graphics.selectPreviousLayer", "Cmd+Alt+[", ""),
("graphics.beginTextEditing", "Cmd+Alt+'", ""),
("graphics.alignTextLeft", "Cmd+Shift+L", ""),
("graphics.alignTextCenter", "Cmd+Shift+C", ""),
("graphics.alignTextRight", "Cmd+Shift+R", ""),
("graphics.fontSizeUp", "Cmd+Alt+Right", ""),
("graphics.fontSizeDown", "Cmd+Alt+Left", ""),
("graphics.fontSizeUp5", "Cmd+Alt+Shift+Right", ""),
("graphics.fontSizeDown5", "Cmd+Alt+Shift+Left", ""),
("graphics.leadingUp", "Alt+Up", ""),
("graphics.leadingDown", "Alt+Down", ""),
("graphics.leadingUp5", "Alt+Shift+Up", ""),
("graphics.leadingDown5", "Alt+Shift+Down", ""),
("help.filmcraftHelp", "F1", ""),
("app.quit", "Cmd+Q", ""),
("clip.setPosterFrame", "Cmd+P", ""),
("clip.clearPosterFrame", "Alt+P", ""),
("clip.volumeUp", "]", ""),
("clip.volumeDown", "[", ""),
("clip.volumeUpMany", "Shift+]", ""),
("clip.volumeDownMany", "Shift+[", ""),
("timeline.expandAllTracks", "Shift+=", ""),
("timeline.minimizeAllTracks", "Shift+-", ""),
("file.exportFrame", "Shift+E", ""),
("trim.extendPreviousEdit", "Shift+Q", ""),
("trim.extendNextEdit", "Shift+W", ""),
("playhead.nextEditAnyTrack", "Shift+Down", ""),
("playhead.prevEditAnyTrack", "Shift+Up", ""),
("playhead.selectedClipStart", "Shift+Home", ""),
("playhead.selectedClipEnd", "Shift+End", ""),
("window.maximizeFrame", "Shift+`", ""),
("window.maximizeFrameUnderCursor", "`", ""),
("window.toggleFullScreen", "Ctrl+`", ""),
("window.openSearch", "Cmd+Shift+F", ""),
("panel.selectFindBox", "Shift+F", ""),
("playback.inToOutPreroll", "Shift+Space", ""),
("playback.toOut", "Ctrl+Space", ""),
("sequence.revealNested", "Cmd+Alt+F", ""),
("timeline.selectClipAtPlayhead", "D", ""),
("timeline.selectNextClip", "Cmd+Down", ""),
("timeline.selectPrevClip", "Cmd+Up", ""),
("window.nextPanel", "Ctrl+Shift+.", ""),
("window.prevPanel", "Ctrl+Shift+,", ""),
("timeline.toggleAllAudioTargets", "Cmd+9", ""),
("timeline.toggleAllSourceAudio", "Cmd+Alt+9", ""),
("timeline.toggleAllSourceVideo", "Cmd+Alt+0", ""),
("timeline.toggleAllVideoTargets", "Cmd+0", ""),
("audio.toggleScrubbing", "Shift+S", ""),
("window.workspace.learning", "Alt+Shift+7", ""),
("window.workspace.review", "Alt+Shift+8", ""),
("window.workspace.allpanels", "Alt+Shift+9", ""),
("view.programZoom100", "Cmd+Shift+1", ""),
("view.programZoomFit", "Cmd+Shift+0", ""),
("view.sourceZoom100", "Cmd+Alt+Shift+1", ""),
("view.sourceZoomFit", "Cmd+Alt+Shift+0", ""),
// Panels
("file.newBinFromSelection", "Shift+B", "Project"),
("edit.paste", "Cmd+V", "Timeline"),
("edit.pasteInsert", "Cmd+Shift+V", "Timeline"),
("project.delete", "Backspace", "Project"),
("source.open", "Shift+O", "Project"),
("edit.undo", "Left", "History"),
("edit.redo", "Right", "History"),
("history.deleteRedoable", "Backspace", "History"),
];
/// Premiere's panel-scoped default keys for the keyboard-only commands (M3.12). FilmCraft Default
/// uses them as they are, and they are part of the "Premiere Pro Compatible" preset ([`premiere`]).
pub const PREMIERE_PANEL: &[Entry] = &[
("timeline.nudgeLeft", "Cmd+Left", "Timeline"),
("timeline.nudgeRight", "Cmd+Right", "Timeline"),
("timeline.nudgeLeft5", "Cmd+Shift+Left", "Timeline"),
("timeline.nudgeRight5", "Cmd+Shift+Right", "Timeline"),
("timeline.nudgeUp", "Alt+Up", "Timeline"),
("timeline.nudgeDown", "Alt+Down", "Timeline"),
("timeline.slipLeft", "Cmd+Alt+Left", "Timeline"),
("timeline.slipRight", "Cmd+Alt+Right", "Timeline"),
("timeline.slipLeft5", "Cmd+Alt+Shift+Left", "Timeline"),
("timeline.slipRight5", "Cmd+Alt+Shift+Right", "Timeline"),
("timeline.slideLeft", "Alt+,", "Timeline"),
("timeline.slideRight", "Alt+.", "Timeline"),
("timeline.slideLeft5", "Alt+Shift+,", "Timeline"),
("timeline.slideRight5", "Alt+Shift+.", "Timeline"),
("timeline.increaseVideoHeight", "Cmd+=", "Timeline"),
("timeline.decreaseVideoHeight", "Cmd+-", "Timeline"),
("timeline.increaseAudioHeight", "Alt+=", "Timeline"),
("timeline.decreaseAudioHeight", "Alt+-", "Timeline"),
("timeline.nextScreen", "PageDown", "Timeline"),
("timeline.prevScreen", "PageUp", "Timeline"),
("sequence.setWorkAreaIn", "Alt+[", "Timeline"),
("sequence.setWorkAreaOut", "Alt+]", "Timeline"),
("graphics.nudgeLeft", "Cmd+Left", "Program"),
("graphics.nudgeRight", "Cmd+Right", "Program"),
("graphics.nudgeUp", "Cmd+Up", "Program"),
("graphics.nudgeDown", "Cmd+Down", "Program"),
("graphics.nudgeLeft5", "Cmd+Shift+Left", "Program"),
("graphics.nudgeRight5", "Cmd+Shift+Right", "Program"),
("graphics.nudgeUp5", "Cmd+Shift+Up", "Program"),
("graphics.nudgeDown5", "Cmd+Shift+Down", "Program"),
("graphics.nudgeLeft", "Cmd+Left", "Properties"),
("graphics.nudgeRight", "Cmd+Right", "Properties"),
("graphics.nudgeUp", "Cmd+Up", "Properties"),
("graphics.nudgeDown", "Cmd+Down", "Properties"),
("graphics.nudgeLeft5", "Cmd+Shift+Left", "Properties"),
("graphics.nudgeRight5", "Cmd+Shift+Right", "Properties"),
("graphics.nudgeUp5", "Cmd+Shift+Up", "Properties"),
("graphics.nudgeDown5", "Cmd+Shift+Down", "Properties"),
("edit.clear", "Backspace", "Properties"),
("view.showRulers", "Cmd+R", "Program"),
("view.showGuides", "Cmd+;", "Program"),
("view.snapInProgramMonitor", "Cmd+Shift+;", "Program"),
("view.lockGuides", "Cmd+Alt+Shift+R", "Program"),
("projectPanel.viewList", "Cmd+PageUp", "Project"),
("projectPanel.viewIcon", "Cmd+PageDown", "Project"),
("projectPanel.toggleView", "Shift+\\", "Project"),
("projectPanel.hoverScrub", "Shift+H", "Project"),
("projectPanel.markIn", "I", "Project"),
("projectPanel.markOut", "O", "Project"),
("projectPanel.thumbnailLarger", "Shift+]", "Project"),
("projectPanel.thumbnailLarger", "=", "Project"),
("projectPanel.thumbnailSmaller", "Shift+[", "Project"),
("projectPanel.thumbnailSmaller", "-", "Project"),
("projectPanel.moveUp", "Up", "Project"),
("projectPanel.moveDown", "Down", "Project"),
("projectPanel.moveLeft", "Left", "Project"),
("projectPanel.moveRight", "Right", "Project"),
("projectPanel.moveHome", "Home", "Project"),
("projectPanel.moveEnd", "End", "Project"),
("projectPanel.movePageUp", "PageUp", "Project"),
("projectPanel.movePageDown", "PageDown", "Project"),
("projectPanel.extendUp", "Shift+Up", "Project"),
("projectPanel.extendDown", "Shift+Down", "Project"),
("projectPanel.extendLeft", "Shift+Left", "Project"),
("projectPanel.extendRight", "Shift+Right", "Project"),
("textPanel.prevWord", "Left", "Text"),
("textPanel.nextWord", "Right", "Text"),
("textPanel.selectPrevWord", "Shift+Left", "Text"),
("textPanel.selectNextWord", "Shift+Right", "Text"),
("textPanel.prevLine", "Up", "Text"),
("textPanel.nextLine", "Down", "Text"),
("textPanel.selectPrevLine", "Shift+Up", "Text"),
("textPanel.selectNextLine", "Shift+Down", "Text"),
("textPanel.segmentStart", "Home", "Text"),
("textPanel.segmentEnd", "End", "Text"),
("textPanel.selectToSegmentStart", "Shift+Home", "Text"),
("textPanel.selectToSegmentEnd", "Cmd+Shift+Down", "Text"),
("textPanel.delete", "Alt+Backspace", "Text"),
("textPanel.rippleDelete", "Backspace", "Text"),
("textPanel.showProgramTranscript", "Shift+X", "Text"),
("captions.merge", "Alt+M", "Text"),
("captions.split", "Alt+S", "Text"),
("playback.loop", "Cmd+L", "Audio Track Mixer"),
("mixer.showHideTracks", "Cmd+Alt+T", "Audio Track Mixer"),
("mixer.meterInputOnly", "Ctrl+Shift+I", "Audio Track Mixer"),
("playback.toggle", "Space", "Metadata"),
("playback.loop", "Cmd+L", "Metadata"),
("mediaBrowser.openInSource", "Shift+O", "Media Browser"),
];
/// The whole "Premiere Pro Compatible" table: [`PREMIERE`] plus [`PREMIERE_PANEL`].
pub fn premiere() -> Vec<Entry> {
PREMIERE.iter().chain(PREMIERE_PANEL).copied().collect()
}
/// Final Cut Pro's default keys for the equivalent FilmCraft commands.
pub const FINAL_CUT: &[Entry] = &[
("tool.selection", "A", ""),
("tool.razor", "B", ""),
("tool.ripple", "T", ""),
("tool.zoom", "Z", ""),
("tool.hand", "H", ""),
("source.insert", "W", ""),
("source.overwrite", "D", ""),
("sequence.addEdit", "Cmd+B", ""),
("sequence.addEditAllTracks", "Cmd+Shift+B", ""),
("edit.rippleDelete", "Backspace", ""),
("sequence.lift", "Shift+Backspace", ""),
("markers.markIn", "I", ""),
("markers.markOut", "O", ""),
("markers.markClip", "X", ""),
("markers.clearInOut", "Alt+X", ""),
("markers.add", "M", ""),
("markers.goNext", "Ctrl+'", ""),
("markers.goPrev", "Ctrl+;", ""),
("playhead.nextEdit", "Down", ""),
("playhead.prevEdit", "Up", ""),
("playhead.stepForward5", "Shift+Right", ""),
("playhead.stepBack5", "Shift+Left", ""),
("playback.toggle", "Space", ""),
("playback.reverse", "J", ""),
("playback.stop", "K", ""),
("playback.forward", "L", ""),
("playback.loop", "Cmd+L", ""),
("playback.inToOut", "/", ""),
("sequence.snap", "N", ""),
("view.zoomIn", "Cmd+=", ""),
("view.zoomOut", "Cmd+-", ""),
("view.zoomToSequence", "Shift+Z", ""),
("sequence.applyVideoTransition", "Cmd+T", ""),
("clip.speedDuration", "Cmd+R", ""),
("clip.enable", "V", ""),
("clip.nest", "Alt+G", ""),
("sequence.matchFrame", "Shift+F", ""),
("trim.extendToPlayhead", "Shift+X", ""),
("trim.backward", ",", ""),
("trim.forward", ".", ""),
("trim.backwardMany", "Shift+,", ""),
("trim.forwardMany", "Shift+.", ""),
("file.newBin", "Alt+N", ""),
("mode.export", "Cmd+E", ""),
("sequence.renderEffectsInToOut", "Ctrl+R", ""),
("sequence.renderInToOut", "Ctrl+Shift+R", ""),
];
/// Avid Media Composer's default keys for the equivalent FilmCraft commands.
pub const AVID: &[Entry] = &[
("playback.reverse", "J", ""),
("playback.stop", "K", ""),
("playback.forward", "L", ""),
("playback.toggle", "Space", ""),
("markers.markIn", "I", ""),
("markers.markIn", "E", ""),
("markers.markOut", "O", ""),
("markers.markOut", "R", ""),
("markers.markClip", "T", ""),
("markers.clearIn", "D", ""),
("markers.clearOut", "F", ""),
("markers.clearInOut", "G", ""),
("markers.goToIn", "Q", ""),
("markers.goToOut", "W", ""),
("source.insert", "V", ""),
("source.overwrite", "B", ""),
("sequence.lift", "Z", ""),
("sequence.extract", "X", ""),
("sequence.addEdit", "H", ""),
("playhead.stepBack5", "1", ""),
("playhead.stepForward5", "2", ""),
("playhead.stepBack", "3", ""),
("playhead.stepForward", "4", ""),
("playhead.prevEdit", "A", ""),
("playhead.nextEdit", "S", ""),
("trim.edit", "U", ""),
("trim.backwardMany", "M", ""),
("trim.backward", ",", ""),
("trim.forward", ".", ""),
("trim.forwardMany", "/", ""),
("view.zoomIn", "Cmd+]", ""),
("view.zoomOut", "Cmd+[", ""),
("markers.add", "F5", ""),
];
No file is open. Choose one in the tree, or press Ctrl+O (⌘O on a Mac) to find one by name.
Syntax highlighting could not load. The unmodified read-only text remains available above.