lemunozm / ruscii

Terminal graphics engine: build your games in the terminal!
Apache License 2.0
171 stars 15 forks source link

keyboard not working #41

Closed Randommist closed 1 year ago

Randommist commented 1 year ago

The program does not respond to key presses. I used the code from the example, and also ran the examples, but there is no reaction to pressing the Esc key or other. Keyboard layout English

lemunozm commented 1 year ago

Hi @Randommist, what`s your operative system?

Randommist commented 1 year ago

Arch Linux

lemunozm commented 1 year ago

You should have installed x11 libraries for your Arch Linux and run the terminal in a GUI environment, not from a TTY. If this is the case, it should work, if not, I'm a little bit lost.

Randommist commented 1 year ago

I have the libx11 package from pacman installed. What does it mean to run the terminal in a GUI environment? I use "cargo run --example pong". Also i use wayland

lemunozm commented 1 year ago

In Linux, you can run a TTY terminal without any graphic environment (in your case Wayland). ruscii doesn't work there. To get the "key release" event ruscii check the keyboard directly from the graphic environment.

Then, I do not know what can be the issue. The underlying crate to get the keyboard input is device_query. The next step should be to test if that crate works fine in your OS.

Randommist commented 1 year ago

crate device_query on linux only works with X11