picoe / Eto

Cross platform GUI framework for desktop and mobile applications in .NET
Other
3.53k stars 318 forks source link

Keyboard Input under Wayland #2565

Open davidscherf opened 9 months ago

davidscherf commented 9 months ago

I am getting keys from the keyboard using the event KeyUp of the window

This works fine on x11. But on Wayland the console that I started the test on types the letters, but the event gets nothing

Expected Behavior

Event KeyUp KeyDown gets the key pressed

Actual Behavior

Event is not fired

Steps to Reproduce the Problem

  1. Hook the event KeyUp to a method
  2. Run the code on a Wayland system
  3. Get no key input

Code that Demonstrates the Problem

private void MainWindow_KeyUp(object sender, KeyEventArgs e)
{
        Console.WriteLine("Key press");
}

Specifications

More information

Seems this issue affects running under sudo

error: XDG_RUNTIME_DIR is invalid or not set in the environment.

And since my app needs to run under sudo, I do not have a workaround, I tried setting XDG_RUNTIME_DIR to the same path as the logged in user but no luck.