I am using MobaXterm on Windows 10 to access a remote Linux machine running RHEL 7.5, but this is generally applicable to Emacs (same things happen with PuTTY, for example). My connection is weak and I'm trying avoid using Moba's X server, so I'm running Emacs in the console by starting it with -nw
.
However, that messes up my right Alt key (plus many other things, see footnote). When I'm running Emacs through an X server, the keyboard is appropriately sending Meta for both Alt keys. In the console, the left works okay but the right doesn't register at all (so Alt-<
just transmits a "<").
I've discovered that I need to modify the keymap. Things like these answers/pages/posts explain somewhat about it: one, two.
The problem with the guidance therein is that I am not root, nor will I ever be. I don't have permission to access /dev/console, so both dumpkeys and loadkeys barf at me. The answers at this related question are for Windows and Fedora.
Is it possible to use something other than a dumb Linux terminal when starting Emacs with -nw?
or
Can I fix my keymap without modifying the operating system's keymap?
(I say dumb because from inside Emacs if I run (getenv "TERM")
the result is dumb
, although that's actually true even when I try it from an X Emacs instance).
(footnote) Ctrl is messed up on both sides. For some reason describe-key says that Ctrl-/
is sending C-_
, and C-h
does nothing but backspace.