Esempio n. 1
0
        private void PipeMessageRecieved(string Reply)
        {
            var                  command   = Reply.Split(' ');
            NEHKeyState          state     = command[0] == "0" ? NEHKeyState.KeyDown : NEHKeyState.KeyUp;
            int                  KeyCode   = int.Parse(command[1]);
            Key                  key       = KeyInterop.KeyFromVirtualKey(KeyCode);
            NEHKeyPressEventArgs eventArgs = new NEHKeyPressEventArgs(state, key, KeyCode);

            KeyEventRecieved?.Invoke(this, eventArgs);
        }
Esempio n. 2
0
 public NEHKeyPressEventArgs(NEHKeyState state, Key key, int keyCode)
 {
     State   = state;
     Key     = key;
     KeyCode = keyCode;
 }