From 31cef0b54ffd22d3e565aa55d4e7e006e019e8d8 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Fri, 21 Oct 2022 22:10:24 +0100 Subject: [PATCH] basic non-ime text input. --- src/Web/Avalonia.Web/AvaloniaView.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Web/Avalonia.Web/AvaloniaView.cs b/src/Web/Avalonia.Web/AvaloniaView.cs index 12d31258b5..9d7a629836 100644 --- a/src/Web/Avalonia.Web/AvaloniaView.cs +++ b/src/Web/Avalonia.Web/AvaloniaView.cs @@ -254,7 +254,14 @@ namespace Avalonia.Web private bool OnKeyDown (string code, string key, int modifier) { - return _topLevelImpl.RawKeyboardEvent(RawKeyEventType.KeyDown, code, key, (RawInputModifiers)modifier); + var handled = _topLevelImpl.RawKeyboardEvent(RawKeyEventType.KeyDown, code, key, (RawInputModifiers)modifier); + + if (!handled) + { + handled = _topLevelImpl.RawTextEvent(key); + } + + return handled; } private bool OnKeyUp(string code, string key, int modifier)