MCPcopy Create free account
hub / github.com/cztomczak/cefpython / GetCefMouseModifiers

Function GetCefMouseModifiers

src/subprocess/main_message_loop/util_win.cpp:36–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34//}
35
36int GetCefMouseModifiers(WPARAM wparam) {
37 int modifiers = 0;
38 if (wparam & MK_CONTROL)
39 modifiers |= EVENTFLAG_CONTROL_DOWN;
40 if (wparam & MK_SHIFT)
41 modifiers |= EVENTFLAG_SHIFT_DOWN;
42 if (IsKeyDown(VK_MENU))
43 modifiers |= EVENTFLAG_ALT_DOWN;
44 if (wparam & MK_LBUTTON)
45 modifiers |= EVENTFLAG_LEFT_MOUSE_BUTTON;
46 if (wparam & MK_MBUTTON)
47 modifiers |= EVENTFLAG_MIDDLE_MOUSE_BUTTON;
48 if (wparam & MK_RBUTTON)
49 modifiers |= EVENTFLAG_RIGHT_MOUSE_BUTTON;
50
51 // Low bit set from GetKeyState indicates "toggled".
52 if (::GetKeyState(VK_NUMLOCK) & 1)
53 modifiers |= EVENTFLAG_NUM_LOCK_ON;
54 if (::GetKeyState(VK_CAPITAL) & 1)
55 modifiers |= EVENTFLAG_CAPS_LOCK_ON;
56 return modifiers;
57}
58
59int GetCefKeyboardModifiers(WPARAM wparam, LPARAM lparam) {
60 int modifiers = 0;

Callers

nothing calls this directly

Calls 1

IsKeyDownFunction · 0.85

Tested by

no test coverage detected