Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] Bind quasi-default Home, End and Delete keys in built-in keymaps



Hi.

Teubel György wrote:
> Make Home, End and Delete keys work by default as expected by most users.
[...]
> +item(tt(beginning-of-line) (tt(^A) tt(ESC-[1~)) (unbound) (unbound))(

Unfortunately, it's not that easy. Those special keys are not stable,
even across a small sample of terminals and terminal emulators. You'd
have to take a look at termcap or terminfo to get a reasonably well
founded escape sequence for them, which also requires the terminal to be
in smkx mode, while the line editor is active.

Zsh does have a terminfo module and it can be used to set up some well
known special keys. But those are best added to a global configuration
file, rather than being hard coded in C. This is what Debian does¹ for
example.


Regards, Frank

¹ https://anonscm.debian.org/cgit/collab-maint/zsh.git/tree/debian/zshrc

-- 
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
                                                  -- RFC 1925



Messages sorted by: Reverse Date, Date, Thread, Author