Re: [PATCHv3 1/2] Initial TUI mouse support

Simon Marchi via Gdb-patches
2021-06-04T18:14:36Z

On 2021-06-04 12:29 p.m., Pedro Alves wrote:
> The trouble is that now pressing anywhere on the screen with the mouse just results in
> weird characters being printed on the command line window (probably uninterpreted control
> sequences). That even prevents me from selecting text (something I do often) -- I wanted to do
> that to paste the results here. I even tried suspending GDB with ^Z to then copy the text, but
> that still leaves the mouse messed up. See this screenshot:
>
> https://i.imgur.com/bO7FKDO.png
>
> This was on Ubuntu 20.04.

Obviously the printing random characters is bad. But it's possible that
the not being able to select text is normal, as the application (GDB)
now supports mouse events. In some terminal emulators, you can press
shift while you click to say "I really want to select the display
characters, not send mouse events to the program".

It's the same with other TUI apps for me:

- tmux (with "set -g mouse on" in ~/.tmux.conf)
- tig (I don't remember if anything is needed to enable mouse support)
- weechat (I don't remember if anything is needed to enable mouse
support)

In some of these programs, mouse support is disabled by default and you
have to use some setting to enable it. So by default, standard
selection would work. But if you enable mouse suport, then you have to
use shift+click to select.

Simon