int32 FWebBrowserWindow::GetCefInputModifiers(const FInputEvent& InputEvent) { int32 Modifiers = 0; if (InputEvent.IsShiftDown()) { Modifiers |= EVENTFLAG_SHIFT_DOWN; } if (InputEvent.IsControlDown()) { Modifiers |= EVENTFLAG_CONTROL_DOWN; } if (InputEvent.IsAltDown()) { Modifiers |= EVENTFLAG_ALT_DOWN; } if (InputEvent.IsCommandDown()) { Modifiers |= EVENTFLAG_COMMAND_DOWN; } if (InputEvent.AreCapsLocked()) { Modifiers |= EVENTFLAG_CAPS_LOCK_ON; } // TODO: Add function for this if necessary /*if (InputEvent.AreNumsLocked()) { Modifiers |= EVENTFLAG_NUM_LOCK_ON; }*/ return Modifiers; }
int32 FCEFWebBrowserWindow::GetCefInputModifiers(const FInputEvent& InputEvent) { int32 Modifiers = 0; if (InputEvent.IsShiftDown()) { Modifiers |= EVENTFLAG_SHIFT_DOWN; } if (InputEvent.IsControlDown()) { #if PLATFORM_MAC // Slate swaps the flags for Command and Control on OSX, so we need to swap them back for CEF Modifiers |= EVENTFLAG_COMMAND_DOWN; #else Modifiers |= EVENTFLAG_CONTROL_DOWN; #endif } if (InputEvent.IsAltDown()) { Modifiers |= EVENTFLAG_ALT_DOWN; } if (InputEvent.IsCommandDown()) { #if PLATFORM_MAC // Slate swaps the flags for Command and Control on OSX, so we need to swap them back for CEF Modifiers |= EVENTFLAG_CONTROL_DOWN; #else Modifiers |= EVENTFLAG_COMMAND_DOWN; #endif } if (InputEvent.AreCapsLocked()) { Modifiers |= EVENTFLAG_CAPS_LOCK_ON; } return Modifiers; }