Esempio n. 1
0
 /// <summary>
 /// Updates the keyboard text.
 /// </summary>
 /// <param name="rawArgs">The <see cref="SharpDX.RawInput.RawInputEventArgs"/> instance containing the event data.</param>
 static void UpdateKeyboardText(RawInputEventArgs rawArgs)
 {
     var args = (KeyboardInputEventArgs)rawArgs;
     textBox.AppendText(string.Format("Key: {0} State: {1} ScanCodeFlags: {2}\r\n", args.Key, args.State, args.ScanCodeFlags));
 }
Esempio n. 2
0
        /// <summary>
        /// Updates the mouse text.
        /// </summary>
        /// <param name="rawArgs">The <see cref="SharpDX.RawInput.RawInputEventArgs"/> instance containing the event data.</param>
        static void UpdateMouseText(RawInputEventArgs rawArgs)
        {
            var args = (MouseInputEventArgs)rawArgs;

            textBox.AppendText(string.Format("(x,y):({0},{1}) Buttons: {2} State: {3} Wheel: {4}\r\n", args.X, args.Y, args.ButtonFlags, args.Mode, args.WheelDelta));            
        }