From 3dd17bd82cf78cb607867bbca8a562abaef89561 Mon Sep 17 00:00:00 2001 From: BDisp Date: Fri, 8 Jan 2021 20:35:47 +0000 Subject: [PATCH] Added feature to navigate through all Application.Top's subviews. --- Terminal.Gui/Core/Toplevel.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Terminal.Gui/Core/Toplevel.cs b/Terminal.Gui/Core/Toplevel.cs index 1699cd9d7..c83eee343 100644 --- a/Terminal.Gui/Core/Toplevel.cs +++ b/Terminal.Gui/Core/Toplevel.cs @@ -195,7 +195,7 @@ namespace Terminal.Gui { if (base.ProcessKey (keyEvent)) return true; - switch (keyEvent.Key) { + switch (ShortcutHelper.GetModifiersKey (keyEvent)) { case Key.Q | Key.CtrlMask: // FIXED: stop current execution of this container Application.RequestStop (); @@ -224,9 +224,9 @@ namespace Terminal.Gui { FocusNearestView (SuperView?.Subviews, Direction.Forward); } return true; + case Key.BackTab | Key.ShiftMask: case Key.CursorLeft: case Key.CursorUp: - case Key.BackTab: old = GetDeepestFocusedSubview (Focused); if (!FocusPrev ()) FocusPrev (); @@ -237,7 +237,12 @@ namespace Terminal.Gui { FocusNearestView (SuperView?.Subviews?.Reverse(), Direction.Backward); } return true; - + case Key.Tab | Key.CtrlMask: + Application.Top.FocusNext (); + return true; + case Key.Tab | Key.ShiftMask | Key.CtrlMask: + Application.Top.FocusPrev (); + return true; case Key.L | Key.CtrlMask: Application.Refresh (); return true;