How to type the return key by Ctrl+M (C-M) in the Google Cloud Shell?

1k Views Asked by At

I'd like to type a return/newline inside the shell by typing Ctrl+M because I'm familiar with Emacs and always type Ctrl-M to type return in Bash too.

However, inside the terminal of Google Cloud Shell, Ctrl+M does not send ^m and just toggle the "Capture Tab Key" feature (see the screenshot below).

off enter image description here

on enter image description here

So the question is how can I type the return key by Ctrl+M (C-M)? Thank you.

2

There are 2 best solutions below

0
On BEST ANSWER

The Cloud SDK has the gcloud cloud-shell ssh command. This subcommand enables you to connect to your cloud-shell via ssh from your favorite terminal so that you can use C-m to type Return as always.

Though this solution cannot be used inside the Cloud Console, it seems the current best option for me.

4
On

I think that \ + Enter could help you. For example:

enter image description here

In this way you can continue the command in the next row.

Edit 1

To send ENTER without using ENTER you could use

Ctr+J