protected override bool TranslateAcceleratorCore(ref System.Windows.Interop.MSG msg, ModifierKeys mod) { if (msg.message is Api.WM_KEYDOWN or Api.WM_SYSKEYDOWN) { var key = (KKey)msg.wParam; switch ((key, mod)) { case (KKey.C, ModifierKeys.Control): ZCopy(); return(true); case (KKey.V, ModifierKeys.Control): ZPaste(); return(true); case (KKey.F12, 0): Menus.Edit.Go_to_definition(); return(true); default: if (_ImageDeleteKey(key)) { return(true); } if (CodeInfo.SciCmdKey(this, key, mod)) { return(true); } switch ((key, mod)) { case (KKey.Enter, 0): case (KKey.Enter, ModifierKeys.Control | ModifierKeys.Shift): zAddUndoPoint(); break; } break; } } return(base.TranslateAcceleratorCore(ref msg, mod)); }
protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { switch (keyData) { case Keys.Control | Keys.C: ZForumCopy(onlyInfo: true); break; case Keys.Control | Keys.V: if (ZForumPaste()) { return(true); } break; case Keys.Control | Keys.W: Strips.Cmd.Edit_WrapLines(); return(true); case Keys.F12: Strips.Cmd.Edit_GoToDefinition(); return(true); default: if (CodeInfo.SciCmdKey(this, keyData)) { return(true); } switch (keyData) { case Keys.Enter: Z.AddUndoPoint(); break; } break; } return(base.ProcessCmdKey(ref msg, keyData)); }