MCPcopy Create free account
hub / github.com/WallBreaker2/op / ScanCode

Function ScanCode

libop/input/keyboard/KeyMessageUtils.h:34–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34inline WORD ScanCode(UINT vk_code) {
35 return static_cast<WORD>((::MapVirtualKey(vk_code, MAPVK_VK_TO_VSC)) & 0xff);
36}
37
38// Windows 键盘消息的 lParam 需要同时带扫描码、扩展键和按下/抬起状态。
39inline LPARAM BuildKeyLParam(UINT vk_code, bool key_up, bool alt_context = false) {

Callers 2

make_raw_keyboardFunction · 0.85
BuildKeyLParamFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected