From 9cd001919a22816094b6f000064d3816bec28820 Mon Sep 17 00:00:00 2001 From: Michele Scandura Date: Fri, 24 Sep 2021 16:54:44 +0100 Subject: [PATCH] fixing keyboard input --- Sledgemapper/Sledgemapper.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Sledgemapper/Sledgemapper.cs b/Sledgemapper/Sledgemapper.cs index 00d7cf8..57e8de1 100644 --- a/Sledgemapper/Sledgemapper.cs +++ b/Sledgemapper/Sledgemapper.cs @@ -137,7 +137,16 @@ namespace Sledgemapper _outlineShader = Content.Load("shaders/OutlineShader"); MyraEnvironment.Game = this; ResetRenderTarget(); + // Inform Myra that external text input is available + // So it stops translating Keys to chars + _desktop.HasExternalTextInput = true; + // Provide that text input + Window.TextInput += (s, a) => + { + _desktop.OnChar(a.Character); + + }; _mainWidget = new MainWidget(_communicationManager, _messenger, Window); _communicationManager.CheckLogin();