Vidka.Core.EditorLogic.KeyPressed C# (CSharp) 메소드

KeyPressed() 공개 메소드

Called on ANY key press
public KeyPressed ( KeyEventArgs e ) : void
e System.Windows.Forms.KeyEventArgs
리턴 void
        public void KeyPressed(KeyEventArgs e)
        {
            // TODO: refactor these maybe
            if (e.Control && e.KeyCode.IsLRShiftKey())
                ControlPressed();
            if (e.Shift && e.KeyCode.IsLRShiftKey())
                ShiftPressed();
            //------- commented out because we have created menu shortcuts
            //if (e.Control && e.KeyCode == Keys.S) // these are controlled from MainForm now
            //	Logic.SaveTriggered();
            //else if (e.Control && e.KeyCode == Keys.O)
            //	Logic.OpenTriggered();
            //else if (e.Control && e.Shift && e.KeyCode == Keys.E)
            //	Logic.ExportToAvs();
            else if (e.Control && e.KeyCode == Keys.Oemplus)
                ZoomIn(shitbox.Width);
            else if (e.Control && e.KeyCode == Keys.OemMinus)
                ZoomOut(shitbox.Width);
            //else if (e.Alt && e.KeyCode == Keys.Enter)
            else if (e.KeyCode == Keys.F4)
                shitbox.OpenClipProperties(UiObjects.CurrentClip);
            else if (e.Control && e.KeyCode == Keys.Space)
                PlayPause(onlyLockedClips: true);
            else if (e.KeyCode == Keys.Space)
                PlayPause(false);
            else if (e.KeyCode == Keys.Home)
                SetFrameMarker_0_ForceRepaint();
            else if (e.KeyCode == Keys.End)
                SetFrameMarker_End_ForceRepaint();
            else if (e.KeyCode == Keys.Enter)
                EnterPressed();
            else if (e.KeyCode == Keys.Escape)
                EscapePressed();
            else if (e.Control && e.KeyCode == Keys.Z)
                Undo();
            else if (e.Control && e.KeyCode == Keys.Y)
                Redo();
            else if (e.Control && e.KeyCode == Keys.C)
                CopyCurClipToClipboard();
            else if (e.Control && e.KeyCode == Keys.X)
                CutCurClipToClipboard();
            else if (e.Control && e.KeyCode == Keys.V)
                PasteClipFromClipboard();

            // ... to fix that bug when you do split on the "outside" of the original clip and it actually splits somewhere in your project
            if (UiObjects.OriginalTimelinePlaybackMode)
                return;

            ___UiTransactionBegin();
            if (CurEditOp == null)
            {
                ActivateCorrectOp((opp) =>
                {
                    return opp.TriggerBy_KeyPress(e.KeyCode);
                });
                if (CurEditOp != null)
                    CurEditOp.KeyPressedOther(e.KeyCode);
            }
            var op = Ops.FirstOrDefault(x => x.TriggerByKeyPress(e));
            if (op != null)
                op.Run();
            ___UiTransactionEnd();
        }
EditorLogic