ReactOS  0.4.15-dev-3439-g2693a26
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 }
#define VK_RMENU
Definition: winuser.h:2267
#define VK_LEFT
Definition: winuser.h:2204
#define VK_LWIN
Definition: winuser.h:2215
#define VK_DOWN
Definition: winuser.h:2207
#define VK_INSERT
Definition: winuser.h:2212
#define VK_PRIOR
Definition: winuser.h:2200
#define VK_RETURN
Definition: winuser.h:2181
#define VK_NEXT
Definition: winuser.h:2201
#define VK_HOME
Definition: winuser.h:2203
#define VK_UP
Definition: winuser.h:2205
static void testScancodeExtendedKey(BYTE wVk, BYTE scanCode)
Definition: keybd_event.c:10
#define VK_DELETE
Definition: winuser.h:2213
#define VK_RCONTROL
Definition: winuser.h:2265
#define VK_RWIN
Definition: winuser.h:2216
#define VK_RIGHT
Definition: winuser.h:2206
#define VK_DIVIDE
Definition: winuser.h:2234
#define VK_END
Definition: winuser.h:2202

◆ 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 KEYEVENTF_KEYUP
Definition: winuser.h:1096
short SHORT
Definition: pedump.c:59
#define trace
Definition: atltest.h:70
VOID WINAPI keybd_event(_In_ BYTE, _In_ BYTE, _In_ DWORD, _In_ ULONG_PTR)
SHORT WINAPI GetAsyncKeyState(_In_ int)
#define ok(value,...)
Definition: atltest.h:57
#define KEYEVENTF_EXTENDEDKEY
Definition: winuser.h:1095

Referenced by START_TEST().