Skip to content

Commit 361c308

Browse files
committed
Add hotkeys to select current frame and stop seeking.
1 parent 92b0555 commit 361c308

3 files changed

Lines changed: 18 additions & 0 deletions

File tree

src/BizHawk.Client.Common/config/Binding.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ void Bind(string tabGroup, string displayName, string defaultBinding = "", strin
131131
Bind("TAStudio", "Add Branch", "Alt+Insert");
132132
Bind("TAStudio", "Delete Branch", "Alt+Delete");
133133
Bind("TAStudio", "Show Cursor");
134+
Bind("TAStudio", "Select Current Frame");
134135
Bind("TAStudio", "Toggle Follow Cursor", "Shift+F");
135136
Bind("TAStudio", "Toggle Auto-Restore", "Shift+R");
136137
Bind("TAStudio", "Seek To Green Arrow", "R");
@@ -139,6 +140,7 @@ void Bind(string tabGroup, string displayName, string defaultBinding = "", strin
139140
Bind("TAStudio", "Redo", "Ctrl+Y");
140141
Bind("TAStudio", "Seek To Prev Marker", "Shift+PageUp");
141142
Bind("TAStudio", "Seek To Next Marker", "Shift+PageDown");
143+
Bind("TAStudio", "Cancel Seek");
142144
Bind("TAStudio", "Set Marker", "M");
143145
Bind("TAStudio", "Delete Marker", "Ctrl+M");
144146
Bind("TAStudio", "Sel. bet. Markers", "Ctrl+A");

src/BizHawk.Client.EmuHawk/MainForm.Hotkey.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,10 @@ void SelectAndLoadFromSlot(int slot)
387387
Tools.TAStudio.SetVisibleFrame();
388388
Tools.TAStudio.RefreshDialog();
389389
break;
390+
case "Select Current Frame":
391+
if (!Tools.IsLoaded<TAStudio>()) return false;
392+
Tools.TAStudio.SelectCurrentFrame();
393+
break;
390394
case "Toggle Follow Cursor":
391395
if (!Tools.IsLoaded<TAStudio>()) return false;
392396
var playbackBox = Tools.TAStudio.TasPlaybackBox;
@@ -422,6 +426,10 @@ void SelectAndLoadFromSlot(int slot)
422426
if (!Tools.IsLoaded<TAStudio>()) return false;
423427
Tools.TAStudio.GoToNextMarker();
424428
break;
429+
case "Cancel Seek":
430+
if (!Tools.IsLoaded<TAStudio>()) return false;
431+
Tools.TAStudio.StopSeeking();
432+
break;
425433
case "Set Marker":
426434
if (!Tools.IsLoaded<TAStudio>()) return false;
427435
Tools.TAStudio.SetMarker();

src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,14 @@ public void SelectAllExternal()
518518
public void ReselectClipboardExternal()
519519
=> ReselectClipboardMenuItem_Click(null, EventArgs.Empty);
520520

521+
public void SelectCurrentFrame()
522+
{
523+
TasView.DeselectAll();
524+
TasView.SelectRow(Emulator.Frame, true);
525+
526+
RefreshDialog();
527+
}
528+
521529
public IMovieController GetBranchInput(string branchId, int frame)
522530
{
523531
var branch = Guid.TryParseExact(branchId, format: "D", out var parsed)

0 commit comments

Comments
 (0)