Re: [dev] Shift-Selection in Emacs with st

From: Aurélien Aptel <>
Date: Thu, 14 Apr 2011 00:22:38 +0200


On Sat, Apr 9, 2011 at 8:05 AM, Sara Fauzia <> wrote:
> I am unable to do shift selection in st (the suckless tool), with Emacs
> ( The
> arrow keys also did not work in Emacs, so I fixed this by adding the
> following to my config.h:
> { XK_Left,      "\033[D"  },
> { XK_Right,     "\033[C"  },
> { XK_Up,        "\033[A"  },
> { XK_Down,      "\033[B"  },

It's already handled in st.c (in kpress()). It should be working
(without shift) without this. Are you sure you compiled the terminfo

> Now, when I try to shift-select (with the above fix for the arrow keys),
> just the arrow keys move, as if shift key wasn't being pressed.

Ok, so I've gone through rxvt-unicode/xterm source code (ugh):

rxvt: arrow keys \e[x with x = ABCD
rxvt: shift + arrow keys \e[x with x = abcd
xterm in emacs: arrows \eOx with x = ABCD
xterm !in emacs: arrows \e[x with x = ABCD
xterm in&out emacs: shift + arrow \e[1;2x with x = ABCD (wtf)

I've made some tests and guess what? None of these work when outputed
by st unless you change TNAME to the corresponding terminal.
This means that the behaviour of emacs is, as usual, determined by the
terminfo entry... and I have no idea where. *sigh*

So if anyone wants to help dump a terminfo entry like this

  $ infocmp <terminal name>

see terminfo(5) for a description of each capability and try to find
something related to this problem.
Received on Thu Apr 14 2011 - 00:22:38 CEST

This archive was generated by hypermail 2.2.0 : Thu Apr 14 2011 - 00:24:02 CEST