private void OnGlobalHookKeyDown(object sender, KeyboardKeyEventArgs e)
        {
            //TODO: remove this
            //I put this here for when I wanted a fail-safe bailout :)
            if (e.Key == Key.Tilde && e.Control)
            {
                Environment.Exit(-1);
            }
            if (ClientState.CurrentClientFocused)
            {
                return;
            }

#if BailClient
            if (ShouldHookBailKeyboard())
            {
                return;
            }

            ClientState.LastHookEvent_Keyboard = DateTime.UtcNow;
#endif
#if QUEUE_CLIENT
            _dispatcher.Process(new KeyPressMessage(e.Key, true));
#else
            _dispatcher.Send(KeyPressMessage.GetBytes(e.Key, true));
#endif
            e.Handled = true;
        }
        private void OnGlobalHookKeyUp(object sender, KeyboardKeyEventArgs e)
        {
            if (ClientState.CurrentClientFocused)
            {
                return;
            }

#if BailClient
            if (ShouldHookBailKeyboard())
            {
                return;
            }

            ClientState.LastHookEvent_Keyboard = DateTime.UtcNow;
#endif
#if QUEUE_CLIENT
            _dispatcher.Process(new KeyPressMessage(e.Key, false));
#else
            _dispatcher.Send(KeyPressMessage.GetBytes(e.Key, false));
#endif
            e.Handled = true;
        }
Пример #3
0
 public void KeyPress(KeyPressMessage m)
 {
 }
Пример #4
0
 public void KeyPress(KeyPressMessage m)
 {
     throw new System.NotImplementedException();
 }
Пример #5
0
 public void KeyPress(KeyPressMessage m)
 {
 }
Пример #6
0
 public void KeyPress(KeyPressMessage m)
 {
     throw new System.NotImplementedException();
 }