From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18167 invoked by alias); 2 Feb 2015 12:45:38 -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 18157 invoked by uid 89); 2 Feb 2015 12:45:38 -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-f174.google.com Received: from mail-wi0-f174.google.com (HELO mail-wi0-f174.google.com) (209.85.212.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 02 Feb 2015 12:45:36 +0000 Received: by mail-wi0-f174.google.com with SMTP id n3so16497176wiv.1 for ; Mon, 02 Feb 2015 04:45:33 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.180.198.148 with SMTP id jc20mr18771654wic.67.1422881133569; Mon, 02 Feb 2015 04:45:33 -0800 (PST) Received: by 10.194.62.236 with HTTP; Mon, 2 Feb 2015 04:45:33 -0800 (PST) In-Reply-To: References: Date: Mon, 02 Feb 2015 12:45:00 -0000 Message-ID: Subject: Re: Modifying keymap for TUI mode From: Ofir Cohen To: Aleksey Midenkov Cc: "gdb@sourceware.org" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-02/txt/msg00002.txt.bz2 > initrc or .inputrc? .inputrc, my bad. > how I specify their application to TUI single-key mode? You don't, I don't think there's a way to separate these and they should appear for both. AFAIK if you really want to set TUI specific keys you'll probably need to hack the TUI sources. Regards, Ofir On 2 February 2015 at 14:40, Aleksey Midenkov wrote: > .initrc or .inputrc? If I add them to global .inputrc how I specify > their application to TUI single-key mode? > > On Fri, Jan 30, 2015 at 9:37 PM, Ofir Cohen wrote: >> It's possible, but for some of the key combinations you might need to >> unset the focus of the TUI window first >> (e.g. arrow keys have different meaning, when source window is in focus, up >> arrow navigates >> one line in source code upwards, while up means history lookup when the CLI >> gdb prompt is in focus). >> >> In order to unset the focus, do: Ctrl+x, o. >> For more information on key combinations in TUI mode, follow >> https://sourceware.org/gdb/onlinedocs/gdb/TUI-Keys.html >> >> In order to introduce new key bindings, you have two options: >> 1) Add them to ~/.initrc, for readline to digest (when gdb is loaded, >> regardless of TUI/non-TUI mode) >> 2) Modify via source (readline/readline.c IIRC), just look around in the >> code >> you'll find the calls to readline functions to bind keys. >> This option is less preferable, but it works too. >> >> If after adding the new key bindings and starting gdb nothing happens, >> try to toggle between TUI and non-TUI mode via: Ctrl+x, a >> Also, you could launch gdb once with '--tui', and once w/o, and determine >> whether it's TUI related or not. >> >> Regards, >> Ofir Cohen >> >> On 30 January 2015 at 12:11, Aleksey Midenkov wrote: >>> >>> Is it possible to modify keymap for TUI mode? I want to assign key >>> bindings for commands 'si' and 'ni' (step one instruction). >> >>