Re: [dev] [st] Bug numpad does not seem to work correctly in vim

From: Christoph Lohmann <20h_AT_r-36.net>
Date: Sat, 24 Nov 2012 16:55:20 +0100

Greetings.

On Sat, 24 Nov 2012 16:55:20 +0100 Edgaras <devoas_AT_gmail.com> wrote:
> On Sat, Nov 24, 2012 at 10:59:58AM +0100, Roberto E. Vargas Caballero wrote:
> > On Fri, Nov 23, 2012 at 07:58:26PM +0200, Edgaras wrote:
> > > I just started using updated st, and also started writing some code in
> > > Vim, I immediately noticed that numpad * does not work(it seems to
> >
> > As far as I know, you can get a similar behaviour in xterm if you
> > disable the option 'Alt/NumLock Modifiers'. Vim puts the terminal in raw
> > mode and enables the keypad application mode, because it needs the keycode
> > and not the ansi code for the others special keys. But this mode causes a
> > problem with the numerical and arithmetic keys, because there isn't any
> > terminfo entry for them (there are terminfo entry for the diagonals in
> > cursor mode, that are used when LockNum is disabled). Xterm solves the
> > problem ignoring the keypad application mode for numerical keys when
> > 'Alt/NumLock Modifiers' is enabled (by default), and ignore it always for
> > arithmetical keys.
> >
> > Maybe the best option is putting some parameter in st and select
> >the behaviour when you start it.
>
> I have tried it with xterm, and indeed when 'Alt/NumLock Modifiers' is
> disabled number keys act funky there too. However operator keys keys
> work as expected.
>
> Option to select behaviour at startup might not be a best way
> considering that such behavior is app dependant and applications that
> run in terminal can not reasonably be known in advance.

That’s why there are shortcuts in st. If the three extra fields for key‐
pad, cursor and crlf are moved into a bitfield (integer), then adding
such a modifier would be simple and easy – and a function to toggle
the mode. I don’t need this feature, so patches are welcome.


Sincerely,

Christoph Lohmann
Received on Sat Nov 24 2012 - 16:55:20 CET

This archive was generated by hypermail 2.3.0 : Sat Nov 24 2012 - 17:12:04 CET