| 34 | //} |
| 35 | |
| 36 | int 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 | |
| 59 | int GetCefKeyboardModifiers(WPARAM wparam, LPARAM lparam) { |
| 60 | int modifiers = 0; |
nothing calls this directly
no test coverage detected