File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -7,10 +7,10 @@ namespace Terminal.Gui;
7
7
/// <seealso cref="Application.KeyBindings"/>
8
8
/// <seealso cref="View.KeyBindings"/>
9
9
/// <seealso cref="Command"/>
10
- public class KeyBindings
10
+ public class KeyBindings : Bindings < Key , KeyBinding >
11
11
{
12
12
/// <summary>Initializes a new instance bound to <paramref name="target"/>.</summary>
13
- public KeyBindings ( View ? target ) { Target = target ; }
13
+ public KeyBindings ( View ? target ) : base ( ( commands , key ) => new KeyBinding ( commands ) ) { Target = target ; }
14
14
15
15
/// <summary>Adds a <see cref="KeyBinding"/> to the collection.</summary>
16
16
/// <param name="key"></param>
Original file line number Diff line number Diff line change 3
3
4
4
namespace Terminal . Gui ;
5
5
6
- public abstract class Bindings < TKey , TBind > where TKey : Enum where TBind : IInputBinding , new ( )
6
+ public abstract class Bindings < TKey , TBind > where TBind : IInputBinding , new ( )
7
7
{
8
8
protected readonly Dictionary < TKey , TBind > _bindings = new ( ) ;
9
9
private readonly Func < Command [ ] , TKey , TBind > _constructBinding ;
You can’t perform that action at this time.
0 commit comments