From 30369cd78c1815a81bfe153c5a2d4551ad90dbe0 Mon Sep 17 00:00:00 2001 From: mehekj Date: Thu, 2 Dec 2021 16:58:00 -0500 Subject: scrub through timeline with arrow keys, minor video fixes --- src/client/views/collections/CollectionStackedTimeline.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/client/views/collections') diff --git a/src/client/views/collections/CollectionStackedTimeline.tsx b/src/client/views/collections/CollectionStackedTimeline.tsx index c5fa126a3..9a8b2940f 100644 --- a/src/client/views/collections/CollectionStackedTimeline.tsx +++ b/src/client/views/collections/CollectionStackedTimeline.tsx @@ -47,6 +47,7 @@ import { Colors } from "../global/globalEnums"; import { DocumentManager } from "../../util/DocumentManager"; import { SnappingManager } from "../../util/SnappingManager"; import { DragManager } from "../../util/DragManager"; +import { faBreadSlice } from "@fortawesome/free-solid-svg-icons"; type PanZoomDocument = makeInterface<[]>; const PanZoomDocument = makeInterface(); @@ -176,6 +177,8 @@ export class CollectionStackedTimeline extends CollectionSubView< !(e.target instanceof HTMLInputElement) && this.props.isSelected(true) ) { + const jump = e.shiftKey ? 1 : 0.1; + e.stopPropagation(); switch (e.key) { case " ": if (!CollectionStackedTimeline.SelectingRegion) { @@ -200,6 +203,13 @@ export class CollectionStackedTimeline extends CollectionSubView< this._trimStart = this.clipStart; this._trimStart = this.clipEnd; this._trimming = TrimScope.None; + break; + case "ArrowLeft": + this.props.setTime(Math.min(Math.max(this.clipStart, this.currentTime - jump), this.clipEnd)); + break; + case "ArrowRight": + this.props.setTime(Math.min(Math.max(this.clipStart, this.currentTime + jump), this.clipEnd)); + break; } } } -- cgit v1.2.3-70-g09d2