From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21159 invoked by alias); 2 Jan 2015 00:32:34 -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 21143 invoked by uid 89); 2 Jan 2015 00:32:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f177.google.com Received: from mail-wi0-f177.google.com (HELO mail-wi0-f177.google.com) (209.85.212.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 02 Jan 2015 00:32:31 +0000 Received: by mail-wi0-f177.google.com with SMTP id l15so27168559wiw.4 for ; Thu, 01 Jan 2015 16:32:28 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.194.61.18 with SMTP id l18mr145839293wjr.42.1420158748278; Thu, 01 Jan 2015 16:32:28 -0800 (PST) Received: by 10.194.62.236 with HTTP; Thu, 1 Jan 2015 16:32:28 -0800 (PST) In-Reply-To: <83d26ybcap.fsf@gnu.org> References: <1158788672.3333170.1420122368468.JavaMail.yahoo@jws11107.mail.ir2.yahoo.com> <83lhlmbj0v.fsf@gnu.org> <83h9wabgfu.fsf@gnu.org> <9E85FD9B-532C-46CA-B658-5EC0E4A49E5C@oarcorp.com> <83fvbubesd.fsf@gnu.org> <83d26ybcap.fsf@gnu.org> Date: Fri, 02 Jan 2015 00:32:00 -0000 Message-ID: Subject: Re: building gdb with TUI support on Windows From: Ofir Cohen To: Eli Zaretskii , "gdb@sourceware.org" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-01/txt/msg00009.txt.bz2 Hi Eli, Thank you for your response. Retrieving the key sequence is trivial indeed. I have submitted a bug for this: Bug 17774 - gdb on Windows TUI mode: arrow keys do not work https://sourceware.org/bugzilla/show_bug.cgi?id=17774 Once you get a reply from the ncurses mailing list, I would appreciate if you could send a notification to this mail thread, as well as update the bug so we could track and fix this. The wgetch() not returning is a blocker for the fix (at least for PDCurses), but sure what happens with ncurses. Once we get the curses fix for windows, and/or the key bindings settings for readline, we could upstream the fix. I am really pleased with thee responsiveness of you and Hannes, which allowed me to get it working and save lots of time, thanks again. - Ofir Cohen On 1 January 2015 at 20:12, Eli Zaretskii wrote: >> Date: Thu, 1 Jan 2015 19:31:43 +0200 >> From: Ofir Cohen >> >> Are these codes/magic numbers OS/console-specific? >> e.g. "\340\163": backward-word # Ctrl-left > > Those are the sequences produced by the Windows console when you press > those keys. > >> Could you please provide pointers that map keyboard keys to codes? > > I don't have the full table. I produced these few by setting a > breakpoint in rl_getc (a function in Readline which reads the keys), > and printing what it reads when I press a key. > > It is also easy to write a simple program that will display the > sequence given a keypress. > > I'm quite sure you can find the information floating around, though. > This page looks promising: > > http://www.quadibloc.com/comp/scan.htm > >> As this might get rejected / deemed meaningless to the maintainers, or >> take a lot >> of time, I think it would be nice if we could: >> >> 1. Have next releases of gdb packaged with a sample .inputrc file >> e.g. ".windows_console_samle_inputrc" >> >> that provides the most commonly needed/used key-bindings. >> >> 2. Provide a hint about this file in the README file / somewhere obvious. >> >> After all, I believe I'm not the only keyboard junkie in the world ;-). > > But everyone uses Google ;-) So finding this discussion will be easy. > > The problem with providing a sample .inputrc with GDB is that this > file is used not just by GDB, but by any application that uses the > Readline library.