mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-21 18:52:36 +01:00
Fix #244 - Allow for use global num shortcuts
This commit is contained in:
parent
f56998dba2
commit
61c25e9896
@ -10715,19 +10715,21 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
if (e.Modifiers == (Keys.Control | Keys.Shift) && e.KeyCode == Keys.ShiftKey)
|
||||
return;
|
||||
|
||||
// do not check for shortcuts if text is being entered...
|
||||
|
||||
var fc = FindFocusedControl(this);
|
||||
if (fc != null && (fc is TextBox || fc is ComboBox))
|
||||
if (fc != null && e.Modifiers != Keys.Control && e.Modifiers != (Keys.Control | Keys.Shift) && e.Modifiers != (Keys.Control | Keys.Shift | Keys.Alt))
|
||||
{
|
||||
if (e.Modifiers != Keys.Control && e.Modifiers != (Keys.Control | Keys.Shift) && e.Modifiers != (Keys.Control | Keys.Shift | Keys.Alt))
|
||||
{
|
||||
if (e.KeyCode >= Keys.A && e.KeyCode <= Keys.Z)
|
||||
return;
|
||||
if (e.KeyCode >= Keys.NumPad0 && e.KeyCode <= Keys.NumPad9)
|
||||
return;
|
||||
}
|
||||
// do not check for shortcuts if text is being entered and a textbox is focused
|
||||
if ((fc.Name == textBoxListViewText.Name || fc.Name == textBoxListViewTextAlternate.Name || fc.Name == textBoxSearchWord.Name) && e.KeyCode >= Keys.A && e.KeyCode <= Keys.Z)
|
||||
return;
|
||||
|
||||
// do not check for shortcuts if a number is being entered and a time box is focused
|
||||
if (fc.Parent != null && (fc.Parent.Name == timeUpDownStartTime.Name || fc.Parent.Name == numericUpDownDuration.Name) &&
|
||||
(e.KeyCode >= Keys.NumPad0 && e.KeyCode <= Keys.NumPad9 || e.KeyValue >= 48 && e.KeyValue <= 57))
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
bool inListView = tabControlSubtitle.SelectedIndex == TabControlListView;
|
||||
|
||||
if (e.KeyCode == Keys.Escape && !_cancelWordSpellCheck)
|
||||
|
Loading…
Reference in New Issue
Block a user