public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Hannes Domani <ssbssa@yahoo.de>
Cc: gdb@sourceware.org
Subject: Re: building gdb with TUI support on Windows
Date: Thu, 01 Jan 2015 15:47:00 -0000	[thread overview]
Message-ID: <83lhlmbj0v.fsf@gnu.org> (raw)
In-Reply-To: <1158788672.3333170.1420122368468.JavaMail.yahoo@jws11107.mail.ir2.yahoo.com>

> Date: Thu, 1 Jan 2015 14:26:08 +0000 (UTC)
> From: Hannes Domani <ssbssa@yahoo.de>
> 
> Ofir Cohen <ofircohenn@gmail.com> schrieb am 22:12 Mittwoch, 31.Dezember 2014:
> > In DOS, "Ctrl + Arrow-Left" skips an entire word (like Alt+B/F on bash).
> > The key sequence of: Esc + b, or Esc + f, seems to accomplish that in gdb.
> > 
> > Do you have any idea how to make Ctrl+Left/Right to behave like Esc+b/f?
> > 
> > Do I need to intercept these control codes / keys in curses?
> 
> Add this to gdb:
> 
> --- a/readline/readline.c    2015-01-01 14:47:03.999708300 +0100
> +++ b/readline/readline.c    2015-01-01 14:47:11.399718700 +0100
> @@ -1163,6 +1163,9 @@
>     rl_bind_keyseq_if_unbound ("\340O", rl_end_of_line);
>     rl_bind_keyseq_if_unbound ("\340S", rl_delete);
>     rl_bind_keyseq_if_unbound ("\340R", rl_overwrite_mode);
> +
> +  rl_bind_keyseq_if_unbound ("\340s", rl_backward_word);  /* ctrl-left  */
> +  rl_bind_keyseq_if_unbound ("\340t", rl_forward_word);    /* ctrl-right */
> #endif
> 
>    _rl_keymap = xkeymap;
> 
> 
> 
> And this to pdcurses:
> 
> --- a/pdcurses/getch.c    2015-01-01 14:56:25.870495000 +0100
> +++ b/pdcurses/getch.c    2015-01-01 14:56:33.250505300 +0100
> @@ -272,6 +272,12 @@
>                   case KEY_IC:
>                       backhalf = 'R';
>                       break;
> +                case CTL_LEFT:
> +                    backhalf = 's';
> +                    break;
> +                case CTL_RIGHT:
> +                    backhalf = 't';
> +                    break;
>                   }
>                   if (backhalf)
>                   {

And the following magic in my ~/.inputrc does the same (and a bit
more) without any source-level changes:

  set convert-meta off
  "\340\163": backward-word               # Ctrl-left
  "\340\164": forward-word                # Ctrl-right
  "\340\223": kill-word                   # Ctrl-Delete
  "\340\165": kill-line                   # Ctrl-End

  parent reply	other threads:[~2015-01-01 15:47 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-26  0:13 Ofir Cohen
2014-12-26  8:04 ` Eli Zaretskii
2014-12-27 13:53   ` Ofir Cohen
     [not found]   ` <CAHOBVAdux2M9aRnkJh1hDm_9VCTD6kVzWkF2fjj84qy8UJuh7w@mail.gmail.com>
2014-12-27 14:13     ` Eli Zaretskii
2014-12-27 14:40       ` Hannes Domani
2014-12-27 18:32         ` Eli Zaretskii
2014-12-28 13:58           ` Hannes Domani
2014-12-28 16:41             ` Ofir Cohen
2014-12-28 17:09               ` Hannes Domani
2014-12-28 23:34                 ` Ofir Cohen
2014-12-29  0:41                   ` Hannes Domani
2014-12-29 15:28                     ` Ofir Cohen
     [not found]                       ` <946370725.2390231.1419869855237.JavaMail.yahoo@jws11110.mail.ir2.yahoo.com>
2014-12-29 16:20                         ` Hannes Domani
2014-12-30 19:15                       ` Hannes Domani
2014-12-30 20:10                         ` Ofir Cohen
2014-12-30 20:39                           ` Hannes Domani
2014-12-31 16:34                             ` Eli Zaretskii
2015-01-01 12:28                               ` Hannes Domani
2015-01-01 15:42                                 ` Eli Zaretskii
2014-12-31 21:12                             ` Ofir Cohen
2015-01-01 14:26                               ` Hannes Domani
2015-01-01 15:14                                 ` Ofir Cohen
2015-01-01 15:47                                 ` Eli Zaretskii [this message]
2015-01-01 16:33                                   ` Ofir Cohen
2015-01-01 16:42                                     ` Eli Zaretskii
2015-01-01 16:48                                       ` Joel Sherrill
2015-01-01 17:18                                         ` Eli Zaretskii
     [not found]                                           ` <CAHOBVAcF824319G6O_LfJBYAQP3M0-LbhAV_d=SrR6jM4=0k5w@mail.gmail.com>
     [not found]                                             ` <83d26ybcap.fsf@gnu.org>
2015-01-02  0:32                                               ` Ofir Cohen
2014-12-28 18:38         ` Sergio Durigan Junior
2014-12-29  2:43           ` Joel Brobecker
2014-12-29  3:15             ` Joel Sherrill
2014-12-29  3:21               ` Joel Brobecker

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=83lhlmbj0v.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb@sourceware.org \
    --cc=ssbssa@yahoo.de \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).