public void OnKey(ConsoleKeyInfo key) { if (!(Focused?.ProcessKey(key) ?? false)) { // focused input didn't handle the key, process here if (key.Key == ConsoleKey.Tab) { SwitchInput(key.Modifiers.HasFlag(ConsoleModifiers.Shift)); } } }