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

Mouse input in the Linux console #1468

Open
devzero0 opened this issue Jan 2, 2023 · 4 comments
Open

Mouse input in the Linux console #1468

devzero0 opened this issue Jan 2, 2023 · 4 comments

Comments

@devzero0
Copy link

devzero0 commented Jan 2, 2023

First off, amazing library and thanks for creating this.

Have you checked closed issues? https://github.com/Textualize/textual/issues?q=is%3Aissue+is%3Aclosed
Yes

Please give a brief but clear explanation of the issue.
Can Textual handle mouse input in the Linux console, i.e. without X Windows? I tried using gpm but mouse input is ignored.

What Operating System are you running on?
Debian Bullseye 32-bit (Raspbian) on a Raspberry Pi 4

Feel free to add screenshots and/or videos. These can be very helpful!

If you can, include a complete working example that demonstrates the bug. Check it can run without modifications.
I'm testing with the sample app python -m textual

@github-actions
Copy link

github-actions bot commented Jan 2, 2023

We found the following entry in the FAQ which you may find helpful:

Feel free to close this issue if you found an answer in the FAQ. Otherwise, please give us a little time to review.

This is an automated reply, generated by FAQtory

@willmcgugan
Copy link
Collaborator

Glad you like Textual.

It should be possible to make Textual work under the Linux console. It may be that gpm uses a different escape mechanism for mouse coords.

We will look in to it!

@devzero0
Copy link
Author

devzero0 commented Jan 4, 2023

BTW I stumbled upon a workaround by using LCXterm which, among other things, converts GPM mouse events into the X10 mouse protocol.

@trav-c
Copy link
Contributor

trav-c commented Jul 1, 2023

From what I've been able to find gpm does not provide mouse events via escape codes at all, but rather requires applications to explicitly connect to the gpm daemon via a unix domain socket and read the mouse events from there.

See

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants