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

Function sendModifierKeyUp

cpp/webdriver-interactions/interactions.cpp:114–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114void sendModifierKeyUp(HWND hwnd, HKL layout, int modifierKeyCode,
115 BYTE keyboardState[256], int pause) {
116 keyboardState[modifierKeyCode] &= ~0x80;
117
118 LPARAM modifierKey = 1 | MapVirtualKeyEx(modifierKeyCode, 0, layout) << 16;
119 modifierKey |= 0x3 << 30;
120
121 if (!PostMessage(hwnd, WM_KEYUP, modifierKeyCode, modifierKey)) {
122 LOG(WARN) << "Modifier keyup failed: " << GetLastError();
123 }
124 wait(pause);
125
126}
127
128void sendModifierKeyDownIfNeeded(bool shouldSend, HWND hwnd, HKL layout,
129 int modifierKeyCode, BYTE keyboardState[256], int pause) {

Calls 2

waitFunction · 0.85
LOGClass · 0.70

Tested by

no test coverage detected