Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii via Gdb-patches <gdb-patches@sourceware.org>
To: Pedro Alves <pedro@palves.net>
Cc: tom@tromey.com, gdb-patches@sourceware.org, brobecker@adacore.com
Subject: Re: [PATCH v2] Make the TUI command window support the mouse
Date: Sun, 13 Jun 2021 13:35:17 +0300	[thread overview]
Message-ID: <83o8ca6oii.fsf@gnu.org> (raw)
In-Reply-To: <455337ea-65c3-42b5-0ec0-3c85b85ba054@palves.net> (message from Pedro Alves on Sun, 13 Jun 2021 03:46:13 +0100)

> From: Pedro Alves <pedro@palves.net>
> Date: Sun, 13 Jun 2021 03:46:13 +0100
> Cc: Joel Brobecker <brobecker@adacore.com>
> 
> On 2021-06-12 7:08 p.m., Pedro Alves wrote:
> > On 2021-06-12 1:32 p.m., Hannes Domani wrote:
> 
> >> On the other hand, if keypad was enabled, couldn't we just forward readline
> >> the escape sequences for the arrow keys instead?
> > 
> > Yeah, to be honest I think that is likely a better approach and worth it of a
> > try -- my only concern is whether the escape sequences are standard enough
> > across terminals?  Maybe it's all covered by ANSI and it's all we need to care
> > about?  I thought of the other approach because that let's us not care about
> > specific sequences, other than the mouse sequence, which seemed pretty much
> > standard from looking around.  Also, it was run to write.  :-)
> > 
> 
> Alright, I gave that approach a go.  Below's a patch implementing that.  It
> works quite nicely here.  I tried it on konsole, xterm and rxvt.  Among those,
> rxvt uses different escape sequences for ctrl-up/ctrl-down/ctrl-left/ctrl-right,
> but it doesn't really matter -- I found that readline binds actions to
> different variants of escape sequences, so if we pick sequences readline always binds,
> it should always work.  See readline.c:bind_arrow_keys_internal.
> Despite that, for the standard ncurses keys below KEY_MAX, it's easier
> to use the corresponding lowercase key_foo variable, which I believe is
> filled in from termcap so should also always work, as readline also
> binds the key sequences termcap returns.

Maybe I'm missing something, but what about MS-Windows, where the
cursor motion keys don't (AFAIK) generate escape sequences?

  reply	other threads:[~2021-06-13 10:35 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210603151453.15248-1-ssbssa.ref@yahoo.de>
2021-06-03 15:14 ` [PATCHv3 1/2] Initial TUI mouse support Hannes Domani via Gdb-patches
2021-06-03 15:14   ` [PATCHv3 2/2] Forward mouse click to python TUI window Hannes Domani via Gdb-patches
2021-06-03 17:16     ` Eli Zaretskii via Gdb-patches
2021-06-04 13:52     ` Tom Tromey
2021-06-04 13:51   ` [PATCHv3 1/2] Initial TUI mouse support Tom Tromey
2021-06-04 14:21     ` Hannes Domani via Gdb-patches
2021-06-04 15:20       ` Pedro Alves
2021-06-04 16:06         ` Hannes Domani via Gdb-patches
2021-06-04 16:23           ` Pedro Alves
2021-06-04 18:59             ` Eli Zaretskii via Gdb-patches
2021-06-04 18:57           ` Eli Zaretskii via Gdb-patches
2021-06-04 16:29         ` Pedro Alves
2021-06-04 16:48           ` Hannes Domani via Gdb-patches
2021-06-04 18:05             ` Joel Brobecker
2021-06-04 18:13           ` Simon Marchi via Gdb-patches
2021-06-04 18:39             ` Joel Brobecker
2021-06-04 20:31             ` Pedro Alves
2021-06-04 20:43               ` Pedro Alves
2021-06-04 21:15               ` Hannes Domani via Gdb-patches
2021-06-04 22:19                 ` Pedro Alves
2021-06-10 18:44               ` Tom Tromey
2021-06-13 17:26                 ` Pedro Alves
2021-06-18 15:01                   ` Tom Tromey
2021-06-18 17:42                     ` Pedro Alves
2021-06-04 18:46           ` Tom Tromey
2021-06-04 20:54             ` Pedro Alves
2021-06-04 23:48               ` Pedro Alves
2021-06-05 14:40                 ` Hannes Domani via Gdb-patches
2021-06-06  5:46                   ` Eli Zaretskii via Gdb-patches
2021-06-10 18:46                   ` Tom Tromey
2021-06-11 11:02                     ` Hannes Domani via Gdb-patches
2021-06-12  2:41                       ` POC: Make the TUI command window support the mouse (Re: [PATCHv3 1/2] Initial TUI mouse support) Pedro Alves
2021-06-12 12:32                         ` Hannes Domani via Gdb-patches
2021-06-12 18:08                           ` Pedro Alves
2021-06-13  2:46                             ` [PATCH v2] Make the TUI command window support the mouse Pedro Alves
2021-06-13 10:35                               ` Eli Zaretskii via Gdb-patches [this message]
2021-06-13 17:29                                 ` Pedro Alves
2021-06-13 18:02                                   ` Eli Zaretskii via Gdb-patches
2021-06-13 18:13                                     ` Pedro Alves
2021-06-13 13:04                               ` Hannes Domani via Gdb-patches
2021-06-13 17:25                                 ` [PATCH v3] " Pedro Alves
2021-06-13 17:55                                   ` Hannes Domani via Gdb-patches
2021-06-13 17:59                                     ` Pedro Alves
2021-06-17 11:04                                       ` [PUSHED v4] " Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83o8ca6oii.fsf@gnu.org \
    --to=gdb-patches@sourceware.org \
    --cc=brobecker@adacore.com \
    --cc=eliz@gnu.org \
    --cc=pedro@palves.net \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox