Re: [dev] [st] problems with terminfo entries and zsh

From: Nils R <ml_AT_hxgn.net>
Date: Mon, 17 Mar 2014 20:16:15 +0100 (CET)

Christoph Lohmann schrieb am 17.03.2014 18:14:
> Greetings.
>
> On Mon, 17 Mar 2014 18:14:49 +0100 Martti Kühne <mysatyre_AT_gmail.com>
> wrote:
> > Although I couldn't exactly verify what the ${terminfo[_AT_]} array is,
> > I'm going to assume it is a zsh builtin interface to the terminfo
> > database, as some sources seem to suggest.
> > looking at [0] line 142 sets khome=\E[1~, line 27 sets dch1=\E[P, as
> > well as line 57 that sets kcbt=\E[Z...
> >
> > Personally I do have issues with NumLk/PgUp/F1-F12 keys in my latest
> > st builds, of which I'm not sure how recent they are. I didn't look
> > deeper into the issue though, as I can work around things everywhere.
> > I find it amazing that st doesn't seem to be able to get them right,
> > which IMHO includes them being broken the way the commonly used
> > abstractions expect them to be. And yes I know I'm being totally
> > inconsiderate and lazy right here.
>
> Debugging terminfo is something everyone can do. Find out what your ap‐
> plication is sending and what st might expect. If it’s not what you ex‐
> pect, look at both, if one is doing it imperfect. Then decide if the er‐
> ror is in the abstraction of most common terminal emulators. If they add
> some strange exception it could be discussed here, if it’s worth adding
> this quirk to st.
>
> Since I’m not using all kind of key combinations every day it’s impossi‐
> ble to debug all of them and changing terminal software. Users need to
> debug and send patches on their own.
>
>
> Sincerely,
>
> Christoph Lohmann
>
>
>

Hi,

i did some testing, here are my results with different terminals and shells. You see the return codes after pressing the key combo in the terminal (on my openbsd machine). Here are the associated key codes from st.info:

    home=\E[H
    khome=\E[1~
    dch=\E[%p1%dP
    dch1=\E[P
    kdch1=\E[3~

I have no idea what the differences between home and khome are or why two versions for home exist. Anyway, here are my results:

CTRL-v + HOME:

      | zsh | bash | ksh |
      +-------+-------+-------+
st | ^[[H | ^[[H | ^[[H | <- works in bash
xterm | ^[OH | ^[[H | ^[[H | <- works in zsh and bash
rxvt | ^[[7~ | ^[[7~ | ^[[7~ | <- never works


CTRL-v + DEL:

      | zsh | bash | ksh |
      +-------+-------+-------+
st | ^[[P | ^[[P | ^[[P | <- never works
xterm | ^? | ^? | ^? | <- deletes backwards in zsh, bash; not in ksh
rxvt | ^[[3~ | ^[[3~ | ^[[3~ | <- works in zsh, bash; not in ksh


For CTRL-v + SHIFT + TAB i couldn't get any output, is there another way than CTRL-V + key combo?

Best,
Nils
Received on Mon Mar 17 2014 - 20:16:15 CET

This archive was generated by hypermail 2.3.0 : Mon Mar 17 2014 - 20:24:06 CET