On Fri, Feb 13, 2026 at 03:43:03AM +0100, Vincent Lefevre wrote: > On 2026-02-12 19:34:05 -0500, Thomas Dickey wrote: > > But with xterm tweaked to omit button-release responses to mimic > > the behavior that Vincent described, I don't see any problems. > > Termux does generate button-release escape sequences, as shown > by vttest 11 8 5, then 4 or 7. For instance: > > <27> [ M <32> X B <27> [ M # X B > > But it seems that ncurses 6.6 does not handle it correctly.
...the ncurses trace could show that. > Could you tweak xterm to be able to support long press as an event, > for instance? I mean, for instance, a long press would trigger a > menu in Xterm instead of being sent to the application running in > the terminal, i.e. no escape sequences should be generated. This > means that the button-press escape sequence must be sent just > before the button-release escape sequence (instead of when the > button was pressed). That would better emulate touchscreen, and > the Termux terminal in particular. There's different issues - I don't believe X11 has an event type comparable to long press, so the closest that I think I could get to what you're suggesting would be to move the code that sends the press-sequence right before the release-sequence. Someone suggested using the Android emulator to test this. That seems to work, which lets me see that termux doesn't identify itself properly (using copy/paste to pretend in its responses that it's xterm #320 -- not even close). I suppose it's possible for me to build ncurses in that environment, and see firsthand the debugging information. But ssh works well enough - attaching a trace which shows the reported bad mouse event. I'll continue on this during the week after doing some maintenance. -- Thomas E. Dickey <[email protected]> https://invisible-island.net
trace.gz
Description: application/gzip
signature.asc
Description: PGP signature
