Add alt/ctrl + arrow keys move to assa set pos

This commit is contained in:
niksedk 2021-06-22 12:46:15 +02:00
parent 55de09680d
commit c1148582f0

View File

@ -85,6 +85,36 @@ namespace Nikse.SubtitleEdit.Forms.Assa
UiUtil.OpenUrl("https://www.nikse.dk/SubtitleEdit/AssaOverrideTags#pos"); UiUtil.OpenUrl("https://www.nikse.dk/SubtitleEdit/AssaOverrideTags#pos");
e.SuppressKeyPress = true; e.SuppressKeyPress = true;
} }
if (e.Modifiers == Keys.Alt || e.Modifiers == Keys.Control)
{
var v = e.Modifiers == Keys.Alt ? 1 : 10;
if (e.KeyCode == Keys.Up && _x != -1 && _y != -1)
{
_y -= v;
e.SuppressKeyPress = true;
VideoLoaded(null, null);
}
else if (e.KeyCode == Keys.Down && _x != -1 && _y != -1)
{
_y += v;
e.SuppressKeyPress = true;
VideoLoaded(null, null);
}
else if (e.KeyCode == Keys.Left && _x != -1 && _y != -1)
{
_x -= v;
e.SuppressKeyPress = true;
VideoLoaded(null, null);
}
else if (e.KeyCode == Keys.Right && _x != -1 && _y != -1)
{
_x += v;
e.SuppressKeyPress = true;
VideoLoaded(null, null);
}
}
} }
private void buttonOK_Click(object sender, EventArgs e) private void buttonOK_Click(object sender, EventArgs e)