mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-25 20:52:44 +01:00
Merge pull request #4789 from OmrSi/KeyCode-patch
Use 'KeyData' instead of 'KeyCode' for Help shortcut
This commit is contained in:
commit
bdba27c820
@ -77,7 +77,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
{
|
{
|
||||||
DialogResult = DialogResult.Cancel;
|
DialogResult = DialogResult.Cancel;
|
||||||
}
|
}
|
||||||
else if (e.KeyCode == UiUtil.HelpKeys)
|
else if (e.KeyData == UiUtil.HelpKeys)
|
||||||
{
|
{
|
||||||
UiUtil.ShowHelp(null);
|
UiUtil.ShowHelp(null);
|
||||||
e.SuppressKeyPress = true;
|
e.SuppressKeyPress = true;
|
||||||
|
@ -438,7 +438,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
{
|
{
|
||||||
DialogResult = DialogResult.Cancel;
|
DialogResult = DialogResult.Cancel;
|
||||||
}
|
}
|
||||||
else if (e.KeyCode == UiUtil.HelpKeys)
|
else if (e.KeyData == UiUtil.HelpKeys)
|
||||||
{
|
{
|
||||||
UiUtil.ShowHelp("#waveform");
|
UiUtil.ShowHelp("#waveform");
|
||||||
e.SuppressKeyPress = true;
|
e.SuppressKeyPress = true;
|
||||||
|
@ -34,7 +34,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
{
|
{
|
||||||
DialogResult = DialogResult.OK;
|
DialogResult = DialogResult.OK;
|
||||||
}
|
}
|
||||||
else if (e.KeyCode == UiUtil.HelpKeys)
|
else if (e.KeyData == UiUtil.HelpKeys)
|
||||||
{
|
{
|
||||||
UiUtil.ShowHelp("#bookmarks");
|
UiUtil.ShowHelp("#bookmarks");
|
||||||
e.SuppressKeyPress = true;
|
e.SuppressKeyPress = true;
|
||||||
|
@ -66,7 +66,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
{
|
{
|
||||||
DialogResult = DialogResult.Cancel;
|
DialogResult = DialogResult.Cancel;
|
||||||
}
|
}
|
||||||
else if (e.KeyCode == UiUtil.HelpKeys)
|
else if (e.KeyData == UiUtil.HelpKeys)
|
||||||
{
|
{
|
||||||
UiUtil.ShowHelp("#bookmarks");
|
UiUtil.ShowHelp("#bookmarks");
|
||||||
e.SuppressKeyPress = true;
|
e.SuppressKeyPress = true;
|
||||||
|
@ -52,7 +52,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
{
|
{
|
||||||
DialogResult = DialogResult.Cancel;
|
DialogResult = DialogResult.Cancel;
|
||||||
}
|
}
|
||||||
else if (e.KeyCode == UiUtil.HelpKeys)
|
else if (e.KeyData == UiUtil.HelpKeys)
|
||||||
{
|
{
|
||||||
UiUtil.ShowHelp("#sync");
|
UiUtil.ShowHelp("#sync");
|
||||||
e.SuppressKeyPress = true;
|
e.SuppressKeyPress = true;
|
||||||
|
@ -4875,7 +4875,7 @@ $DROP=[DROPVALUE]" + Environment.NewLine + Environment.NewLine +
|
|||||||
{
|
{
|
||||||
DialogResult = DialogResult.Cancel;
|
DialogResult = DialogResult.Cancel;
|
||||||
}
|
}
|
||||||
else if (e.KeyCode == UiUtil.HelpKeys)
|
else if (e.KeyData == UiUtil.HelpKeys)
|
||||||
{
|
{
|
||||||
UiUtil.ShowHelp("#export");
|
UiUtil.ShowHelp("#export");
|
||||||
e.SuppressKeyPress = true;
|
e.SuppressKeyPress = true;
|
||||||
|
@ -846,7 +846,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
{
|
{
|
||||||
DialogResult = DialogResult.Cancel;
|
DialogResult = DialogResult.Cancel;
|
||||||
}
|
}
|
||||||
else if (e.KeyCode == UiUtil.HelpKeys)
|
else if (e.KeyData == UiUtil.HelpKeys)
|
||||||
{
|
{
|
||||||
UiUtil.ShowHelp("#fixcommonerrors");
|
UiUtil.ShowHelp("#fixcommonerrors");
|
||||||
}
|
}
|
||||||
|
@ -111,7 +111,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
{
|
{
|
||||||
DialogResult = DialogResult.Cancel;
|
DialogResult = DialogResult.Cancel;
|
||||||
}
|
}
|
||||||
else if (e.KeyCode == UiUtil.HelpKeys)
|
else if (e.KeyData == UiUtil.HelpKeys)
|
||||||
{
|
{
|
||||||
UiUtil.ShowHelp("#spellcheck");
|
UiUtil.ShowHelp("#spellcheck");
|
||||||
e.SuppressKeyPress = true;
|
e.SuppressKeyPress = true;
|
||||||
|
@ -34,7 +34,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
{
|
{
|
||||||
DialogResult = DialogResult.Cancel;
|
DialogResult = DialogResult.Cancel;
|
||||||
}
|
}
|
||||||
else if (e.KeyCode == UiUtil.HelpKeys)
|
else if (e.KeyData == UiUtil.HelpKeys)
|
||||||
{
|
{
|
||||||
UiUtil.ShowHelp("#remove_text_for_hi");
|
UiUtil.ShowHelp("#remove_text_for_hi");
|
||||||
}
|
}
|
||||||
|
@ -188,7 +188,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
{
|
{
|
||||||
buttonCancel_Click(null, null);
|
buttonCancel_Click(null, null);
|
||||||
}
|
}
|
||||||
else if (e.KeyCode == UiUtil.HelpKeys)
|
else if (e.KeyData == UiUtil.HelpKeys)
|
||||||
{
|
{
|
||||||
UiUtil.ShowHelp("#multiple_replace");
|
UiUtil.ShowHelp("#multiple_replace");
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,7 @@ namespace Nikse.SubtitleEdit.Forms.Networking
|
|||||||
{
|
{
|
||||||
DialogResult = DialogResult.Cancel;
|
DialogResult = DialogResult.Cancel;
|
||||||
}
|
}
|
||||||
else if (e.KeyCode == UiUtil.HelpKeys)
|
else if (e.KeyData == UiUtil.HelpKeys)
|
||||||
{
|
{
|
||||||
UiUtil.ShowHelp("#networking");
|
UiUtil.ShowHelp("#networking");
|
||||||
e.SuppressKeyPress = true;
|
e.SuppressKeyPress = true;
|
||||||
|
@ -104,7 +104,7 @@ namespace Nikse.SubtitleEdit.Forms.Networking
|
|||||||
{
|
{
|
||||||
DialogResult = DialogResult.Cancel;
|
DialogResult = DialogResult.Cancel;
|
||||||
}
|
}
|
||||||
else if (e.KeyCode == UiUtil.HelpKeys)
|
else if (e.KeyData == UiUtil.HelpKeys)
|
||||||
{
|
{
|
||||||
UiUtil.ShowHelp("#networking");
|
UiUtil.ShowHelp("#networking");
|
||||||
e.SuppressKeyPress = true;
|
e.SuppressKeyPress = true;
|
||||||
|
@ -233,7 +233,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
|
|||||||
{
|
{
|
||||||
DialogResult = DialogResult.Cancel;
|
DialogResult = DialogResult.Cancel;
|
||||||
}
|
}
|
||||||
else if (e.KeyCode == UiUtil.HelpKeys)
|
else if (e.KeyData == UiUtil.HelpKeys)
|
||||||
{
|
{
|
||||||
UiUtil.ShowHelp("#importvobsub");
|
UiUtil.ShowHelp("#importvobsub");
|
||||||
e.SuppressKeyPress = true;
|
e.SuppressKeyPress = true;
|
||||||
|
@ -212,7 +212,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
|
|||||||
{
|
{
|
||||||
DialogResult = DialogResult.Cancel;
|
DialogResult = DialogResult.Cancel;
|
||||||
}
|
}
|
||||||
else if (e.KeyCode == UiUtil.HelpKeys)
|
else if (e.KeyData == UiUtil.HelpKeys)
|
||||||
{
|
{
|
||||||
UiUtil.ShowHelp("#importvobsub");
|
UiUtil.ShowHelp("#importvobsub");
|
||||||
e.SuppressKeyPress = true;
|
e.SuppressKeyPress = true;
|
||||||
|
@ -6901,7 +6901,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
|
|||||||
|
|
||||||
private void VobSubOcr_KeyDown(object sender, KeyEventArgs e)
|
private void VobSubOcr_KeyDown(object sender, KeyEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.KeyCode == UiUtil.HelpKeys)
|
if (e.KeyData == UiUtil.HelpKeys)
|
||||||
{
|
{
|
||||||
UiUtil.ShowHelp("#importvobsub");
|
UiUtil.ShowHelp("#importvobsub");
|
||||||
e.SuppressKeyPress = true;
|
e.SuppressKeyPress = true;
|
||||||
|
@ -132,7 +132,7 @@ namespace Nikse.SubtitleEdit.Forms.Options
|
|||||||
{
|
{
|
||||||
DialogResult = DialogResult.Cancel;
|
DialogResult = DialogResult.Cancel;
|
||||||
}
|
}
|
||||||
else if (e.KeyCode == UiUtil.HelpKeys)
|
else if (e.KeyData == UiUtil.HelpKeys)
|
||||||
{
|
{
|
||||||
UiUtil.ShowHelp("#translate");
|
UiUtil.ShowHelp("#translate");
|
||||||
e.SuppressKeyPress = true;
|
e.SuppressKeyPress = true;
|
||||||
|
@ -2005,7 +2005,7 @@ namespace Nikse.SubtitleEdit.Forms.Options
|
|||||||
{
|
{
|
||||||
DialogResult = DialogResult.Cancel;
|
DialogResult = DialogResult.Cancel;
|
||||||
}
|
}
|
||||||
else if (e.KeyCode == UiUtil.HelpKeys)
|
else if (e.KeyData == UiUtil.HelpKeys)
|
||||||
{
|
{
|
||||||
UiUtil.ShowHelp("#settings");
|
UiUtil.ShowHelp("#settings");
|
||||||
e.SuppressKeyPress = true;
|
e.SuppressKeyPress = true;
|
||||||
|
@ -392,7 +392,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
{
|
{
|
||||||
DialogResult = DialogResult.Cancel;
|
DialogResult = DialogResult.Cancel;
|
||||||
}
|
}
|
||||||
else if (e.KeyCode == UiUtil.HelpKeys)
|
else if (e.KeyData == UiUtil.HelpKeys)
|
||||||
{
|
{
|
||||||
UiUtil.ShowHelp("#plugins");
|
UiUtil.ShowHelp("#plugins");
|
||||||
e.SuppressKeyPress = true;
|
e.SuppressKeyPress = true;
|
||||||
|
@ -159,7 +159,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
{
|
{
|
||||||
DialogResult = DialogResult.Cancel;
|
DialogResult = DialogResult.Cancel;
|
||||||
}
|
}
|
||||||
else if (e.KeyCode == UiUtil.HelpKeys)
|
else if (e.KeyData == UiUtil.HelpKeys)
|
||||||
{
|
{
|
||||||
UiUtil.ShowHelp("#remove_text_for_hi");
|
UiUtil.ShowHelp("#remove_text_for_hi");
|
||||||
}
|
}
|
||||||
|
@ -258,7 +258,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
GoBackSeconds(-0.1, videoPlayerContainer1.VideoPlayer);
|
GoBackSeconds(-0.1, videoPlayerContainer1.VideoPlayer);
|
||||||
e.SuppressKeyPress = true;
|
e.SuppressKeyPress = true;
|
||||||
}
|
}
|
||||||
else if (e.KeyCode == UiUtil.HelpKeys)
|
else if (e.KeyData == UiUtil.HelpKeys)
|
||||||
{
|
{
|
||||||
UiUtil.ShowHelp("#sync");
|
UiUtil.ShowHelp("#sync");
|
||||||
e.SuppressKeyPress = true;
|
e.SuppressKeyPress = true;
|
||||||
|
@ -54,7 +54,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
{
|
{
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
else if (e.KeyCode == UiUtil.HelpKeys)
|
else if (e.KeyData == UiUtil.HelpKeys)
|
||||||
{
|
{
|
||||||
UiUtil.ShowHelp("#sync");
|
UiUtil.ShowHelp("#sync");
|
||||||
e.SuppressKeyPress = true;
|
e.SuppressKeyPress = true;
|
||||||
|
@ -196,7 +196,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
Action = SpellCheckAction.Abort;
|
Action = SpellCheckAction.Abort;
|
||||||
DialogResult = DialogResult.Cancel;
|
DialogResult = DialogResult.Cancel;
|
||||||
}
|
}
|
||||||
else if (e.KeyCode == UiUtil.HelpKeys)
|
else if (e.KeyData == UiUtil.HelpKeys)
|
||||||
{
|
{
|
||||||
UiUtil.ShowHelp("#spellcheck");
|
UiUtil.ShowHelp("#spellcheck");
|
||||||
e.SuppressKeyPress = true;
|
e.SuppressKeyPress = true;
|
||||||
|
@ -513,7 +513,7 @@ namespace Nikse.SubtitleEdit.Forms.Styles
|
|||||||
|
|
||||||
private void listViewAttachments_KeyDown(object sender, KeyEventArgs e)
|
private void listViewAttachments_KeyDown(object sender, KeyEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.KeyCode == UiUtil.HelpKeys)
|
if (e.KeyData == UiUtil.HelpKeys)
|
||||||
{
|
{
|
||||||
UiUtil.ShowHelp(null);
|
UiUtil.ShowHelp(null);
|
||||||
e.SuppressKeyPress = true;
|
e.SuppressKeyPress = true;
|
||||||
|
@ -258,7 +258,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
{
|
{
|
||||||
DialogResult = DialogResult.Cancel;
|
DialogResult = DialogResult.Cancel;
|
||||||
}
|
}
|
||||||
else if (e.KeyCode == UiUtil.HelpKeys)
|
else if (e.KeyData == UiUtil.HelpKeys)
|
||||||
{
|
{
|
||||||
UiUtil.ShowHelp("#sync");
|
UiUtil.ShowHelp("#sync");
|
||||||
e.SuppressKeyPress = true;
|
e.SuppressKeyPress = true;
|
||||||
|
@ -475,7 +475,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
_breakTranslation = true;
|
_breakTranslation = true;
|
||||||
e.SuppressKeyPress = true;
|
e.SuppressKeyPress = true;
|
||||||
}
|
}
|
||||||
else if (e.KeyCode == UiUtil.HelpKeys)
|
else if (e.KeyData == UiUtil.HelpKeys)
|
||||||
{
|
{
|
||||||
UiUtil.ShowHelp("#translation");
|
UiUtil.ShowHelp("#translation");
|
||||||
}
|
}
|
||||||
|
@ -629,7 +629,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
{
|
{
|
||||||
DialogResult = DialogResult.Cancel;
|
DialogResult = DialogResult.Cancel;
|
||||||
}
|
}
|
||||||
else if (e.KeyCode == UiUtil.HelpKeys)
|
else if (e.KeyData == UiUtil.HelpKeys)
|
||||||
{
|
{
|
||||||
UiUtil.ShowHelp("#visual_sync");
|
UiUtil.ShowHelp("#visual_sync");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user