How do I use the Control key while using Eshell to send that command to the remote server -- e.g., when creating a cat file and I need to press Control+d to save and exit, or when using Nano edit and I need to exit with Control+x.
1 Answer
For the specific case of C-d, you can use C-c C-d, which is bound to eshell-send-eof-to-process
. Otherwise, use C-q for quoted-insert
, to force the following character to be inserted into the buffer even if it has a key binding in Emacs.
C-q C-d
?C-q
is for "raw" insert.^D
. In this particular case, however, I am hoping to send a command tocat
that says -- "I'm done so please save and exit." On a regular terminal,C-d
does just that. Emacs uses the Control key as a modifier, so I'm not sure how to temporarily disable the behavior ofC-d
or find another means of exiting out of cat. The same problem exists for other programs running in the terminal through Emacs (e.g., Eshell) that need a command beginning with the Control key followed by a letter.term-mode
(M-x term
).