protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
//If not in the editor page.
if (_stage != Stage.Editing)
{
return base.ProcessCmdKey(ref msg, keyData);
}
switch (keyData)
{
case Keys.Delete: //Delete this frame
con_deleteSelectedFrame_Click(null, null);
return true;
case Keys.Control | Keys.G: //Show grid
con_showGrid.Checked = !con_showGrid.Checked; //Inverse the checkState.
con_showGrid_CheckedChanged(null, null);
return true;
case Keys.Right: //Next frame
btnNext_Click(null, null);
return true;
case Keys.Left: //Previous frame
btnPrevious_Click(null, null);
return true;
case Keys.Alt | Keys.Right: //Delete everything after this
con_deleteAfter_Click(null, null);
return true;
case Keys.Alt | Keys.Left: //Delete everything before this
con_deleteBefore_Click(null, null);
return true;
case Keys.Control | Keys.E: //Export Frame
con_exportFrame_Click(null, null);
return true;
case Keys.Control | Keys.T: //Export Frame
con_addText_Click(null, null);
return true;
case Keys.Shift | Keys.Escape: //Cancel
btnCancel_Click(null, null);
return true;
case Keys.Shift | Keys.Enter: //Done
btnDone_Click(null, null);
return true;
case Keys.Alt | Keys.D: //Show the Delay Context
#region Show Delay
contextDelay.Show(lblDelay, 0, lblDelay.Height);
con_tbDelay.Text = _delay.ToString();
con_tbDelay.Focus();
#endregion
return true;
case Keys.Control | Keys.Up: //Move Frame Upwards
con_MoveUpwards_Click(null, null);
return true;
case Keys.Control | Keys.Down: //Move Frame Downwards
con_MoveDownwards_Click(null, null);
return true;
case Keys.F2: //Rename Frame
con_RenameFrame_Click(null, null);
return true;
case Keys.Control | Keys.C: //Make a Copy
con_MakeACopy_Click(null, null);
return true;
}
return base.ProcessCmdKey(ref msg, keyData);
}