Re: TUI single key mode: how to customize a key?
Luis Machado <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
On 10/25/19 11:19 AM, Tom Tromey wrote: >>>>>> "Luis" == Luis Machado <[email protected]> writes: > > Luis> No. Unfortunately the keys are hardcoded in gdb/tui/tui.c: > > Luis> static const struct tui_char_command tui_commands[] = { > Luis> { 'c', "continue" }, > Luis> { 'd', "down" }, > Luis> { 'f', "finish" }, > Luis> { 'n', "next" }, > Luis> { 'o', "nexti" }, > Luis> { 'r', "run" }, > Luis> { 's', "step" }, > Luis> { 'i', "stepi" }, > Luis> { 'u', "up" }, > Luis> { 'v', "info locals" }, > Luis> { 'w', "where" }, > Luis> { 0, 0 }, > Luis> }; > > Luis> I don't see a problem with making those configurable. Feel free to > Luis> send a patch for it or a design idea so we can make this work. > > Actually, I implemented this a short time ago. > You have to use a gdb that is built against Readline 8.0. > See: > > commit 11061048d1fed4465b0e62eb3c14dabf0beab59b > Author: Tom Tromey <[email protected]> > Date: Tue Sep 10 17:25:35 2019 -0600 > > Give a name to the TUI SingleKey keymap > > Readline 8.0 has a feature that lets an application name a keymap. > This in turn makes it simpler for users to bind keys in keymaps in > their .inputrc. > > This patch gives a name to the TUI SingleKey keymap, so that > additional bindings can be made there. For example: > > $if gdb > set keymap SingleKey > "X": "echo hello\\n\n" > $endif > > Tom > Ah, great! I somehow missed that very useful change.