From 26ae446fd839b3d31237573042e33ab198f57746 Mon Sep 17 00:00:00 2001 From: Evgeny Gorbovoy Date: Sun, 15 Dec 2024 00:33:57 +0100 Subject: [PATCH] ALT+symbol works on linux --- src/Consolonia.PlatformSupport/CursesConsole.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Consolonia.PlatformSupport/CursesConsole.cs b/src/Consolonia.PlatformSupport/CursesConsole.cs index a11c25e2..e5281f74 100644 --- a/src/Consolonia.PlatformSupport/CursesConsole.cs +++ b/src/Consolonia.PlatformSupport/CursesConsole.cs @@ -394,9 +394,12 @@ private void RaiseKeyPressInternal(Key key) { int keyValue = (int)key; RawInputModifiers modifiers = KeyModifiersFlagTranslator.Translate(key); + + key = key & ~Key.CtrlMask & ~Key.ShiftMask & ~Key.AltMask; + char character; ConsoleKey consoleKey = - KeyFlagTranslator.Translate(key & ~Key.CtrlMask & ~Key.ShiftMask & ~Key.AltMask, true); + KeyFlagTranslator.Translate(key, true); // ReSharper disable once SwitchStatementMissingSomeEnumCasesNoDefault switch (consoleKey)