I am trying to install some key sequence bindings but I have trouble. My shell is bash, my terminal is gnome-terminal, and my system is Ubuntu 14.04 in graphic mode. Edit : my keyboard is french azerty with the numeric pad and ctrl,fn,super,alt.
Edit: a bash guide, readline chapter
I want to add contol+alt+space, but this exact sequence does not work while similar other sequences work fine. My goal is to run shell-expand-line readline but i tried upcase-word to compare.
--Let's analyze my goal's installation effect.
This is my
~/.inputrc added (ctrl+meta+space):
"\e\C- ": shell-expand-line
This is the new result of
bind -p :
Of course I started a couple terminals, one before installation and one after every installation in order to compare thoroughly.
--Some experiments to ensure control+alt works in place of control+meta.
The system should emulate Meta with Alt and bash should emulate Meta with Escape, both using the byte '\033'. I tried both Alt and Esc to conclude it works fine. I tested some ctrl+meta+letter sequences to be sure.
By the way, the individual samples of Ctrl+Alt are simple : expanding an isolated tilde '~' (shell-expand-line) or changing case in random lowercase words (upcase-word) with ctrl+meta+e or ctrl+meta+v. Ctrl+meta+e is already binding to shell-expand-line so i just mixed the bindings with the useless ctrl+meta+v.
--Some more intricate observations...
I read '^@' illustrates 'NUL' character. Why this escape?
I tested xev and pressed ctrl+alt+space : the character reported is 'NUL' character.
I saw alt+space usually open the window menu of gnome-terminal while alt enables menus, of course without control key.
A conflict seems to come from the system, but I am a newbie. I just read most of the bash manual (especially readline chapter) and one forum advice about xev.
Is there more to say or to correct? Why the sequences are rewritten? How can I make my ctrl+alt+space work with bash and gnome-terminal ?
Edit : I found that '@' is transformed in 'NUL' because of a bitwise mask applied when escaping, but i do not see any reason why Alt+space gives 'NUL'.