Using Shift+Arrow keys in Emacs from GNU screen

While inside screen, when using the Shift+Left, Shift-Right, etc keys in Emacs (1) to mark and select, if you see the 2A 2B 2C and 2D characters instead you are probably still using the default TERM which is set to "screen".

Simple solution, use xterm-vt220 or xterm-color instead. You can either create an alias for emacs or change your .screenrc file.

$ alias em='export TERM=xterm-vt220 && emacs -nw'

OR in your ~/.screenrc add,

term xterm-vt220

----------------------------------------------------------------
(1) You need to use Emacs 23 or above.

No comments: