AvaloniaUI / AvaloniaEdit

Avalonia-based text editor (port of AvalonEdit)
MIT License
702 stars 138 forks source link

Editor.TextArea.KeyDown event does not fire for tab #383

Closed BlackCoyote closed 8 months ago

BlackCoyote commented 8 months ago

When attempting to do TextEditor.TextArea.KeyDown += (s, e) => Console.WriteLine(e.Key); I will get a console message for just about any key, except for the tab key.

I'm hoping to get some help with this and have a way to respond to and handle tab key presses in the editor before they are written into the document.

Thanks!

BlackCoyote commented 8 months ago

found out that the key tab gets consumed much higher along the chain already in avalonia, got around it with textBox.AddHandler(KeyDownEvent, OnKeyDown, RoutingStrategies.Tunnel); sorry!