Pressing M-RET (to be fully explicit, I am holding down the left alt key and pressing Enter, on a US ANSI keyboard) sends the wrong escape codes to the terminal, causing the running program to misinterpret the keystroke as some
$ showkey -a
Press any keys - Ctrl-D will terminate this program
^[[109;7u 27 0033 0x1b
91 0133 0x5b
49 0061 0x31
48 0060 0x30
57 0071 0x39
59 0073 0x3b
55 0067 0x37
117 0165 0x75
^D 4 0004 0x04
In a terminal emulator like gnome-terminal, or using the built-in M-x term, the results are as expected:
$ showkey -a
Press any keys - Ctrl-D will terminate this program
^[^M 27 0033 0x1b
13 0015 0x0d
^D 4 0004 0x04
Pressing M-RET (to be fully explicit, I am holding down the left alt key and pressing Enter, on a US ANSI keyboard) sends the wrong escape codes to the terminal, causing the running program to misinterpret the keystroke as some
In a terminal emulator like gnome-terminal, or using the built-in
M-x term, the results are as expected: