From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 02XrB9RKxmACJgAAWB0awg (envelope-from ) for ; Sun, 13 Jun 2021 14:13:40 -0400 Received: by simark.ca (Postfix, from userid 112) id 116381F163; Sun, 13 Jun 2021 14:13:40 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=MAILING_LIST_MULTI, RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 49B761E01F for ; Sun, 13 Jun 2021 14:13:39 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D827A388E81D for ; Sun, 13 Jun 2021 18:13:38 +0000 (GMT) Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by sourceware.org (Postfix) with ESMTPS id 85AB0388C01A for ; Sun, 13 Jun 2021 18:13:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 85AB0388C01A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f47.google.com with SMTP id q5so11891704wrm.1 for ; Sun, 13 Jun 2021 11:13:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=LJQ/2E57YWQtcFmtn8SpQBFcuDoWosMCCXNQfWcQIqc=; b=jQcKgVmuerqQUYI46JyYf2jLhNQ9kbdk6SLkbZwIccfWNfkuQOkMi1TqvGjsTDhGTp 0ShLfJZm9rkvEBhha6gQt1+TOwtd/QGHtEOtQ15e792Z3HMlTxwg73OY3d9WY2A3+HGX DBLHQ8YtLxsw5IfPeJ8/GMLejsv2DL02WB4zfdzotvqs0fIc3EmZI+K9DsyjfarZqqrP RHg83qjWNEr3sKMniW5RxUTWuDLAca9qSrZK1F+FZsq+G49OFeSy+PttU/6jRovLMtTi OzUkMmZ0U4wOWk86BEBE+mLlUUao91huO6hblqeIBoUTqADRjpWMhxZySPWRATHqcvFo GZbw== X-Gm-Message-State: AOAM533Cp4oW5lGBppIO4/f+G46tJnbQU4k+PvntaUcjGsL9CEE9EVmo BZYDN8A46jzBcVvLJu51dMz/mdwgIVJXIg== X-Google-Smtp-Source: ABdhPJwuT0H2YoiUETc6/lvqW3xvTg+nnSvi6UujjOINdnVDx92ZN/INRRglM9NEsFBS5ltywcFi8w== X-Received: by 2002:a5d:648b:: with SMTP id o11mr14844665wri.238.1623608006647; Sun, 13 Jun 2021 11:13:26 -0700 (PDT) Received: from ?IPv6:2001:8a0:f932:6a00:6b6e:c7b6:c5a7:aac3? ([2001:8a0:f932:6a00:6b6e:c7b6:c5a7:aac3]) by smtp.gmail.com with ESMTPSA id n7sm16840211wmq.37.2021.06.13.11.13.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 13 Jun 2021 11:13:25 -0700 (PDT) Subject: Re: [PATCH v2] Make the TUI command window support the mouse From: Pedro Alves To: Eli Zaretskii 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> <877dj9o4ch.fsf@tromey.com> <3facd73a-bfea-d46c-85a7-101ea893998f@palves.net> <8cfc78b7-ecdc-b435-5c1f-f027c8704f9e@palves.net> <1231900744.5510610.1622904017896@mail.yahoo.com> <87wnr1h80t.fsf@tromey.com> <287323544.8784317.1623409369460@mail.yahoo.com> <1761936332.9225994.1623501145444@mail.yahoo.com> <6afbe909-91d6-af32-d496-ca112dcfb43a@palves.net> <455337ea-65c3-42b5-0ec0-3c85b85ba054@palves.net> <83o8ca6oii.fsf@gnu.org> <3fd0ca96-28a8-b909-1bf2-033dbc00548a@palves.net> <838s3d7id2.fsf@gnu.org> Message-ID: Date: Sun, 13 Jun 2021 19:13:24 +0100 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: <838s3d7id2.fsf@gnu.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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: , Cc: tom@tromey.com, gdb-patches@sourceware.org, brobecker@adacore.com Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 2021-06-13 7:02 p.m., Eli Zaretskii wrote: >> From: Pedro Alves >> Cc: ssbssa@yahoo.de, gdb-patches@sourceware.org, tom@tromey.com, >> brobecker@adacore.com >> Date: Sun, 13 Jun 2021 18:29:57 +0100 >> >>> Maybe I'm missing something, but what about MS-Windows, where the >>> cursor motion keys don't (AFAIK) generate escape sequences? >> >> AFAICT, readline processes the escape sequences we're passing it anyhow, >> since it unconditionally registers/binds them. It seems to be working for >> Hannes. > > AFAIR, Hannes uses PDCurses, not ncurses, and I don't know what that > means for this particular issue. I didn't try building GDB after > these changes, but if someone succeeded building with ncurses and > running this code on Windows, then I'm happy, of course. > Note we're feeding readline the escape sequences when it reads input (which ends up in a callback in the tui to return the next character out of stdin), not expecting to see those escape sequences directly out of stdin. I don't think the curses library readline is linked with will make a difference, since it's readline that processes the escape codes we feed it, not the curses library. readline uses the curses library as a way to access termcap (if linked that way), in order to bind _other_ escape sequences. The sequences we're passing to readline are always bound by readline without consulting termcap, they're hardcoded as in "readline always recognizes these escape sequences". It won't hurt to test it, of course. Pedro Alves