namespace WallstopStudios.DataVisualizer.Editor.Extensions { using UnityEngine.UIElements; internal static class EventExtensions { /// /// Prevents the event's default action on Unity versions where /// is supported. On Unity 2023.2+ that method /// is obsolete, so this is a no-op there: every caller pairs it with /// , which consumes the event — the sanctioned /// replacement for the KeyDownEvents handled here. FocusController.IgnoreEvent (the /// other suggested replacement) only affects pointer/navigation events, so it is /// intentionally not used. /// internal static void PreventDefaultCompat(this EventBase evt) { #if !UNITY_2023_2_OR_NEWER evt.PreventDefault(); #endif } } }