mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 11:12:36 +01:00
Create/adjust/translate shorcuts now global - thx OmrSi :)
Related to #3263
This commit is contained in:
parent
66ed1094b8
commit
ad5e0dc971
@ -1931,7 +1931,7 @@ can edit in same subtitle file (collaboration)</Information>
|
||||
<AdjustSetEndAndOffsetTheRestAndGoToNext>Set end, offset the rest and go to next</AdjustSetEndAndOffsetTheRestAndGoToNext>
|
||||
<AdjustExtendCurrentSubtitle>Extend current line to next subtitle or max duration</AdjustExtendCurrentSubtitle>
|
||||
<RecalculateDurationOfCurrentSubtitle>Re-calculate duration of current subtitle</RecalculateDurationOfCurrentSubtitle>
|
||||
<MainCreateStartDownEndUp>Create new at key-down, set end time at key-up</MainCreateStartDownEndUp>
|
||||
<MainCreateStartDownEndUp>Insert new subtitle at key-down, set end time at key-up</MainCreateStartDownEndUp>
|
||||
<MergeDialog>Merge dialog (insert dashes)</MergeDialog>
|
||||
<GoToNext>Go to next line</GoToNext>
|
||||
<GoToPrevious>Go to previous line</GoToPrevious>
|
||||
|
@ -2224,7 +2224,7 @@ can edit in same subtitle file (collaboration)",
|
||||
AdjustSetEndAndOffsetTheRestAndGoToNext = "Set end, offset the rest and go to next",
|
||||
AdjustExtendCurrentSubtitle = "Extend current line to next subtitle or max duration",
|
||||
RecalculateDurationOfCurrentSubtitle = "Re-calculate duration of current subtitle",
|
||||
MainCreateStartDownEndUp = "Create new at key-down, set end time at key-up",
|
||||
MainCreateStartDownEndUp = "Insert new subtitle at key-down, set end time at key-up",
|
||||
MergeDialog = "Merge dialog (insert dashes)",
|
||||
GoToNext = "Go to next line",
|
||||
GoToPrevious = "Go to previous line",
|
||||
|
@ -1138,9 +1138,7 @@ $HorzAlign = Center
|
||||
public string MainAdjustSetStartAutoDurationAndGoToNext { get; set; }
|
||||
public string MainAdjustSetEndNextStartAndGoToNext { get; set; }
|
||||
public string MainAdjustStartDownEndUpAndGoToNext { get; set; }
|
||||
public string MainAdjustSetStart { get; set; }
|
||||
public string MainAdjustSetStartKeepDuration { get; set; }
|
||||
public string MainAdjustSetEnd { get; set; }
|
||||
public string MainAdjustSelected100MsForward { get; set; }
|
||||
public string MainAdjustSelected100MsBack { get; set; }
|
||||
public string MainAdjustStartXMsBack { get; set; }
|
||||
@ -1253,9 +1251,7 @@ $HorzAlign = Center
|
||||
MainAdjustSetStartAutoDurationAndGoToNext = string.Empty;
|
||||
MainAdjustSetEndNextStartAndGoToNext = string.Empty;
|
||||
MainAdjustStartDownEndUpAndGoToNext = string.Empty;
|
||||
MainAdjustSetStart = string.Empty;
|
||||
MainAdjustSetStartKeepDuration = string.Empty;
|
||||
MainAdjustSetEnd = string.Empty;
|
||||
MainAdjustSelected100MsForward = string.Empty;
|
||||
MainAdjustSelected100MsBack = string.Empty;
|
||||
MainInsertAfter = "Alt+Insert";
|
||||
@ -3366,15 +3362,9 @@ $HorzAlign = Center
|
||||
subNode = node.SelectSingleNode("MainAdjustStartDownEndUpAndGoToNext");
|
||||
if (subNode != null)
|
||||
settings.Shortcuts.MainAdjustStartDownEndUpAndGoToNext = subNode.InnerText;
|
||||
subNode = node.SelectSingleNode("MainAdjustSetStart");
|
||||
if (subNode != null)
|
||||
settings.Shortcuts.MainAdjustSetStart = subNode.InnerText;
|
||||
subNode = node.SelectSingleNode("MainAdjustSetStartKeepDuration");
|
||||
if (subNode != null)
|
||||
settings.Shortcuts.MainAdjustSetStartKeepDuration = subNode.InnerText;
|
||||
subNode = node.SelectSingleNode("MainAdjustSetEnd");
|
||||
if (subNode != null)
|
||||
settings.Shortcuts.MainAdjustSetEnd = subNode.InnerText;
|
||||
subNode = node.SelectSingleNode("MainAdjustSelected100MsForward");
|
||||
if (subNode != null)
|
||||
settings.Shortcuts.MainAdjustSelected100MsForward = subNode.InnerText;
|
||||
@ -4238,9 +4228,7 @@ $HorzAlign = Center
|
||||
textWriter.WriteElementString("MainAdjustSetStartAutoDurationAndGoToNext", settings.Shortcuts.MainAdjustSetStartAutoDurationAndGoToNext);
|
||||
textWriter.WriteElementString("MainAdjustSetEndNextStartAndGoToNext", settings.Shortcuts.MainAdjustSetEndNextStartAndGoToNext);
|
||||
textWriter.WriteElementString("MainAdjustStartDownEndUpAndGoToNext", settings.Shortcuts.MainAdjustStartDownEndUpAndGoToNext);
|
||||
textWriter.WriteElementString("MainAdjustSetStart", settings.Shortcuts.MainAdjustSetStart);
|
||||
textWriter.WriteElementString("MainAdjustSetStartKeepDuration", settings.Shortcuts.MainAdjustSetStartKeepDuration);
|
||||
textWriter.WriteElementString("MainAdjustSetEnd", settings.Shortcuts.MainAdjustSetEnd);
|
||||
textWriter.WriteElementString("MainAdjustSelected100MsForward", settings.Shortcuts.MainAdjustSelected100MsForward);
|
||||
textWriter.WriteElementString("MainAdjustSelected100MsBack", settings.Shortcuts.MainAdjustSelected100MsBack);
|
||||
textWriter.WriteElementString("MainAdjustStartXMsBack", settings.Shortcuts.MainAdjustStartXMsBack);
|
||||
|
@ -206,9 +206,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
private Keys _mainAdjustSetStartAutoDurationAndGoToNext = Keys.None;
|
||||
private Keys _mainAdjustSetEndNextStartAndGoToNext = Keys.None;
|
||||
private Keys _mainAdjustStartDownEndUpAndGoToNext = Keys.None;
|
||||
private Keys _mainAdjustSetStart = Keys.None;
|
||||
private Keys _mainAdjustSetStartKeepDuration = Keys.None;
|
||||
private Keys _mainAdjustSetEnd = Keys.None;
|
||||
private Keys _mainAdjustSelected100MsForward = Keys.None;
|
||||
private Keys _mainAdjustSelected100MsBack = Keys.None;
|
||||
private Keys _mainAdjustAdjustStartXMsBack = Keys.None;
|
||||
@ -13315,241 +13313,220 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
|
||||
// TABS - MUST BE LAST
|
||||
else if (tabControlButtons.SelectedTab == tabPageAdjust || tabControlButtons.SelectedTab == tabPageCreate)
|
||||
|
||||
//TABS: Create / adjust / translate
|
||||
|
||||
// create
|
||||
else if (tabControlButtons.SelectedTab == tabPageCreate && e.Modifiers == Keys.Control && e.KeyCode == Keys.F9)
|
||||
{
|
||||
// create
|
||||
if (tabControlButtons.SelectedTab == tabPageCreate && e.Modifiers == Keys.Control && e.KeyCode == Keys.F9)
|
||||
{
|
||||
InsertNewTextAtVideoPosition();
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (tabControlButtons.SelectedTab == tabPageCreate && ((e.Modifiers == Keys.Shift && e.KeyCode == Keys.F9) || _mainCreateInsertSubAtVideoPos == e.KeyData))
|
||||
{
|
||||
var p = InsertNewTextAtVideoPosition();
|
||||
p.Text = string.Empty;
|
||||
SubtitleListview1.SetText(_subtitle.GetIndex(p), p.Text);
|
||||
textBoxListViewText.Text = p.Text;
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (tabControlButtons.SelectedTab == tabPageCreate && e.Modifiers == Keys.Alt && e.KeyCode == Keys.F9)
|
||||
{
|
||||
StopAutoDuration();
|
||||
ButtonSetEndClick(null, null);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (tabControlButtons.SelectedTab == tabPageCreate && e.Modifiers == Keys.None && e.KeyCode == Keys.F9)
|
||||
{
|
||||
ButtonInsertNewTextClick(null, null);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (tabControlButtons.SelectedTab == tabPageCreate && e.Modifiers == Keys.None && e.KeyCode == Keys.F10)
|
||||
{
|
||||
buttonBeforeText_Click(null, null);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (tabControlButtons.SelectedTab == tabPageCreate && ((e.Modifiers == Keys.None && e.KeyCode == Keys.F11) || _mainCreateSetStart == e.KeyData))
|
||||
{
|
||||
buttonSetStartTime_Click(null, null);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (tabControlButtons.SelectedTab == tabPageCreate && ((e.Modifiers == Keys.None && e.KeyCode == Keys.F12) || _mainCreateSetEnd == e.KeyData))
|
||||
{
|
||||
StopAutoDuration();
|
||||
ButtonSetEndClick(null, null);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (_mainCreateSetEndAddNewAndGoToNew == e.KeyData)
|
||||
{
|
||||
StopAutoDuration();
|
||||
e.SuppressKeyPress = true;
|
||||
InsertNewTextAtVideoPosition();
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (tabControlButtons.SelectedTab == tabPageCreate && (e.Modifiers == Keys.Shift && e.KeyCode == Keys.F9) || _mainCreateInsertSubAtVideoPos == e.KeyData)
|
||||
{
|
||||
var p = InsertNewTextAtVideoPosition();
|
||||
p.Text = string.Empty;
|
||||
SubtitleListview1.SetText(_subtitle.GetIndex(p), p.Text);
|
||||
textBoxListViewText.Text = p.Text;
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (tabControlButtons.SelectedTab == tabPageCreate && e.Modifiers == Keys.Alt && e.KeyCode == Keys.F9)
|
||||
{
|
||||
StopAutoDuration();
|
||||
ButtonSetEndClick(null, null);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (tabControlButtons.SelectedTab == tabPageCreate && e.Modifiers == Keys.None && e.KeyCode == Keys.F9)
|
||||
{
|
||||
ButtonInsertNewTextClick(null, null);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (tabControlButtons.SelectedTab == tabPageCreate && e.Modifiers == Keys.None && e.KeyCode == Keys.F10)
|
||||
{
|
||||
buttonBeforeText_Click(null, null);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (e.Modifiers == Keys.None && e.KeyCode == Keys.F11 || _mainCreateSetStart == e.KeyData)
|
||||
{
|
||||
buttonSetStartTime_Click(null, null);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (e.Modifiers == Keys.None && e.KeyCode == Keys.F12 || _mainCreateSetEnd == e.KeyData)
|
||||
{
|
||||
StopAutoDuration();
|
||||
ButtonSetEndClick(null, null);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (_mainCreateSetEndAddNewAndGoToNew == e.KeyData)
|
||||
{
|
||||
StopAutoDuration();
|
||||
e.SuppressKeyPress = true;
|
||||
|
||||
if (SubtitleListview1.SelectedItems.Count == 1)
|
||||
if (SubtitleListview1.SelectedItems.Count == 1)
|
||||
{
|
||||
double videoPosition = mediaPlayer.CurrentPosition;
|
||||
if (!mediaPlayer.IsPaused)
|
||||
videoPosition -= Configuration.Settings.General.SetStartEndHumanDelay / TimeCode.BaseUnit;
|
||||
int index = SubtitleListview1.SelectedItems[0].Index;
|
||||
MakeHistoryForUndoOnlyIfNotResent(string.Format(_language.VideoControls.BeforeChangingTimeInWaveformX, "#" + _subtitle.Paragraphs[index].Number + " " + _subtitle.Paragraphs[index].Text));
|
||||
|
||||
var p = _subtitle.Paragraphs[index];
|
||||
p.EndTime = TimeCode.FromSeconds(videoPosition);
|
||||
if (p.Duration.TotalMilliseconds - Configuration.Settings.General.MinimumMillisecondsBetweenLines > Configuration.Settings.General.SubtitleMinimumDisplayMilliseconds)
|
||||
{
|
||||
double videoPosition = mediaPlayer.CurrentPosition;
|
||||
if (!mediaPlayer.IsPaused)
|
||||
videoPosition -= Configuration.Settings.General.SetStartEndHumanDelay / TimeCode.BaseUnit;
|
||||
int index = SubtitleListview1.SelectedItems[0].Index;
|
||||
MakeHistoryForUndoOnlyIfNotResent(string.Format(_language.VideoControls.BeforeChangingTimeInWaveformX, "#" + _subtitle.Paragraphs[index].Number + " " + _subtitle.Paragraphs[index].Text));
|
||||
|
||||
var p = _subtitle.Paragraphs[index];
|
||||
p.EndTime = TimeCode.FromSeconds(videoPosition);
|
||||
if (p.Duration.TotalMilliseconds - Configuration.Settings.General.MinimumMillisecondsBetweenLines > Configuration.Settings.General.SubtitleMinimumDisplayMilliseconds)
|
||||
var newEndTime = new TimeCode(p.EndTime.TotalMilliseconds - Configuration.Settings.General.MinimumMillisecondsBetweenLines);
|
||||
double charactersPerSecond = Utilities.GetCharactersPerSecond(new Paragraph(p) { EndTime = newEndTime });
|
||||
if (charactersPerSecond <= Configuration.Settings.General.SubtitleMaximumCharactersPerSeconds)
|
||||
{
|
||||
var newEndTime = new TimeCode(p.EndTime.TotalMilliseconds - Configuration.Settings.General.MinimumMillisecondsBetweenLines);
|
||||
double charactersPerSecond = Utilities.GetCharactersPerSecond(new Paragraph(p) { EndTime = newEndTime });
|
||||
if (charactersPerSecond <= Configuration.Settings.General.SubtitleMaximumCharactersPerSeconds)
|
||||
{
|
||||
p.EndTime = newEndTime;
|
||||
}
|
||||
p.EndTime = newEndTime;
|
||||
}
|
||||
SubtitleListview1.SetStartTimeAndDuration(index, _subtitle.Paragraphs[index], _subtitle.GetParagraphOrDefault(index + 1), _subtitle.GetParagraphOrDefault(index - 1));
|
||||
SetDurationInSeconds(_subtitle.Paragraphs[index].Duration.TotalSeconds);
|
||||
ButtonInsertNewTextClick(null, null);
|
||||
}
|
||||
}
|
||||
else if (_mainCreateStartDownEndUp == e.KeyData)
|
||||
{
|
||||
if (_mainCreateStartDownEndUpParagraph == null)
|
||||
_mainCreateStartDownEndUpParagraph = InsertNewTextAtVideoPosition();
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (_mainAdjustSelected100MsForward == e.KeyData)
|
||||
{
|
||||
ShowEarlierOrLater(100, SelectionChoice.SelectionOnly);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (_mainAdjustSelected100MsBack == e.KeyData)
|
||||
{
|
||||
ShowEarlierOrLater(-100, SelectionChoice.SelectionOnly);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
|
||||
|
||||
// adjust
|
||||
else if (_mainAdjustSelected100MsForward == e.KeyData)
|
||||
{
|
||||
ShowEarlierOrLater(100, SelectionChoice.SelectionOnly);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (_mainAdjustSelected100MsBack == e.KeyData)
|
||||
{
|
||||
ShowEarlierOrLater(-100, SelectionChoice.SelectionOnly);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (_mainAdjustAdjustStartXMsBack == e.KeyData)
|
||||
{
|
||||
MoveStartCurrent(-Configuration.Settings.Tools.MoveStartEndMs);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (_mainAdjustAdjustStartXMsForward == e.KeyData)
|
||||
{
|
||||
MoveStartCurrent(Configuration.Settings.Tools.MoveStartEndMs);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (_mainAdjustAdjustEndXMsBack == e.KeyData)
|
||||
{
|
||||
MoveEndCurrent(-Configuration.Settings.Tools.MoveStartEndMs);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (_mainAdjustAdjustEndXMsForward == e.KeyData)
|
||||
{
|
||||
MoveEndCurrent(Configuration.Settings.Tools.MoveStartEndMs);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (mediaPlayer.VideoPlayer != null)
|
||||
{
|
||||
if (_mainAdjustSetStartAndOffsetTheRest == e.KeyData)
|
||||
{
|
||||
ButtonSetStartAndOffsetRestClick(null, null);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (_mainAdjustSetEndAndOffsetTheRest == e.KeyData)
|
||||
{
|
||||
SetEndAndOffsetTheRest(false);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (_mainAdjustSetEndAndOffsetTheRestAndGoToNext == e.KeyData)
|
||||
{
|
||||
SetEndAndOffsetTheRest(true);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (_mainAdjustSetEndAndGotoNext == e.KeyData)
|
||||
{
|
||||
ShowNextSubtitleLabel();
|
||||
ButtonSetEndAndGoToNextClick(null, null);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (tabControlButtons.SelectedTab == tabPageAdjust && e.Modifiers == Keys.None && e.KeyCode == Keys.F9)
|
||||
{
|
||||
ButtonSetStartAndOffsetRestClick(null, null);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (tabControlButtons.SelectedTab == tabPageAdjust && e.Modifiers == Keys.None && e.KeyCode == Keys.F10)
|
||||
{
|
||||
ShowNextSubtitleLabel();
|
||||
ButtonSetEndAndGoToNextClick(null, null);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (tabControlButtons.SelectedTab == tabPageAdjust && ((e.Modifiers == Keys.None && e.KeyCode == Keys.F11) || _mainAdjustSetStart == e.KeyData))
|
||||
{
|
||||
buttonSetStartTime_Click(null, null);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (_mainAdjustSetStartKeepDuration == e.KeyData)
|
||||
{
|
||||
SetStartTime(true);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (tabControlButtons.SelectedTab == tabPageAdjust && (e.Modifiers == Keys.None && e.KeyCode == Keys.F11))
|
||||
{
|
||||
SetStartTime(false);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (tabControlButtons.SelectedTab == tabPageAdjust && ((e.Modifiers == Keys.None && e.KeyCode == Keys.F12) || _mainAdjustSetEnd == e.KeyData))
|
||||
{
|
||||
StopAutoDuration();
|
||||
ButtonSetEndClick(null, null);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (_mainAdjustInsertViaEndAutoStart == e.KeyData)
|
||||
{
|
||||
SetCurrentViaEndPositionAndGotoNext(FirstSelectedIndex, false);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (_mainAdjustInsertViaEndAutoStartAndGoToNext == e.KeyData)
|
||||
{
|
||||
ShowNextSubtitleLabel();
|
||||
SetCurrentViaEndPositionAndGotoNext(FirstSelectedIndex, true);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (_mainAdjustSetStartAutoDurationAndGoToNext == e.KeyData)
|
||||
{
|
||||
SetCurrentStartAutoDurationAndGotoNext(FirstSelectedIndex);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (_mainAdjustSetEndNextStartAndGoToNext == e.KeyData)
|
||||
{
|
||||
ShowNextSubtitleLabel();
|
||||
SetCurrentEndNextStartAndGoToNext(FirstSelectedIndex);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (_mainAdjustStartDownEndUpAndGoToNext == e.KeyData && _mainAdjustStartDownEndUpAndGoToNextParagraph == null)
|
||||
{
|
||||
ShowNextSubtitleLabel();
|
||||
_mainAdjustStartDownEndUpAndGoToNextParagraph = _subtitle.GetParagraphOrDefault(FirstSelectedIndex);
|
||||
SetStartTime(true);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
SubtitleListview1.SetStartTimeAndDuration(index, _subtitle.Paragraphs[index], _subtitle.GetParagraphOrDefault(index + 1), _subtitle.GetParagraphOrDefault(index - 1));
|
||||
SetDurationInSeconds(_subtitle.Paragraphs[index].Duration.TotalSeconds);
|
||||
ButtonInsertNewTextClick(null, null);
|
||||
}
|
||||
}
|
||||
else if (tabControlButtons.SelectedTab == tabPageTranslate)
|
||||
else if (_mainCreateStartDownEndUp == e.KeyData)
|
||||
{
|
||||
if (_mainTranslateCustomSearch1 == e.KeyData)
|
||||
{
|
||||
e.SuppressKeyPress = true;
|
||||
RunCustomSearch(Configuration.Settings.VideoControls.CustomSearchUrl1);
|
||||
}
|
||||
else if (_mainTranslateCustomSearch2 == e.KeyData)
|
||||
{
|
||||
e.SuppressKeyPress = true;
|
||||
RunCustomSearch(Configuration.Settings.VideoControls.CustomSearchUrl2);
|
||||
}
|
||||
else if (_mainTranslateCustomSearch3 == e.KeyData)
|
||||
{
|
||||
e.SuppressKeyPress = true;
|
||||
RunCustomSearch(Configuration.Settings.VideoControls.CustomSearchUrl3);
|
||||
}
|
||||
else if (_mainTranslateCustomSearch4 == e.KeyData)
|
||||
{
|
||||
e.SuppressKeyPress = true;
|
||||
RunCustomSearch(Configuration.Settings.VideoControls.CustomSearchUrl4);
|
||||
}
|
||||
else if (_mainTranslateCustomSearch5 == e.KeyData)
|
||||
{
|
||||
e.SuppressKeyPress = true;
|
||||
RunCustomSearch(Configuration.Settings.VideoControls.CustomSearchUrl5);
|
||||
}
|
||||
if (_mainCreateStartDownEndUpParagraph == null)
|
||||
_mainCreateStartDownEndUpParagraph = InsertNewTextAtVideoPosition();
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (_mainAdjustSelected100MsForward == e.KeyData)
|
||||
{
|
||||
ShowEarlierOrLater(100, SelectionChoice.SelectionOnly);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (_mainAdjustSelected100MsBack == e.KeyData)
|
||||
{
|
||||
ShowEarlierOrLater(-100, SelectionChoice.SelectionOnly);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
|
||||
|
||||
// adjust
|
||||
else if (_mainAdjustSelected100MsForward == e.KeyData)
|
||||
{
|
||||
ShowEarlierOrLater(100, SelectionChoice.SelectionOnly);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (_mainAdjustSelected100MsBack == e.KeyData)
|
||||
{
|
||||
ShowEarlierOrLater(-100, SelectionChoice.SelectionOnly);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (_mainAdjustAdjustStartXMsBack == e.KeyData)
|
||||
{
|
||||
MoveStartCurrent(-Configuration.Settings.Tools.MoveStartEndMs);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (_mainAdjustAdjustStartXMsForward == e.KeyData)
|
||||
{
|
||||
MoveStartCurrent(Configuration.Settings.Tools.MoveStartEndMs);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (_mainAdjustAdjustEndXMsBack == e.KeyData)
|
||||
{
|
||||
MoveEndCurrent(-Configuration.Settings.Tools.MoveStartEndMs);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (_mainAdjustAdjustEndXMsForward == e.KeyData)
|
||||
{
|
||||
MoveEndCurrent(Configuration.Settings.Tools.MoveStartEndMs);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (mediaPlayer.VideoPlayer != null && _mainAdjustSetStartAndOffsetTheRest == e.KeyData)
|
||||
{
|
||||
ButtonSetStartAndOffsetRestClick(null, null);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (mediaPlayer.VideoPlayer != null && _mainAdjustSetEndAndOffsetTheRest == e.KeyData)
|
||||
{
|
||||
SetEndAndOffsetTheRest(false);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (mediaPlayer.VideoPlayer != null && _mainAdjustSetEndAndOffsetTheRestAndGoToNext == e.KeyData)
|
||||
{
|
||||
SetEndAndOffsetTheRest(true);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (mediaPlayer.VideoPlayer != null && _mainAdjustSetEndAndGotoNext == e.KeyData)
|
||||
{
|
||||
ShowNextSubtitleLabel();
|
||||
ButtonSetEndAndGoToNextClick(null, null);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (mediaPlayer.VideoPlayer != null && tabControlButtons.SelectedTab == tabPageAdjust && e.Modifiers == Keys.None && e.KeyCode == Keys.F9)
|
||||
{
|
||||
ButtonSetStartAndOffsetRestClick(null, null);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (mediaPlayer.VideoPlayer != null && tabControlButtons.SelectedTab == tabPageAdjust && e.Modifiers == Keys.None && e.KeyCode == Keys.F10)
|
||||
{
|
||||
ShowNextSubtitleLabel();
|
||||
ButtonSetEndAndGoToNextClick(null, null);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (mediaPlayer.VideoPlayer != null && _mainAdjustSetStartKeepDuration == e.KeyData)
|
||||
{
|
||||
SetStartTime(true);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (mediaPlayer.VideoPlayer != null && _mainAdjustInsertViaEndAutoStart == e.KeyData)
|
||||
{
|
||||
SetCurrentViaEndPositionAndGotoNext(FirstSelectedIndex, false);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (mediaPlayer.VideoPlayer != null && _mainAdjustInsertViaEndAutoStartAndGoToNext == e.KeyData)
|
||||
{
|
||||
ShowNextSubtitleLabel();
|
||||
SetCurrentViaEndPositionAndGotoNext(FirstSelectedIndex, true);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (mediaPlayer.VideoPlayer != null && _mainAdjustSetStartAutoDurationAndGoToNext == e.KeyData)
|
||||
{
|
||||
SetCurrentStartAutoDurationAndGotoNext(FirstSelectedIndex);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (mediaPlayer.VideoPlayer != null && _mainAdjustSetEndNextStartAndGoToNext == e.KeyData)
|
||||
{
|
||||
ShowNextSubtitleLabel();
|
||||
SetCurrentEndNextStartAndGoToNext(FirstSelectedIndex);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (mediaPlayer.VideoPlayer != null && _mainAdjustStartDownEndUpAndGoToNext == e.KeyData && _mainAdjustStartDownEndUpAndGoToNextParagraph == null)
|
||||
{
|
||||
ShowNextSubtitleLabel();
|
||||
_mainAdjustStartDownEndUpAndGoToNextParagraph = _subtitle.GetParagraphOrDefault(FirstSelectedIndex);
|
||||
SetStartTime(true);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
|
||||
// translate
|
||||
else if (_mainTranslateCustomSearch1 == e.KeyData)
|
||||
{
|
||||
e.SuppressKeyPress = true;
|
||||
RunCustomSearch(Configuration.Settings.VideoControls.CustomSearchUrl1);
|
||||
}
|
||||
else if (_mainTranslateCustomSearch2 == e.KeyData)
|
||||
{
|
||||
e.SuppressKeyPress = true;
|
||||
RunCustomSearch(Configuration.Settings.VideoControls.CustomSearchUrl2);
|
||||
}
|
||||
else if (_mainTranslateCustomSearch3 == e.KeyData)
|
||||
{
|
||||
e.SuppressKeyPress = true;
|
||||
RunCustomSearch(Configuration.Settings.VideoControls.CustomSearchUrl3);
|
||||
}
|
||||
else if (_mainTranslateCustomSearch4 == e.KeyData)
|
||||
{
|
||||
e.SuppressKeyPress = true;
|
||||
RunCustomSearch(Configuration.Settings.VideoControls.CustomSearchUrl4);
|
||||
}
|
||||
else if (_mainTranslateCustomSearch5 == e.KeyData)
|
||||
{
|
||||
e.SuppressKeyPress = true;
|
||||
RunCustomSearch(Configuration.Settings.VideoControls.CustomSearchUrl5);
|
||||
}
|
||||
// put new entries above tabs
|
||||
}
|
||||
@ -17801,9 +17778,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
_mainAdjustSetStartAutoDurationAndGoToNext = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainAdjustSetStartAutoDurationAndGoToNext);
|
||||
_mainAdjustSetEndNextStartAndGoToNext = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainAdjustSetEndNextStartAndGoToNext);
|
||||
_mainAdjustStartDownEndUpAndGoToNext = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainAdjustStartDownEndUpAndGoToNext);
|
||||
_mainAdjustSetStart = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainAdjustSetStart);
|
||||
_mainAdjustSetStartKeepDuration = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainAdjustSetStartKeepDuration);
|
||||
_mainAdjustSetEnd = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainAdjustSetEnd);
|
||||
_mainAdjustSelected100MsForward = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainAdjustSelected100MsForward);
|
||||
_mainAdjustSelected100MsBack = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainAdjustSelected100MsBack);
|
||||
_mainAdjustAdjustStartXMsBack = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainAdjustStartXMsBack);
|
||||
|
@ -968,29 +968,27 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
var createAndAdjustNode = new ShortcutNode(Configuration.Settings.Language.Main.VideoControls.CreateAndAdjust);
|
||||
AddNode(createAndAdjustNode, Configuration.Settings.Language.Main.VideoControls.InsertNewSubtitleAtVideoPosition, nameof(Configuration.Settings.Shortcuts.MainCreateInsertSubAtVideoPos));
|
||||
AddNode(createAndAdjustNode, Configuration.Settings.Language.Main.VideoControls.SetStartTime, nameof(Configuration.Settings.Shortcuts.MainCreateSetStart));
|
||||
AddNode(createAndAdjustNode, Configuration.Settings.Language.Main.VideoControls.SetEndTime, nameof(Configuration.Settings.Shortcuts.MainCreateSetEnd));
|
||||
AddNode(createAndAdjustNode, language.MainCreateStartDownEndUp, nameof(Configuration.Settings.Shortcuts.MainCreateStartDownEndUp));
|
||||
AddNode(createAndAdjustNode, language.CreateSetEndAddNewAndGoToNew, nameof(Configuration.Settings.Shortcuts.MainCreateSetEndAddNewAndGoToNew));
|
||||
AddNode(createAndAdjustNode, Configuration.Settings.Language.Main.VideoControls.SetStartTime, nameof(Configuration.Settings.Shortcuts.MainCreateSetStart));
|
||||
AddNode(createAndAdjustNode, language.AdjustSetStartTimeKeepDuration, nameof(Configuration.Settings.Shortcuts.MainAdjustSetStartKeepDuration));
|
||||
AddNode(createAndAdjustNode, Configuration.Settings.Language.Main.VideoControls.SetstartTimeAndOffsetOfRest, nameof(Configuration.Settings.Shortcuts.MainAdjustSetStartAndOffsetTheRest));
|
||||
AddNode(createAndAdjustNode, language.AdjustSetStartAutoDurationAndGoToNext, nameof(Configuration.Settings.Shortcuts.MainAdjustSetStartAutoDurationAndGoToNext));
|
||||
AddNode(createAndAdjustNode, language.AdjustStartDownEndUpAndGoToNext, nameof(Configuration.Settings.Shortcuts.MainAdjustStartDownEndUpAndGoToNext));
|
||||
AddNode(createAndAdjustNode, Configuration.Settings.Language.Main.VideoControls.SetEndTime, nameof(Configuration.Settings.Shortcuts.MainCreateSetEnd));
|
||||
AddNode(createAndAdjustNode, language.CreateSetEndAddNewAndGoToNew, nameof(Configuration.Settings.Shortcuts.MainCreateSetEndAddNewAndGoToNew));
|
||||
AddNode(createAndAdjustNode, language.AdjustSetEndTimeAndGoToNext, nameof(Configuration.Settings.Shortcuts.MainAdjustSetEndAndGotoNext));
|
||||
AddNode(createAndAdjustNode, language.AdjustSetEndAndOffsetTheRest, nameof(Configuration.Settings.Shortcuts.MainAdjustSetEndAndOffsetTheRest));
|
||||
AddNode(createAndAdjustNode, language.AdjustSetEndAndOffsetTheRestAndGoToNext, nameof(Configuration.Settings.Shortcuts.MainAdjustSetEndAndOffsetTheRestAndGoToNext));
|
||||
AddNode(createAndAdjustNode, language.AdjustSetEndNextStartAndGoToNext, nameof(Configuration.Settings.Shortcuts.MainAdjustSetEndNextStartAndGoToNext));
|
||||
AddNode(createAndAdjustNode, language.AdjustViaEndAutoStart, nameof(Configuration.Settings.Shortcuts.MainAdjustViaEndAutoStart));
|
||||
AddNode(createAndAdjustNode, language.AdjustViaEndAutoStartAndGoToNext, nameof(Configuration.Settings.Shortcuts.MainAdjustViaEndAutoStartAndGoToNext));
|
||||
AddNode(createAndAdjustNode, language.AdjustSetStartAutoDurationAndGoToNext, nameof(Configuration.Settings.Shortcuts.MainAdjustSetStartAutoDurationAndGoToNext));
|
||||
AddNode(createAndAdjustNode, language.AdjustSetEndNextStartAndGoToNext, nameof(Configuration.Settings.Shortcuts.MainAdjustSetEndNextStartAndGoToNext));
|
||||
AddNode(createAndAdjustNode, language.AdjustStartDownEndUpAndGoToNext, nameof(Configuration.Settings.Shortcuts.MainAdjustStartDownEndUpAndGoToNext));
|
||||
AddNode(createAndAdjustNode, Configuration.Settings.Language.Main.VideoControls.SetStartTime, nameof(Configuration.Settings.Shortcuts.MainAdjustSetStart));
|
||||
AddNode(createAndAdjustNode, language.AdjustSetStartTimeKeepDuration, nameof(Configuration.Settings.Shortcuts.MainAdjustSetStartKeepDuration));
|
||||
AddNode(createAndAdjustNode, Configuration.Settings.Language.Main.VideoControls.SetEndTime, nameof(Configuration.Settings.Shortcuts.MainAdjustSetEnd));
|
||||
AddNode(createAndAdjustNode, language.AdjustExtendCurrentSubtitle, nameof(Configuration.Settings.Shortcuts.GeneralExtendCurrentSubtitle));
|
||||
AddNode(createAndAdjustNode, language.AdjustSelected100MsBack, nameof(Configuration.Settings.Shortcuts.MainAdjustSelected100MsBack));
|
||||
AddNode(createAndAdjustNode, language.AdjustSelected100MsForward, nameof(Configuration.Settings.Shortcuts.MainAdjustSelected100MsForward));
|
||||
AddNode(createAndAdjustNode, string.Format(language.AdjustStartXMsBack, Configuration.Settings.Tools.MoveStartEndMs), nameof(Configuration.Settings.Shortcuts.MainAdjustStartXMsBack));
|
||||
AddNode(createAndAdjustNode, string.Format(language.AdjustStartXMsForward, Configuration.Settings.Tools.MoveStartEndMs), nameof(Configuration.Settings.Shortcuts.MainAdjustStartXMsForward));
|
||||
AddNode(createAndAdjustNode, string.Format(language.AdjustEndXMsBack, Configuration.Settings.Tools.MoveStartEndMs), nameof(Configuration.Settings.Shortcuts.MainAdjustEndXMsBack));
|
||||
AddNode(createAndAdjustNode, string.Format(language.AdjustEndXMsForward, Configuration.Settings.Tools.MoveStartEndMs), nameof(Configuration.Settings.Shortcuts.MainAdjustEndXMsForward));
|
||||
AddNode(createAndAdjustNode, language.AdjustSetEndAndOffsetTheRest, nameof(Configuration.Settings.Shortcuts.MainAdjustSetEndAndOffsetTheRest));
|
||||
AddNode(createAndAdjustNode, language.AdjustSetEndAndOffsetTheRestAndGoToNext, nameof(Configuration.Settings.Shortcuts.MainAdjustSetEndAndOffsetTheRestAndGoToNext));
|
||||
AddNode(createAndAdjustNode, language.AdjustExtendCurrentSubtitle, nameof(Configuration.Settings.Shortcuts.GeneralExtendCurrentSubtitle));
|
||||
AddNode(createAndAdjustNode, language.RecalculateDurationOfCurrentSubtitle, nameof(Configuration.Settings.Shortcuts.GeneralAutoCalcCurrentDuration));
|
||||
if (createAndAdjustNode.Nodes.Count > 0)
|
||||
_shortcuts.Nodes.Add(createAndAdjustNode);
|
||||
|
Loading…
Reference in New Issue
Block a user