Bash readline supports conditional constructs which can be used to define language-specific key bindings in inputrc:

$ cat ~/.inputrc
# Bash key bindings
$if bash
  "\C-s":forward-search-history
  "\C-xl":clear-screen
  "\ee":"\C-k\C-uexit\n"
  "\eo":"\C-k\C-ugnome-terminal&\n"
  "\ep":"\C-k\C-u\e[A\n"
$endif

# Gdb key bindings
$if gdb
  "\ej":"focus next\n"
  "\ek":"focus prev\n"
  "\eq":"quit\n"
  "\eu":"winheight src -1\n"
  "\eU":"winheight src +1\n"
$endif

quite a nice feature.