Reputation: 57923
Is there some way to forward a keystroke to the shell when using Shell mode? In particular, I sometimes want to use CTRL+\ to sigkill a process, but Emacs intercepts it
Another problem is that I sometimes want Tab to get forwarded to the shell to get default tab completion.
Upvotes: 4
Views: 213
Reputation: 96304
In general, M-x term
, or even better, M-x ansi-term
, give more complete emulators than M-x shell
. Once you are in term-mode you can get into char mode with C-c C-j
to interact with the terminal. Once you are in char mode, you should be able to use the terminal's tab completion and other terminal keyboard shortcuts. You can get back to the regular default line mode with C-c C-k
.
You can read more about the differences between these modes here
Upvotes: 3
Reputation: 385670
You can press Control-Q before any other key to treat that key literally. So, C-q C-\ or C-q TAB should do what you want.
Upvotes: 1