mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 08:50:25 +01:00
Removed dead code
This commit is contained in:
@@ -720,30 +720,6 @@ public partial class View
|
||||
return false;
|
||||
}
|
||||
|
||||
// Function to search the subview hierarchy for the first view that has a KeyBindingScope.Application binding for the key.
|
||||
// Called from Application.OnKeyDown
|
||||
// TODO: Unwind recursion
|
||||
// QUESTION: Should this return a list of views? As is, it will only return the first view that has the binding.
|
||||
internal static View FindViewWithApplicationKeyBinding (View start, Key keyEvent)
|
||||
{
|
||||
if (start.KeyBindings.TryGet (keyEvent, KeyBindingScope.Application, out KeyBinding binding))
|
||||
{
|
||||
return start;
|
||||
}
|
||||
|
||||
foreach (View subview in start.Subviews)
|
||||
{
|
||||
View found = FindViewWithApplicationKeyBinding (subview, keyEvent);
|
||||
|
||||
if (found is { })
|
||||
{
|
||||
return found;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invoked when a key is pressed that may be mapped to a key binding. Set <see cref="Key.Handled"/> to true to
|
||||
/// stop the key from being processed by other views.
|
||||
|
||||
Reference in New Issue
Block a user