From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by sourceware.org (Postfix) with ESMTPS id 94D9F3857402 for ; Sun, 27 Jun 2021 17:44:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 94D9F3857402 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-wm1-f41.google.com with SMTP id u5-20020a7bc0450000b02901480e40338bso8484167wmc.1 for ; Sun, 27 Jun 2021 10:44:08 -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=FV4faieSlRhLPub3sTtjx11lO7DI602lpfdDR/gnqYs=; b=Z3c2ooNFbnzHP+NGxRPRvA1rrFPhfKRXaflgxi237jXFdcCtYlNjwZNJvOlFkcsWiQ DVSW0cTGgfehexxO83jT7B4l6LaBNzKEEgXHkftgFlFnkcrR/o4ghtzU4DAy2ue7pLvh bPXzTu00Prm2rycOmGJVwFRgwA3UMHZsSwq1creh0tbSryRIofsx6H49oG41c2RTaF+l Vg0tOcnhvCiIMu6oykfiWRUf0DhRKVkw3occV4wzJL25YrnVTiSvQkujQDScQ6do5F1G TSum5rtOqpbkn4bY4S5cN9TyDu1dboZjshFZDiQ6O9KURaOza5vvBSMX0rodflhsO9wH 0BvA== X-Gm-Message-State: AOAM5317NOnU0nm9XYfxUf1BqTkikdZ1pIq6FGSm1XF7436A7N7Z01f6 PWNPQjp0wtWXsO5CPXu1cvDSZzkTEYXgTQ== X-Google-Smtp-Source: ABdhPJwQ7swdESuqN6cb4pKcohCUGCs+MxWY8jb3TNhRNi47l2ME+eC6CouBFmP/qsk1/9/ULB/mPg== X-Received: by 2002:a05:600c:4e93:: with SMTP id f19mr16614271wmq.169.1624815846988; Sun, 27 Jun 2021 10:44:06 -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 f22sm11000738wmb.46.2021.06.27.10.44.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Jun 2021 10:44:05 -0700 (PDT) Subject: [PATCH] Document TUI improvements in the manual & NEWS (was: Re: [PATCH] Document TUI mouse support in the manual & NEWS) From: Pedro Alves To: Eli Zaretskii Cc: gdb-patches@sourceware.org References: <20210617122300.3471654-1-pedro@palves.net> <83sg1gzl38.fsf@gnu.org> <0bbdcd46-f4fd-0fd7-3957-492751e0ac9e@palves.net> <834kdvzlrz.fsf@gnu.org> Message-ID: Date: Sun, 27 Jun 2021 18:44:04 +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: <834kdvzlrz.fsf@gnu.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.1 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, PDS_OTHER_BAD_TLD, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, 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: Sun, 27 Jun 2021 17:44:10 -0000 Hi, On 2021-06-18 8:15 a.m., Eli Zaretskii wrote: >> From: Pedro Alves >> Cc: gdb-patches@sourceware.org >> Date: Thu, 17 Jun 2021 21:50:02 +0100 >> >> On 2021-06-17 2:17 p.m., Eli Zaretskii wrote: >>>> From: Pedro Alves >>>> Date: Thu, 17 Jun 2021 13:23:00 +0100 >>>> >>>> +On most terminals, pressing and holding the @key{SHIFT} key on your >>>> +keyboard temporarily disables the terminal's mouse protocol, and let's >>>> +you select/paste text with the mouse. ^^^^^ >>> >>> Typo: should be "lets". >>> >>> And I admit I'm confused by the above text: if one can select with the >>> mouse, why are we saying that "mouse protocol is disabled"? >> >> How about this then: >> >> "During normal operation, the TUI uses the terminal's mouse protocol >> and all mouse input is consumed by the TUI, which means that you >> cannot use the mouse to select/paste text, which is a terminal >> function, not a TUI function. On most terminals however, pressing and >> holding the @key{SHIFT} key on your keyboard temporarily disables the >> terminal's mouse protocol, which then let's you select/paste text with >> the mouse." > > AFAIU, what is missing here is the fact that "select/paste text with > the mouse" copies/pastes text to/from the _terminal_'s selection > buffer (as opposed to the GDB's TUI buffer). I think your original > text will be fine if you mention this explicitly. IOW, we need to say > that this copy/paste bypasses GDB and goes into the terminal's > text-selection functionality. How about this then? >From db9ff15e9b69bb46332a6b492886d5c95f727daf Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Fri, 4 Jun 2021 17:12:41 +0100 Subject: [PATCH] Document TUI improvements in the manual & NEWS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gdb/ChangeLog: yyyy-mm-dd Pedro Alves Hannes Domani * NEWS: Add new "TUI Improvements" section and mention mouse support and that unrecognized special keys are now passed to GDB. Mention Python Window.click in the Python improvements section. gdb/doc/ChangeLog: yyyy-mm-dd Pedro Alves * gdb.texinfo (TUI): : New node/section. Co-​authored-by: Hannes Domani Change-Id: I0d79a795d8ac561fd28cdc5184bff029ba28bc64 --- gdb/doc/gdb.texinfo | 18 ++++++++++++++++++ gdb/NEWS | 16 ++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index f1c3e7ba847..a16a3825ebb 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -28387,6 +28387,7 @@ enable} or @kbd{C-x C-a}. @xref{TUI Commands, ,TUI Commands}, and * TUI Overview:: TUI overview * TUI Keys:: TUI key bindings * TUI Single Key Mode:: TUI single key mode +* TUI Mouse Support:: TUI mouse support * TUI Commands:: TUI-specific commands * TUI Configuration:: TUI configuration variables @end menu @@ -28676,6 +28677,23 @@ If @value{GDBN} was built with Readline 8.0 or later, the TUI SingleKey keymap will be named @samp{SingleKey}. This can be used in @file{.inputrc} to add additional bindings to this keymap. +@node TUI Mouse Support +@section TUI Mouse Support +@cindex TUI mouse support + +If the curses library supports the mouse, the TUI supports mouse +actions. + +The mouse wheel scrolls the appropriate window under the mouse cursor. + +The TUI itself does not directly support copying/pasting with the +mouse. However, on Unix terminals, you can typically press and hold +the @key{SHIFT} key on your keyboard to temporarily bypass +@value{GDBN}'s TUI and access the terminal's native mouse copy/paste +functionality (commonly, click-drag-release or double-click to select +text, middle-click to paste). This copy/paste works with the +terminal's selection buffer, as opposed to the TUI's buffer. + @node TUI Commands @section TUI-specific Commands @cindex TUI commands diff --git a/gdb/NEWS b/gdb/NEWS index 7f3ed4f02f0..1e474eca90a 100644 --- a/gdb/NEWS +++ b/gdb/NEWS @@ -108,6 +108,18 @@ registers of a target. The precise requirements of this register feature are documented in the GDB manual. +* TUI improvements + + ** TUI windows now support mouse actions. The mouse wheel scrolls + the appropriate window. + + ** Key combinations that do not have a specific action on the + focused window are passed to GDB. For example, you now can use + Ctrl-Left/Ctrl-Right to move between words in the command window + regardless of which window is in focus. Previously you would + need to focus on the command window for such key combinations to + work. + * New commands set debug event-loop @@ -266,6 +278,10 @@ QMemTags gdb.BreakpointEvent rather than a gdb.StopEvent. The gdb.Breakpoint attached to the event will have type BP_CATCHPOINT. + ** Python TUI windows can now receive mouse click events. If the + Window object implements the click method, it is called for each + mouse click event in this window. + *** Changes in GDB 10 * There are new feature names for ARC targets: "org.gnu.gdb.arc.core" base-commit: e0fd25e4859e1610395b93ff6f05d67c13220cf6 -- 2.26.2