This is the mail archive of the
mailing list for the GDB project.
Re: Modifying keymap for TUI mode
- From: Aleksey Midenkov <midenok at gmail dot com>
- To: Ofir Cohen <ofircohenn at gmail dot com>
- Cc: "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Mon, 2 Feb 2015 15:54:59 +0300
- Subject: Re: Modifying keymap for TUI mode
- Authentication-results: sourceware.org; auth=none
- References: <CAF8BazB2+_5AFj4AcZwkb_rGYzN8CrfUD78v7JxvhFrLLawYAQ at mail dot gmail dot com> <CAHOBVAdVg2k4k6Q5UnwLT79zKa3P7xvOQEEQit5qtWM9RbtOZA at mail dot gmail dot com> <CAF8BazBbRp_67RkiF_P3YD=TdaHBZg6Qk58Dymqi1DA8k26NLA at mail dot gmail dot com> <CAHOBVAeq7qNwWBuYQ_s2dyqtJexUj8zEMfU6gWCtBMXkg2oUfA at mail dot gmail dot com>
On Mon, Feb 2, 2015 at 3:45 PM, Ofir Cohen <email@example.com> wrote:
>> 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.
AFAIK, GDB loads specific map for TUI single-key mode. As far as
documentation says so. My question was -- is it possible to overload
this map? At least it is evident that such possibility is expected.
There is no need to mention the alternative of modifying source code.
> On 2 February 2015 at 14:40, Aleksey Midenkov <firstname.lastname@example.org> 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 <email@example.com> 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
>>> 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
>>> 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.
>>> Ofir Cohen
>>> On 30 January 2015 at 12:11, Aleksey Midenkov <firstname.lastname@example.org> wrote:
>>>> Is it possible to modify keymap for TUI mode? I want to assign key
>>>> bindings for commands 'si' and 'ni' (step one instruction).