예제 #1
0
        /// <summary>
        ///     Handles a key up event.
        /// </summary>
        /// <param name="e">
        ///     The <see cref="Replayer.Core.v04.Input.SimpleKeyEventArgs" /> instance containing the event data.
        /// </param>
        public void HandleKeyUp(SimpleKeyEventArgs e)
        {
            //for the keys that have specific long press behaviour, check the single press case
            if (!KeyWasPressedRepeatedly) //a key has been explicitly pressed only once
            {
                switch (PressedCharacter)
                {
                case '/': {
                    OnCommandIssued(InputCommand.SkipBackward);
                }
                break;

                case '*': {
                    OnCommandIssued(InputCommand.SkipForward);
                }
                break;
                }
            }
            e.Handled = true;
            //set back states
            PressedCharacter        = '!'; //set to unused char
            KeyWasPressedRepeatedly = false;
            KeyWasUp = true;
        }
예제 #2
0
 /// <summary>
 ///     Handles a key down event.
 /// </summary>
 /// <param name="e">
 ///     The <see cref="Replayer.Core.v04.Input.SimpleKeyEventArgs" /> instance containing the event data.
 /// </param>
 public void HandleKeyDown(SimpleKeyEventArgs e)
 {
 }