emacs
(v.26.3) can distinguish, out of the box, C-M-v (scroll-other-window) and C-M-S-v (scroll-other-window-down).
On the other hand, emacs -nw
, when run in either gnome-terminal
, mate-terminal
or xterm
, translates C-M-S-v to C-M-v, even when I explicitly set the former.
(Also, as a side note, xterm
demands I use ESC
rather than the "Alt" key, which is actually "Meta". Bonus question: why?)
Anyone know how I can deal with this?
C-M-v
fromC-M-S-v
outside Emacs?cat
at the terminal & checked the output (in that case of M-<arrow>) by typing the key combinations. In this case, onxterm
, neither C-M-v nor C-M-S-v produce any output, thoughemacs
does respond to them. Ongnome-terminal
, I'm not getting something that makes sense to me. C-M-v produces on the terminal "^[^" (without the quotes), but then when I follow it with another key, say "a", the second "^" disappears & I get "^[a". It is true that C-M-S-v produces the same result.^[
isCONTROL-[
, which is the ASCIIESCAPE
control character (one char, written^[
sometimes). So^[^
would beESC-^
and^[a
would beESC-a
. I'm guessing you need to do something with the terminal itself, but maybe someone will suggest a solution from within Emacs. Otherwise, maybe try googling for escape control sequences and terminal. Maybe this is a start: termsys.demon.co.uk/vtansi.htm. Or this: docs.microsoft.com/en-us/windows/console/…emacs -nw
is for some reason ignoring the explicit setting.