diff --git a/BizHawk.MultiClient/tools/HexEditor.cs b/BizHawk.MultiClient/tools/HexEditor.cs index 1f210b60cd..9ce0448be9 100644 --- a/BizHawk.MultiClient/tools/HexEditor.cs +++ b/BizHawk.MultiClient/tools/HexEditor.cs @@ -173,18 +173,7 @@ namespace BizHawk.MultiClient private void goToAddressToolStripMenuItem_Click(object sender, EventArgs e) { - InputPrompt i = new InputPrompt(); - i.Text = "Go to Address"; - i.SetMessage("Enter a hexadecimal value"); - i.ShowDialog(); - - if (i.UserOK) - { - if (InputValidate.IsValidHexNumber(i.UserText)) - { - GoToAddress(int.Parse(i.UserText, NumberStyles.HexNumber)); - } - } + MemoryViewer.GoToSpecifiedAddress(); } public void GoToAddress(int address) diff --git a/BizHawk.MultiClient/tools/MemoryViewer.cs b/BizHawk.MultiClient/tools/MemoryViewer.cs index c228d45c3c..9b27554780 100644 --- a/BizHawk.MultiClient/tools/MemoryViewer.cs +++ b/BizHawk.MultiClient/tools/MemoryViewer.cs @@ -128,6 +128,8 @@ namespace BizHawk.MultiClient { if (!InputValidate.IsValidHexNumber(((char)e.KeyCode).ToString())) { + if (e.Control && e.KeyCode == Keys.G) + GoToSpecifiedAddress(); e.Handled = true; return; } @@ -497,5 +499,23 @@ namespace BizHawk.MultiClient ClearNibbles(); Refresh(); } + + public void GoToSpecifiedAddress() + { + InputPrompt i = new InputPrompt(); + i.Text = "Go to Address"; + i.SetMessage("Enter a hexadecimal value"); + Global.Sound.StopSound(); + i.ShowDialog(); + Global.Sound.StartSound(); + + if (i.UserOK) + { + if (InputValidate.IsValidHexNumber(i.UserText)) + { + GoToAddress(int.Parse(i.UserText, NumberStyles.HexNumber)); + } + } + } } }