/// <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();
                }
            }
        }
示例#3
0
        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;
            }
        }
示例#4
0
 private void _ecoreKeyUp_On(object sender, EcoreKeyEventArgs e)
 {
     // e.KeyName, e.KeyCode
     DependencyService.Get <IKeyboardService>().KeyEvent(sender, e);
 }
示例#5
0
 void OnEcoreKeyUp(object sender, EcoreKeyEventArgs e)
 {
     _keyUpHandler?.Invoke(this, e);
 }
示例#6
0
 void OnPageKeyUp(object sender, EcoreKeyEventArgs e)
 {
     InvokeActionAndEvent(RemoteControlKeyTypes.KeyUp, e.KeyName);
 }
示例#7
0
 /// <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);
 }