1

I have urxvt terminal.
It works as it should after manually setting the following:

usr @ archlinux ~ : typeset -g -A key      
usr @ archlinux ~ : key[Home]="${terminfo[khome]}"
usr @ archlinux ~ : [[ -n ${key[Home]} ]] && bindkey "${key[Home]}" beginning-of-line
usr @ archlinux ~ : echo ${terminfo[khome]}                                          
usr @ archlinux ~ : ^[[7~  # Ctrl-V, Home pressings

But in simple terminal 'st', after it has compiled with (defaults):

Makefile

tic -sx st.info

config.h

{ XK_Home,          ShiftMask,      "\033[2J",       0,   -1},
{ XK_Home,          ShiftMask,      "\033[1;2H",     0,   +1},
{ XK_Home,          XK_ANY_MOD,     "\033[H",        0,   -1},  
{ XK_Home,          XK_ANY_MOD,     "\033[1~",       0,   +1},
{ XK_End,           ControlMask,    "\033[J",       -1,    0},
{ XK_End,           ControlMask,    "\033[1;5F",    +1,    0},
{ XK_End,           ShiftMask,      "\033[K",       -1,    0},
{ XK_End,           ShiftMask,      "\033[1;2F",    +1,    0},
{ XK_End,           XK_ANY_MOD,     "\033[4~",       0,    0},

st.info

home=\E[H,
khome=\E[1~,
kend=\E[4~,

I have only '~' after key presses.

1

st's terminfo file (as noted on the ncurses mailing list) is corrupt, and odd things will happen when attempting to use it.

Specifically, this commit caused a problem, by omitting the capability values:

commit 06f8cf8ca87a81db15816658c40b2afcd1ad5332
Author: pl@ninthfloor.org <pl@ninthfloor.org>
Date:   Fri Nov 11 17:45:46 2016 +0100

    Add tmux capabilities to st.info

There's an up-to-date terminal description in ncurses, which the st developers have been a little slow about (coming up on 3 years).

(The ncurses FAQ shows an example for extracting a specific entry).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.