Search code examples
keyboard-shortcutslldbkey-bindingskeymapping

Key mapping in LLDB


Is there any way to specify key mappings in LLDB? Similar to Key mapping in GDB.


Solution

  • Turn out that LLDB is using libedit (a.k.a. Editline) similar to GDB using GNU Readline. So instead of ~/.inputrc we use ~/.editrc. I can’t find the official manual, but Debian manual page editrc(5) and editline(7) is helpful here. Example configuration:

    bind "\e[5~" ed-search-prev-history # PgUp
    bind "\e[6~" ed-search-next-history # PgDn