diff --git a/Discord Media Loader/LoginForm.Designer.cs b/Discord Media Loader/LoginForm.Designer.cs index 2aa16fb..fddb86d 100644 --- a/Discord Media Loader/LoginForm.Designer.cs +++ b/Discord Media Loader/LoginForm.Designer.cs @@ -61,6 +61,7 @@ this.tbxEmail.Name = "tbxEmail"; this.tbxEmail.Size = new System.Drawing.Size(204, 20); this.tbxEmail.TabIndex = 2; + this.tbxEmail.KeyUp += new System.Windows.Forms.KeyEventHandler(this.tbx_KeyUp); // // tbxPassword // @@ -69,6 +70,7 @@ this.tbxPassword.PasswordChar = '•'; this.tbxPassword.Size = new System.Drawing.Size(204, 20); this.tbxPassword.TabIndex = 3; + this.tbxPassword.KeyUp += new System.Windows.Forms.KeyEventHandler(this.tbx_KeyUp); // // btnLogin // diff --git a/Discord Media Loader/LoginForm.cs b/Discord Media Loader/LoginForm.cs index 582e364..2bd512e 100644 --- a/Discord Media Loader/LoginForm.cs +++ b/Discord Media Loader/LoginForm.cs @@ -41,5 +41,13 @@ namespace Discord_Media_Loader { DialogResult = DialogResult.OK; } + + private void tbx_KeyUp(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Return) + DialogResult = DialogResult.OK; + else if (e.KeyCode == Keys.Escape) + DialogResult = DialogResult.Abort; + } } }