Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SHIFT+END on Linux WSL generates an escape sequence #18

Open
xoofx opened this issue Dec 4, 2020 · 0 comments
Open

SHIFT+END on Linux WSL generates an escape sequence #18

xoofx opened this issue Dec 4, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@xoofx
Copy link
Owner

xoofx commented Dec 4, 2020

When pressing SHIFT+END with the following program:

using System;

namespace TestConsole
{
    class Program
    {
        static void Main(string[] args)
        {
            // Console.TreatControlCAsInput = true;
            while (true)
            {
                var key = Console.ReadKey(true);
                Console.WriteLine($"Key: {key.Key} Modifiers: {key.Modifiers} Char: {(key.KeyChar < ' ' || (int)key.KeyChar >= 126 ? "0x" + ((int)key.KeyChar).ToString("x2") : key.KeyChar.ToString())}");
                if (key.Key == ConsoleKey.C && (key.Modifiers & ConsoleModifiers.Control) != 0)
                {
                    break;
                }
            }
        }
    }
}

It generates the following sequence on Linux:

Key: Escape Modifiers: 0 Char: 0x1b
Key: D1 Modifiers: 0 Char: 1
Key: 0 Modifiers: 0 Char: ;
Key: D2 Modifiers: 0 Char: 2
Key: F Modifiers: Shift Char: F

instead of generating the following on Windows:

Key: End Modifiers: Shift Char: 0x00

In kalk, it's breaking the start selection + move cursor to end, while SHIFT+HOME is working just fine.

So it's either a bug in .NET or in WSL. I haven't checked this in a VM/real Linux so see how it behaves...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant