From d10545e58e4bfce55d790887108d1fb6e0c4f71e Mon Sep 17 00:00:00 2001 From: niksedk Date: Sun, 25 Jul 2021 17:25:31 +0200 Subject: [PATCH] Work on shortcuts - thx OmrSi :) --- src/ui/Forms/Main.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ui/Forms/Main.cs b/src/ui/Forms/Main.cs index eed513691..b065083f5 100644 --- a/src/ui/Forms/Main.cs +++ b/src/ui/Forms/Main.cs @@ -14895,7 +14895,9 @@ namespace Nikse.SubtitleEdit.Forms // do not check for shortcuts if text is being entered and a textbox is focused var textBoxTypes = new List { "AdvancedTextBox", "SimpleTextBox", "SETextBox", "TextBox", "RichTextBox" }; - if (textBoxTypes.Contains(typeName) && !Configuration.Settings.General.AllowLetterShortcutsInTextBox) + if (textBoxTypes.Contains(typeName) && + ((e.KeyCode >= Keys.A && e.KeyCode <= Keys.Z) || (e.KeyCode >= Keys.OemSemicolon && e.KeyCode <= Keys.OemBackslash) || e.KeyCode >= Keys.NumPad0 && e.KeyCode <= Keys.NumPad9 || e.KeyValue >= 48 && e.KeyValue <= 57) && + !Configuration.Settings.General.AllowLetterShortcutsInTextBox) { return; }