TextField input = new TextField
{
X = 0,
Y = Pos.Bottom(chat) + 1,
Width = Dim.Fill(),
ColorScheme = new ColorScheme
{
Normal = Terminal.Gui.Attribute.Make(Color.Black, Color.White),
Focus = Terminal.Gui.Attribute.Make(Color.Black, Color.White),
},
};
input.KeyDown += Input_KeyDown;
static void Input_KeyDown(View.KeyEventEventArgs e)
{
// not called when I write to TextField
}
It's a bug. Do you have any fix? If you haven't I'll try to fixit.
I have not attempted to fix it myself.
That almost works but will now trigger key events even if View is not focused.
I wonder if View.HasFocus could be used for this...
Most helpful comment
I wonder if
View.HasFocuscould be used for this...