Skip to content

Commit 0ab298b

Browse files
committed
Fix Init_KeyBindings_Are_Not_Reset unit test failing
1 parent 4f18bec commit 0ab298b

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

Terminal.Gui/App/Keyboard/KeyboardImpl.cs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,24 @@ public void Dispose ()
6969
Application.PrevTabKeyChanged -= OnPrevTabKeyChanged;
7070
}
7171

72+
private IApplication? _app;
73+
7274
/// <inheritdoc/>
73-
public IApplication? App { get; set; }
75+
public IApplication? App
76+
{
77+
get => _app;
78+
set
79+
{
80+
_app = value;
81+
82+
_quitKey = _app?.Keyboard.QuitKey ?? Key.Esc;
83+
_arrangeKey = _app?.Keyboard.ArrangeKey ?? Key.F5.WithCtrl;
84+
_nextTabGroupKey = _app?.Keyboard.NextTabGroupKey ?? Key.F6;
85+
_nextTabKey = _app?.Keyboard.NextTabKey ?? Key.Tab;
86+
_prevTabGroupKey = _app?.Keyboard.PrevTabGroupKey ?? Key.F6.WithShift;
87+
_prevTabKey = _app?.Keyboard.PrevTabKey ?? Key.Tab.WithShift;
88+
}
89+
}
7490

7591
/// <inheritdoc/>
7692
public KeyBindings KeyBindings { get; internal set; } = new (null);

0 commit comments

Comments
 (0)