diff options
Diffstat (limited to 'Tools/TestWebKitAPI/win/PlatformWebViewWin.cpp')
-rw-r--r-- | Tools/TestWebKitAPI/win/PlatformWebViewWin.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Tools/TestWebKitAPI/win/PlatformWebViewWin.cpp b/Tools/TestWebKitAPI/win/PlatformWebViewWin.cpp index 132ab2a..1f39f8b 100644 --- a/Tools/TestWebKitAPI/win/PlatformWebViewWin.cpp +++ b/Tools/TestWebKitAPI/win/PlatformWebViewWin.cpp @@ -92,6 +92,14 @@ void PlatformWebView::simulateSpacebarKeyPress() ::SendMessageW(window, WM_KEYUP, VK_SPACE, (1 << repeatCountBitOffset) | (39 << scanCodeBitOffset) | (1 << previousStateBitOffset) | (1 << transitionStateBitOffset)); } +void PlatformWebView::simulateAKeyDown() +{ + HWND window = WKViewGetWindow(m_view); + + // These values match what happens when you press the 'A' key in Notepad, as observed by Spy++. + ::SendMessageW(window, WM_KEYDOWN, 'A', (1 << repeatCountBitOffset) | (30 << scanCodeBitOffset)); +} + void PlatformWebView::simulateAltKeyPress() { HWND window = WKViewGetWindow(m_view); |