From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21502 invoked by alias); 1 Jan 2015 15:14:11 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 21486 invoked by uid 89); 1 Jan 2015 15:14:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-we0-f182.google.com Received: from mail-we0-f182.google.com (HELO mail-we0-f182.google.com) (74.125.82.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 01 Jan 2015 15:14:09 +0000 Received: by mail-we0-f182.google.com with SMTP id w62so3520288wes.27 for ; Thu, 01 Jan 2015 07:14:05 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.180.104.9 with SMTP id ga9mr127049052wib.9.1420125245693; Thu, 01 Jan 2015 07:14:05 -0800 (PST) Received: by 10.194.165.106 with HTTP; Thu, 1 Jan 2015 07:14:05 -0800 (PST) In-Reply-To: <1158788672.3333170.1420122368468.JavaMail.yahoo@jws11107.mail.ir2.yahoo.com> References: <1158788672.3333170.1420122368468.JavaMail.yahoo@jws11107.mail.ir2.yahoo.com> Date: Thu, 01 Jan 2015 15:14:00 -0000 Message-ID: Subject: Re: building gdb with TUI support on Windows From: Ofir Cohen To: Hannes Domani Cc: "gdb@sourceware.org" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-01/txt/msg00002.txt.bz2 Hi Hannes, You are literally t-h-e_ b-e-s-t! Thanks a lot :-)!!!!! Ofir On 1 January 2015 at 16:26, Hannes Domani wrote: > Ofir Cohen 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) > {