From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id C619F385EC56 for ; Fri, 4 Jun 2021 18:14:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C619F385EC56 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 154IDxMN022142 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 4 Jun 2021 14:14:04 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 154IDxMN022142 Received: from [10.0.0.11] (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 291341E54D; Fri, 4 Jun 2021 14:13:59 -0400 (EDT) Subject: Re: [PATCHv3 1/2] Initial TUI mouse support To: Pedro Alves , Hannes Domani , Hannes Domani via Gdb-patches , Tom Tromey , Joel Brobecker References: <20210603151453.15248-1-ssbssa.ref@yahoo.de> <20210603151453.15248-1-ssbssa@yahoo.de> <87r1hhoi03.fsf@tromey.com> <1760297979.5212997.1622816480782@mail.yahoo.com> <0936428e-80c4-c192-cdfd-817ff9bcfab0@palves.net> From: Simon Marchi Message-ID: <45415d6f-45f8-c709-5a21-dd2b02e724f3@polymtl.ca> Date: Fri, 4 Jun 2021 14:13:58 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <0936428e-80c4-c192-cdfd-817ff9bcfab0@palves.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Fri, 4 Jun 2021 18:13:59 +0000 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jun 2021 18:14:18 -0000 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