private static bool CheckHotkeyTriggered(KeyCode keyCode, EventModifiers modifiers, EditorFullscreenSettings.FullscreenOption fullscreenOption) { if (keyCode == KeyCode.None) { return(false); } if (EditorInput.HotkeysMatch(keyCode, modifiers, fullscreenOption.hotkey, fullscreenOption.modifiers)) { if (EditorFullscreenSettingsWindow.window != null && EditorFullscreenSettingsWindow.window.IsFocusedOnHotkeyField()) { //Don't trigger the fullscreen hotkey if currently focused on the hotkey field in the settings window. EditorFullscreenSettingsWindow.window.HotkeyConflictResendEvent(keyCode, modifiers); //Resend the hotkey event to the settings window so the hotkey can be changed. return(false); } else { //Trigger the fullscreen hotkey triggeredHotkey = fullscreenOption; return(true); } } return(false); }
/// <summary> /// Triggers a Fullscreen Hotkey /// </summary> /// <param name="fullscreenOption">The fullscreen option to trigger the hotkey of.</param> internal static void TriggerFullscreenHotkey(EditorFullscreenSettings.FullscreenOption fullscreenOption) { TriggerFullscreenHotkey(fullscreenOption.hotkey, fullscreenOption.modifiers); }