From 1d5e0809625753ae0e2b3df893edf95838deed30 Mon Sep 17 00:00:00 2001 From: geovens Date: Sat, 19 Oct 2019 19:33:17 +0800 Subject: [PATCH] fix control and alt being always on for hotkeys; disable ime for hotkey input boxes --- src/Hotkey.cs | 4 ++++ src/HotkeyInputBox.Designer.cs | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/Hotkey.cs b/src/Hotkey.cs index fae9c90..db6d55d 100644 --- a/src/Hotkey.cs +++ b/src/Hotkey.cs @@ -56,6 +56,10 @@ public bool Parse(string para) } else if (para.Length >= 1) { + Control = false; + Alt = false; + Shift = false; + Win = false; Keys key = (Keys)para[para.Length - 1]; if (IsValidKey(key)) { diff --git a/src/HotkeyInputBox.Designer.cs b/src/HotkeyInputBox.Designer.cs index 834bf09..86b2b6c 100644 --- a/src/HotkeyInputBox.Designer.cs +++ b/src/HotkeyInputBox.Designer.cs @@ -29,6 +29,8 @@ protected override void Dispose(bool disposing) private void InitializeComponent() { components = new System.ComponentModel.Container(); + + this.ImeMode = System.Windows.Forms.ImeMode.Disable; } #endregion