A keyboard input simulator for headless testing of Avalonia controls. Provides methods to simulate keyboard events including key presses, releases, and text input.
public class KeyboardInputSimulator
kind:method, kind:property, kind:ctor. Press Esc to clear.KeyboardInputSimulator()Creates a new keyboard input simulator.CurrentModifiersGets the current key modifiers state.PressedKeysGets the currently pressed keys.TimestampGets the current timestamp.AdvanceTime(Int32)Advances the internal timestamp by the specified number of milliseconds.AltDown(Interactive)Presses the Alt key.AltKey(Interactive, Key)Simulates Alt+Key combination.AltUp(Interactive)Releases the Alt key.ArrowDown(Interactive)Simulates Arrow Down key.ArrowLeft(Interactive)Simulates Arrow Left key.ArrowRight(Interactive)Simulates Arrow Right key.ArrowUp(Interactive)Simulates Arrow Up key.Backspace(Interactive)Simulates Backspace key.Copy(Interactive)Simulates Ctrl+C (Copy).CtrlDown(Interactive)Presses the Control key.CtrlKey(Interactive, Key)Simulates Ctrl+Key combination.CtrlShiftKey(Interactive, Key)Simulates Ctrl+Shift+Key combination.CtrlUp(Interactive)Releases the Control key.Cut(Interactive)Simulates Ctrl+X (Cut).Delete(Interactive)Simulates Delete key.End(Interactive)Simulates End key.Enter(Interactive)Simulates Enter key.Escape(Interactive)Simulates Escape key.FunctionKey(Interactive, Int32)Simulates a function key press (F1-F12).Home(Interactive)Simulates Home key.KeyDown(Interactive, Key, Nullable<KeyModifiers>)Simulates a key down event.KeyPress(Interactive, Key, Int32, Nullable<KeyModifiers>)Simulates a complete key press (down and up).KeyUp(Interactive, Key, Nullable<KeyModifiers>)Simulates a key up event.MetaDown(Interactive)Presses the Meta/Command key.MetaUp(Interactive)Releases the Meta/Command key.PageDown(Interactive)Simulates Page Down key.PageUp(Interactive)Simulates Page Up key.Paste(Interactive)Simulates Ctrl+V (Paste).Redo(Interactive)Simulates Ctrl+Shift+Z (Redo).Reset()Resets the simulator to its initial state.Save(Interactive)Simulates Ctrl+S (Save).SelectAll(Interactive)Simulates Ctrl+A (Select All).ShiftDown(Interactive)Presses the Shift key.ShiftTab(Interactive)Simulates Shift+Tab (reverse tab).ShiftUp(Interactive)Releases the Shift key.Space(Interactive)Simulates Space key.Tab(Interactive)Simulates Tab key.TypeText(Interactive, String, Int32)Simulates typing a string of text.Undo(Interactive)Simulates Ctrl+Z (Undo).