protected override void OnMessageReceived(object sender, MessageEventArgs e) { Contract.Requires(e != null); var eventArgs = new KeyboardMessageEventArgs { VirtualKeyCode = BitConverter.ToInt32(e.Bytes, 0), Flags = BitConverter.ToUInt32(e.Bytes, 4), }; Debug.WriteLine($"Keyboard Virtual Key Code: {eventArgs.VirtualKeyCode}; Flags: {eventArgs.Flags:x}"); MessageReceived?.Invoke(this, eventArgs); }
private void KeyboardHandler(object sender, Winook.KeyboardMessageEventArgs e) { this._callback?.Invoke(e); }