This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Modifying keymap for TUI mode


.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 <ofircohenn@gmail.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
> 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 <midenok@gmail.com> wrote:
>>
>> Is it possible to modify keymap for TUI mode? I want to assign key
>> bindings for commands 'si' and 'ni' (step one instruction).
>
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]