Merge pull request #4789 from OmrSi/KeyCode-patch

Use 'KeyData' instead of 'KeyCode' for Help shortcut
This commit is contained in:
Nikolaj Olsson 2021-02-08 21:58:54 +01:00 committed by GitHub
commit bdba27c820
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
26 changed files with 26 additions and 26 deletions

View File

@ -77,7 +77,7 @@ namespace Nikse.SubtitleEdit.Forms
{
DialogResult = DialogResult.Cancel;
}
else if (e.KeyCode == UiUtil.HelpKeys)
else if (e.KeyData == UiUtil.HelpKeys)
{
UiUtil.ShowHelp(null);
e.SuppressKeyPress = true;

View File

@ -438,7 +438,7 @@ namespace Nikse.SubtitleEdit.Forms
{
DialogResult = DialogResult.Cancel;
}
else if (e.KeyCode == UiUtil.HelpKeys)
else if (e.KeyData == UiUtil.HelpKeys)
{
UiUtil.ShowHelp("#waveform");
e.SuppressKeyPress = true;

View File

@ -34,7 +34,7 @@ namespace Nikse.SubtitleEdit.Forms
{
DialogResult = DialogResult.OK;
}
else if (e.KeyCode == UiUtil.HelpKeys)
else if (e.KeyData == UiUtil.HelpKeys)
{
UiUtil.ShowHelp("#bookmarks");
e.SuppressKeyPress = true;

View File

@ -66,7 +66,7 @@ namespace Nikse.SubtitleEdit.Forms
{
DialogResult = DialogResult.Cancel;
}
else if (e.KeyCode == UiUtil.HelpKeys)
else if (e.KeyData == UiUtil.HelpKeys)
{
UiUtil.ShowHelp("#bookmarks");
e.SuppressKeyPress = true;

View File

@ -52,7 +52,7 @@ namespace Nikse.SubtitleEdit.Forms
{
DialogResult = DialogResult.Cancel;
}
else if (e.KeyCode == UiUtil.HelpKeys)
else if (e.KeyData == UiUtil.HelpKeys)
{
UiUtil.ShowHelp("#sync");
e.SuppressKeyPress = true;

View File

@ -4875,7 +4875,7 @@ $DROP=[DROPVALUE]" + Environment.NewLine + Environment.NewLine +
{
DialogResult = DialogResult.Cancel;
}
else if (e.KeyCode == UiUtil.HelpKeys)
else if (e.KeyData == UiUtil.HelpKeys)
{
UiUtil.ShowHelp("#export");
e.SuppressKeyPress = true;

View File

@ -846,7 +846,7 @@ namespace Nikse.SubtitleEdit.Forms
{
DialogResult = DialogResult.Cancel;
}
else if (e.KeyCode == UiUtil.HelpKeys)
else if (e.KeyData == UiUtil.HelpKeys)
{
UiUtil.ShowHelp("#fixcommonerrors");
}

View File

@ -111,7 +111,7 @@ namespace Nikse.SubtitleEdit.Forms
{
DialogResult = DialogResult.Cancel;
}
else if (e.KeyCode == UiUtil.HelpKeys)
else if (e.KeyData == UiUtil.HelpKeys)
{
UiUtil.ShowHelp("#spellcheck");
e.SuppressKeyPress = true;

View File

@ -34,7 +34,7 @@ namespace Nikse.SubtitleEdit.Forms
{
DialogResult = DialogResult.Cancel;
}
else if (e.KeyCode == UiUtil.HelpKeys)
else if (e.KeyData == UiUtil.HelpKeys)
{
UiUtil.ShowHelp("#remove_text_for_hi");
}

View File

@ -188,7 +188,7 @@ namespace Nikse.SubtitleEdit.Forms
{
buttonCancel_Click(null, null);
}
else if (e.KeyCode == UiUtil.HelpKeys)
else if (e.KeyData == UiUtil.HelpKeys)
{
UiUtil.ShowHelp("#multiple_replace");
}

View File

@ -107,7 +107,7 @@ namespace Nikse.SubtitleEdit.Forms.Networking
{
DialogResult = DialogResult.Cancel;
}
else if (e.KeyCode == UiUtil.HelpKeys)
else if (e.KeyData == UiUtil.HelpKeys)
{
UiUtil.ShowHelp("#networking");
e.SuppressKeyPress = true;

View File

@ -104,7 +104,7 @@ namespace Nikse.SubtitleEdit.Forms.Networking
{
DialogResult = DialogResult.Cancel;
}
else if (e.KeyCode == UiUtil.HelpKeys)
else if (e.KeyData == UiUtil.HelpKeys)
{
UiUtil.ShowHelp("#networking");
e.SuppressKeyPress = true;

View File

@ -233,7 +233,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
{
DialogResult = DialogResult.Cancel;
}
else if (e.KeyCode == UiUtil.HelpKeys)
else if (e.KeyData == UiUtil.HelpKeys)
{
UiUtil.ShowHelp("#importvobsub");
e.SuppressKeyPress = true;

View File

@ -212,7 +212,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
{
DialogResult = DialogResult.Cancel;
}
else if (e.KeyCode == UiUtil.HelpKeys)
else if (e.KeyData == UiUtil.HelpKeys)
{
UiUtil.ShowHelp("#importvobsub");
e.SuppressKeyPress = true;

View File

@ -6901,7 +6901,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
private void VobSubOcr_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == UiUtil.HelpKeys)
if (e.KeyData == UiUtil.HelpKeys)
{
UiUtil.ShowHelp("#importvobsub");
e.SuppressKeyPress = true;

View File

@ -132,7 +132,7 @@ namespace Nikse.SubtitleEdit.Forms.Options
{
DialogResult = DialogResult.Cancel;
}
else if (e.KeyCode == UiUtil.HelpKeys)
else if (e.KeyData == UiUtil.HelpKeys)
{
UiUtil.ShowHelp("#translate");
e.SuppressKeyPress = true;

View File

@ -2005,7 +2005,7 @@ namespace Nikse.SubtitleEdit.Forms.Options
{
DialogResult = DialogResult.Cancel;
}
else if (e.KeyCode == UiUtil.HelpKeys)
else if (e.KeyData == UiUtil.HelpKeys)
{
UiUtil.ShowHelp("#settings");
e.SuppressKeyPress = true;

View File

@ -392,7 +392,7 @@ namespace Nikse.SubtitleEdit.Forms
{
DialogResult = DialogResult.Cancel;
}
else if (e.KeyCode == UiUtil.HelpKeys)
else if (e.KeyData == UiUtil.HelpKeys)
{
UiUtil.ShowHelp("#plugins");
e.SuppressKeyPress = true;

View File

@ -159,7 +159,7 @@ namespace Nikse.SubtitleEdit.Forms
{
DialogResult = DialogResult.Cancel;
}
else if (e.KeyCode == UiUtil.HelpKeys)
else if (e.KeyData == UiUtil.HelpKeys)
{
UiUtil.ShowHelp("#remove_text_for_hi");
}

View File

@ -258,7 +258,7 @@ namespace Nikse.SubtitleEdit.Forms
GoBackSeconds(-0.1, videoPlayerContainer1.VideoPlayer);
e.SuppressKeyPress = true;
}
else if (e.KeyCode == UiUtil.HelpKeys)
else if (e.KeyData == UiUtil.HelpKeys)
{
UiUtil.ShowHelp("#sync");
e.SuppressKeyPress = true;

View File

@ -54,7 +54,7 @@ namespace Nikse.SubtitleEdit.Forms
{
Close();
}
else if (e.KeyCode == UiUtil.HelpKeys)
else if (e.KeyData == UiUtil.HelpKeys)
{
UiUtil.ShowHelp("#sync");
e.SuppressKeyPress = true;

View File

@ -196,7 +196,7 @@ namespace Nikse.SubtitleEdit.Forms
Action = SpellCheckAction.Abort;
DialogResult = DialogResult.Cancel;
}
else if (e.KeyCode == UiUtil.HelpKeys)
else if (e.KeyData == UiUtil.HelpKeys)
{
UiUtil.ShowHelp("#spellcheck");
e.SuppressKeyPress = true;

View File

@ -513,7 +513,7 @@ namespace Nikse.SubtitleEdit.Forms.Styles
private void listViewAttachments_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == UiUtil.HelpKeys)
if (e.KeyData == UiUtil.HelpKeys)
{
UiUtil.ShowHelp(null);
e.SuppressKeyPress = true;

View File

@ -258,7 +258,7 @@ namespace Nikse.SubtitleEdit.Forms
{
DialogResult = DialogResult.Cancel;
}
else if (e.KeyCode == UiUtil.HelpKeys)
else if (e.KeyData == UiUtil.HelpKeys)
{
UiUtil.ShowHelp("#sync");
e.SuppressKeyPress = true;

View File

@ -475,7 +475,7 @@ namespace Nikse.SubtitleEdit.Forms
_breakTranslation = true;
e.SuppressKeyPress = true;
}
else if (e.KeyCode == UiUtil.HelpKeys)
else if (e.KeyData == UiUtil.HelpKeys)
{
UiUtil.ShowHelp("#translation");
}

View File

@ -629,7 +629,7 @@ namespace Nikse.SubtitleEdit.Forms
{
DialogResult = DialogResult.Cancel;
}
else if (e.KeyCode == UiUtil.HelpKeys)
else if (e.KeyData == UiUtil.HelpKeys)
{
UiUtil.ShowHelp("#visual_sync");
}