Example #1
0
        public void KeyPressWithModifier(ushort keyAndModifier)
        {
            if ((keyAndModifier & KeyboardTables.InvalidFlag) > 0)
            {
                // This key is marked as invalid: ignore it.
                return;
            }

            // TODO: other modifiers.
            if ((keyAndModifier & KeyboardTables.ShiftModifier) > 0)
            {
                _Queue.Enqueue(QueuedEvent.CreateKeyDown(KeyboardKey.LeftShift));
            }
            _Queue.Enqueue(QueuedEvent.CreateKeyPress((KeyboardKey)(keyAndModifier & 0x00ff)));
            if ((keyAndModifier & KeyboardTables.ShiftModifier) > 0)
            {
                _Queue.Enqueue(QueuedEvent.CreateKeyUp(KeyboardKey.LeftShift));
            }
            ActionEvent();
        }
Example #2
0
 public void KeyUp(KeyboardKey key)
 {
     _Queue.Enqueue(QueuedEvent.CreateKeyUp(key));
     ActionEvent();
 }