diff --git a/NHSE.WinForms/Main.Designer.cs b/NHSE.WinForms/Main.Designer.cs index 7131f87..52ed0c1 100644 --- a/NHSE.WinForms/Main.Designer.cs +++ b/NHSE.WinForms/Main.Designer.cs @@ -49,6 +49,7 @@ private void InitializeComponent() this.Controls.Add(this.B_Open); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.Icon = global::NHSE.WinForms.Properties.Resources.icon; + this.KeyPreview = true; this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "Main"; @@ -56,6 +57,7 @@ private void InitializeComponent() this.Text = "NHSE"; this.DragDrop += new System.Windows.Forms.DragEventHandler(this.Main_DragDrop); this.DragEnter += new System.Windows.Forms.DragEventHandler(this.Main_DragEnter); + this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Main_KeyDown); this.ResumeLayout(false); } diff --git a/NHSE.WinForms/Main.cs b/NHSE.WinForms/Main.cs index fbab87d..bb70397 100644 --- a/NHSE.WinForms/Main.cs +++ b/NHSE.WinForms/Main.cs @@ -2,6 +2,7 @@ using System.IO; using System.Windows.Forms; using NHSE.Core; +using NHSE.Injection; using NHSE.WinForms.Properties; namespace NHSE.WinForms @@ -117,5 +118,35 @@ private static void OpenSaveFile(string path) settings.LastFilePath = path; settings.Save(); } + + private void Main_KeyDown(object sender, KeyEventArgs e) + { + if (ModifierKeys != Keys.Control) + return; + + switch (e.KeyCode) + { + case Keys.O: + { + Menu_Open(sender, e); + break; + } + case Keys.I: + { + var items = new Item[40]; + for (int i = 0; i < items.Length; i++) + items[i] = new Item(Item.NONE); + using var editor = new PlayerItemEditor(items, 10, 4, true); + editor.ShowDialog(); + break; + } + case Keys.H: + { + using var editor = new SysBotRAMEdit(InjectionType.Generic); + editor.ShowDialog(); + break; + } + } + } } }