void DoKeyDown(KeyEventArgs e) { Keys key = e.KeyCode; if (!keys.Contains(key)) { keys.Add(key); } if (controlManager != null) { EKeys eKey; if (GetEKeyByKeyCode(e.KeyCode, out eKey)) { KeyEvent keyEvent = new KeyEvent(eKey); if (controlManager.DoKeyDown(keyEvent)) { e.Handled = true; } if (keyEvent.SuppressKeyPress) { e.SuppressKeyPress = true; } } } }
private void DoKeyDown(KeyEventArgs e) { Key key = e.Key; if (!keys.Contains(key)) { keys.Add(key); } if (controlManager != null) { EKeys eKey; if (GetEKeyByKeyCode(e.Key, out eKey)) { KeyEvent keyEvent = new KeyEvent(eKey); controlManager.DoKeyDown(keyEvent); //if (controlManager.DoKeyDown(keyEvent)) // e.Handled = true; } } }
protected override bool OnKeyDown(KeyEvent e) { if (EngineConsole.Instance != null) { if (EngineConsole.Instance.DoKeyDown(e)) { return(true); } } if (controlManager != null) { if (controlManager.DoKeyDown(e)) { return(true); } } //Debug information window if (e.Key == EKeys.F11) { bool show = DebugInformationWindow.Instance == null; ShowDebugInformationWindow(show); return(true); } //make screenshot if (e.Key == EKeys.F12) { if (!WebPlayerMode) { MakeScreenshot(); return(true); } } return(base.OnKeyDown(e)); }