For what I have tried,
C-i in .inputrc seems to mean the same thing, whatever I bind to one is bound to the other. I know that originally, it was the same thing and that this behavior is kind of inherited from the old times but nowadays, apart from terminal emulators, all X applications makes the difference between a
C-i and a
So is there a way to run a terminal command ("complete" for example) when I press the
TAB key and run another command when I press
(the same question applies for
C-d, and all these control sequences that I would like to send by other means than their original binding and apply my own commands to these precious keybindings)
And by the way, if you could explain a little bit the process from a keypress to a shell interpretation that would help me understand. For now I understood that keyboard events are translated by Xmodmap, then by .inputrc and that the result is interpreted by the shell or something like this.
I am currently using Guake, and sometimes gnome-terminal, as terminal emulators.
After following the link proposed in a comment, it appears that the terminal emulator is the element of the chain that transforms
TAB keysym from X server into
C-i, and sends it to the bash shell because it doesn't understand such things as
ENTER and siblings. So configuring readline itself won't work as it comes after the terminal emulator and before the bash shell. The question could be then precised like this: How to configure my terminal emulator so it translates
C-m, etc, to different pairs of character sequences? Maybe make
ENTER send a new custom escape sequence, that could be mapped in .inputrc later to the original commands, and finally be able to use
C-m for other purposes. Or leave
ENTER and make
C-m send escape sequences instead.