1.1 --- a/Form1.cs Fri Dec 05 23:18:13 2014 +0100
1.2 +++ b/Form1.cs Sat Dec 06 00:59:59 2014 +0100
1.3 @@ -122,12 +122,14 @@
1.4 base.WndProc(ref message);
1.5 }
1.6
1.7 - private void _remote_ButtonPressed(object sender, RemoteControlEventArgs e)
1.8 + private bool _remote_ButtonPressed(object sender, RemoteControlEventArgs e)
1.9 {
1.10 + bool processed = false;
1.11 _timer.Enabled = false;
1.12 if (e.Button != RemoteControlButton.Unknown)
1.13 {
1.14 label1.Text = e.Button.ToString();
1.15 + processed = true;
1.16 }
1.17 else if (e.MceButton != Hid.UsageTables.MceButton.Null)
1.18 {
1.19 @@ -139,6 +141,14 @@
1.20 //Also display HP button name
1.21 label1.Text += " / HP:" + ((Hid.UsageTables.HpMceButton)e.MceButton).ToString();
1.22 }
1.23 +
1.24 + processed = true;
1.25 + }
1.26 + else if (e.ConsumerControl != Hid.UsageTables.ConsumerControl.Null)
1.27 + {
1.28 + //Display consumer control name
1.29 + label1.Text = e.ConsumerControl.ToString();
1.30 + processed = true;
1.31 }
1.32 else
1.33 {
1.34 @@ -146,6 +156,7 @@
1.35 }
1.36 label2.Text = e.Device.ToString();
1.37 _timer.Enabled = true;
1.38 + return processed;
1.39 }
1.40
1.41 private void _timer_Tick(object sender, EventArgs e)