MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / sendModifierKeyDown

Function sendModifierKeyDown

cpp/webdriver-interactions/interactions.cpp:102–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102void sendModifierKeyDown(HWND hwnd, HKL layout, int modifierKeyCode,
103 BYTE keyboardState[256], int pause) {
104 keyboardState[modifierKeyCode] |= 0x80;
105
106 LPARAM modifierKey = 1 | MapVirtualKeyEx(modifierKeyCode, 0, layout) << 16;
107 if (!PostMessage(hwnd, WM_KEYDOWN, modifierKeyCode, modifierKey)) {
108 LOG(WARN) << "Modifier keydown failed: " << GetLastError();
109 }
110
111 wait(pause);
112}
113
114void sendModifierKeyUp(HWND hwnd, HKL layout, int modifierKeyCode,
115 BYTE keyboardState[256], int pause) {

Calls 2

waitFunction · 0.85
LOGClass · 0.70

Tested by

no test coverage detected