Exemplo n.º 1
0
 public InputEventKeyboard(KeyboardEvent eventType, InputEventKeyboard parent)
     : base(parent)
 {
     EventType     = eventType;
     KeyCode       = parent.KeyCode;
     _keyDataExtra = parent._keyDataExtra;
 }
Exemplo n.º 2
0
 void OnKeyDown(InputEventKeyboard e)
 {
     if (e.DataPreviousState == 0)
     {
         AddEvent(new InputEventKeyboard(KeyboardEvent.Down, e));
     }
     for (var i = 0; i < e.DataRepeatCount; i++)
     {
         AddEvent(new InputEventKeyboard(KeyboardEvent.Press, e));
     }
 }
Exemplo n.º 3
0
        void OnKeyChar(InputEventKeyboard e)
        {
            // Control key sends a strange wm_char message ...
            if (e.Control && !e.Alt)
            {
                return;
            }
            var ek = LastKeyPressEvent;

            if (ek == null)
            {
                Utils.Warning("No corresponding KeyPress event for a WM_CHAR message.");
            }
            else
            {
                ek.OverrideKeyChar(e.KeyCode);
            }
        }
Exemplo n.º 4
0
 void OnKeyUp(InputEventKeyboard e)
 {
     AddEvent(new InputEventKeyboard(KeyboardEvent.Up, e));
 }