MCPcopy
hub / github.com/cluic/wxauto / SendKey

Function SendKey

wxauto/uiautomation.py:2483–2490  ·  view source on GitHub ↗

Simulate typing a key. key: int, a value in class `Keys`.

(key: int, waitTime: float = OPERATION_WAIT_TIME)

Source from the content-addressed store, hash-verified

2481
2482
2483def SendKey(key: int, waitTime: float = OPERATION_WAIT_TIME) -> None:
2484 """
2485 Simulate typing a key.
2486 key: int, a value in class `Keys`.
2487 """
2488 keybd_event(key, 0, KeyboardEventFlag.KeyDown | KeyboardEventFlag.ExtendedKey, 0)
2489 keybd_event(key, 0, KeyboardEventFlag.KeyUp | KeyboardEventFlag.ExtendedKey, 0)
2490 time.sleep(waitTime)
2491
2492
2493def PressKey(key: int, waitTime: float = OPERATION_WAIT_TIME) -> None:

Callers 1

SendKeyMethod · 0.85

Calls 1

keybd_eventFunction · 0.85

Tested by

no test coverage detected