/// <summary> /// Handles "On" event of the EcoreEvent object. /// Invokes HomeButtonKeyDown if the home button key is pressed (code 124). /// </summary> /// <param name="sender">The object that raised the event.</param> /// <param name="keyEvent">Pressed key event data.</param> private void OnEcoreKeyDown(object sender, EcoreKeyEventArgs keyEvent) { if (keyEvent.KeyCode == 124) { HomeButtonKeyDown?.Invoke(this, EventArgs.Empty); } }
void OnKeyDown(object sender, EcoreKeyEventArgs e) { var targetName = _targetKeyName.ToString(); if (targetName == e.KeyName || targetName == "NUM" + e.KeyName) { var targetPage = GetParentPage(); if (IsOnMainPage(targetPage)) { ActiveOrFocusElement(); } } }
private void KeyEventHandler(object sender, EcoreKeyEventArgs e) { var KeyPressedName = e.KeyName; Tizen.Log.Info("KEY", KeyPressedName); if (ArrowKeyEvent(KeyPressedName) == true) { return; } else if (MediaKeyEvent(KeyPressedName) == true) { return; } }
private void _ecoreKeyUp_On(object sender, EcoreKeyEventArgs e) { // e.KeyName, e.KeyCode DependencyService.Get <IKeyboardService>().KeyEvent(sender, e); }
void OnEcoreKeyUp(object sender, EcoreKeyEventArgs e) { _keyUpHandler?.Invoke(this, e); }
void OnPageKeyUp(object sender, EcoreKeyEventArgs e) { InvokeActionAndEvent(RemoteControlKeyTypes.KeyUp, e.KeyName); }
/// <summary> /// Event fired when any key is received by the application's MainWindow. /// </summary> /// <param name="sender">Sending object's reference.</param> /// <param name="keyEventArgs">Key event arguments.</param> public void KeyEvent(object sender, EcoreKeyEventArgs keyEventArgs) { _keyPressedDelegate?.Invoke(keyEventArgs.KeyName); }