ReactOS 0.4.15-dev-8231-g29a56f3
keybd_event.c File Reference
#include "precomp.h"
Include dependency graph for keybd_event.c:

Go to the source code of this file.

Functions

static void testScancodeExtendedKey (BYTE wVk, BYTE scanCode)
 
 START_TEST (keybd_event)
 

Function Documentation

◆ START_TEST()

START_TEST ( keybd_event  )

Definition at line 24 of file keybd_event.c.

25{
42}
static void testScancodeExtendedKey(BYTE wVk, BYTE scanCode)
Definition: keybd_event.c:10
#define VK_UP
Definition: winuser.h:2225
#define VK_NEXT
Definition: winuser.h:2221
#define VK_RCONTROL
Definition: winuser.h:2285
#define VK_RETURN
Definition: winuser.h:2201
#define VK_RMENU
Definition: winuser.h:2287
#define VK_END
Definition: winuser.h:2222
#define VK_HOME
Definition: winuser.h:2223
#define VK_LWIN
Definition: winuser.h:2235
#define VK_LEFT
Definition: winuser.h:2224
#define VK_RIGHT
Definition: winuser.h:2226
#define VK_DOWN
Definition: winuser.h:2227
#define VK_PRIOR
Definition: winuser.h:2220
#define VK_DELETE
Definition: winuser.h:2233
#define VK_DIVIDE
Definition: winuser.h:2254
#define VK_INSERT
Definition: winuser.h:2232
#define VK_RWIN
Definition: winuser.h:2236

◆ testScancodeExtendedKey()

static void testScancodeExtendedKey ( BYTE  wVk,
BYTE  scanCode 
)
static

Definition at line 10 of file keybd_event.c.

11{
12 trace("wVK: %x\tScancode: %x\n", wVk, scanCode);
13
14 keybd_event(0, scanCode, KEYEVENTF_SCANCODE | KEYEVENTF_EXTENDEDKEY, 0);
15 SHORT winKeyState = GetAsyncKeyState(wVk);
16 ok(winKeyState & 0x8000, "VK=%x should be detected as key down.\n", wVk);
17
18 keybd_event(0, scanCode, KEYEVENTF_SCANCODE | KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0);
19 winKeyState = GetAsyncKeyState(wVk);
20 ok(!(winKeyState & 0x8000), "VK=%x should be detected as key up.\n", wVk);
21}
#define trace
Definition: atltest.h:70
#define ok(value,...)
Definition: atltest.h:57
short SHORT
Definition: pedump.c:59
VOID WINAPI keybd_event(_In_ BYTE, _In_ BYTE, _In_ DWORD, _In_ ULONG_PTR)
#define KEYEVENTF_EXTENDEDKEY
Definition: winuser.h:1101
SHORT WINAPI GetAsyncKeyState(_In_ int)
#define KEYEVENTF_KEYUP
Definition: winuser.h:1102

Referenced by START_TEST().