public void keyPressed(eKey key, eKeyboardState keyboardState) { switch (key) { case eKey.Space: playPause(); return; case eKey.Home: mediaEngine.currentTime = TimeSpan.Zero; return; case eKey.PageUp: seek(keyboardState.HasFlag(eKeyboardState.ControlDown) ? -veryLargeSeek : -largeSeek); return; case eKey.PageDown: seek(keyboardState.HasFlag(eKeyboardState.ControlDown) ? veryLargeSeek : largeSeek); return; case eKey.Left: seek(-smallSeek); return; case eKey.Right: seek(smallSeek); return; } }
bool handleWindowedModeHotkey(iDiligentWindow window, eKey key, eKeyboardState ks) { // if( key == eKey.Esc && content.windowState == eShowWindow.Fullscreen ) if (key == eKey.Esc) { window.moveWindow(eShowWindow.Normal); return(true); } if (key == eKey.Up && ks.HasFlag(eKeyboardState.ControlDown)) { window.moveWindow(eShowWindow.Maximized); return(true); } if (key == eKey.Down && ks.HasFlag(eKeyboardState.ControlDown)) { window.moveWindow(eShowWindow.Minimized); return(true); } if (key == eKey.Enter && ks.HasFlag(eKeyboardState.AltDown)) { if (ks.HasFlag(eKeyboardState.ControlDown)) { switchToTrueFullScreen(window); } else { window.moveWindow(eShowWindow.Fullscreen); } return(true); } return(false); }