Adding support for HID Keyboard events.
2 using System.Collections.Generic;
5 using System.Threading.Tasks;
6 using System.Runtime.Serialization;
7 using Ear = SharpLib.Ear;
8 using Hid = SharpLib.Hid;
10 namespace SharpDisplayManager
13 [Ear.AttributeObject(Id = "Event.Hid.WindowsMediaCenter", Name = "HID Windows Media Center", Description = "Corresponding HID message received.")]
14 public class EventHidWindowsMediaCenter : Ear.Event
16 public EventHidWindowsMediaCenter()
21 [Ear.AttributeObjectProperty
25 Description = "The usage corresponding to your remote button."
27 public Hid.Usage.WindowsMediaCenterRemoteControl Usage { get; set; }
30 /// Make sure we distinguish between various configuration of this event
32 /// <returns></returns>
33 public override string Brief()
35 return Name + ": " + Usage.ToString();
41 /// <param name="obj"></param>
42 /// <returns></returns>
43 public override bool Equals(object obj)
45 if (obj is EventHidWindowsMediaCenter)
47 EventHidWindowsMediaCenter e = (EventHidWindowsMediaCenter)obj;
48 bool res = (e.Usage == Usage);