Re: [dev] [bugs] st clears up upon resize and other little things

From: Roberto E. Vargas Caballero <>
Date: Mon, 25 Jan 2016 08:40:06 +0100


On Tue, Jan 19, 2016 at 01:56:56PM -0200, Brad Luther wrote:
> Roberto Vargas - it works in a perfect way! I have one question. Why
> didn't it work by default on ash? Is ash a sucky shell? Should I file
> a bug? Because by what I understand this is a hack, right? Not the
> ideal way. But so far it works really well!

I already answered this question a few mails ago. I am going to
quote my own mail:

- You can read the thread in [1], and you will understand why I am not
- going to change this behaviour in the git version. Again the patch is
- very simple, you only have to modify the values in the array Key located
- in config.def.h. You can see that there are two rows for XK_KP_Delete and
- XK_Delete for XK_ANY_MOD. If you join them in only one row them you will
- be able to run suck programs inside of a suckless terminal. If you do
- it you can add the patch to the wiki and we can add a link in the FAQ,
- but again, my suggestion is send a patch to the programs that are
- wrong.

I can see you didn't read the FAQ, so I'm going to quote the FAQ to:

- ## Why doesn't the Del key work in some programs?
- Taken from the terminfo manpage:
- If the terminal has a keypad that transmits codes when the keys
- are pressed, this information can be given. Note that it is not
- possible to handle terminals where the keypad only works in
- local (this applies, for example, to the unshifted HP 2621 keys).
- If the keypad can be set to transmit or not transmit, give these
- codes as smkx and rmkx. Otherwise the keypad is assumed to
- always transmit.
- In the st case smkx=E[?1hE= and rmkx=E[?1lE>, so it is mandatory that
- applications which want to test against keypad keys send these
- sequences.
- But buggy applications (like bash and irssi, for example) don't do this. A fast
- solution for them is to use the following command:
- $ printf '\033[?1h\033=' >/dev/tty
- or
- $ tput smkx
- In the case of bash, readline is used. Readline has a different note in its
- manpage about this issue:
- enable-keypad (Off)
- When set to On, readline will try to enable the
- application keypad when it is called. Some systems
- need this to enable arrow keys.
- Adding this option to your .inputrc will fix the keypad problem for all
- applications using readline.
- If you are using zsh, then read the zsh FAQ
- <>:
- It should be noted that the O / [ confusion can occur with other keys
- such as Home and End. Some systems let you query the key sequences
- sent by these keys from the system's terminal database, terminfo.
- Unfortunately, the key sequences given there typically apply to the
- mode that is not the one zsh uses by default (it's the "application"
- mode rather than the "raw" mode). Explaining the use of terminfo is
- outside of the scope of this FAQ, but if you wish to use the key
- sequences given there you can tell the line editor to turn on
- "application" mode when it starts and turn it off when it stops:
- function zle-line-init () { echoti smkx }
- function zle-line-finish () { echoti rmkx }
- zle -N zle-line-init
- zle -N zle-line-finish
- Putting these lines into your .zshrc will fix the problems.

The problem with ash is they don't use the smkx sequence as they should.
You can send a mail to them and see if they want to fix their bug.


Received on Mon Jan 25 2016 - 08:40:06 CET

This archive was generated by hypermail 2.3.0 : Mon Jan 25 2016 - 08:48:12 CET