Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: bindkey
- X-seq: zsh-workers 15032
- From: "Michal Maru¹ka" <mmc@xxxxxxxxxxxxxxxxxx>
- To: Pierpaolo.Righini@xxxxxxxxxxxxx
- Subject: Re: bindkey
- Date: Thu, 21 Jun 2001 19:15:39 +0200
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <Pine.OSF.4.21.0106211824170.8008-100000@xxxxxxxxxxxxxxxxxxxx> (message from Pierpaolo Righini on Thu, 21 Jun 2001 18:26:46 +0200 (MET DST))
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <Pine.OSF.4.21.0106211824170.8008-100000@xxxxxxxxxxxxxxxxxxxx>
Hi Pierpaolo,
yesterday i solved the same problem on my wife's computer. I do not use these keys,
as they are quite distant (i prefer control/meta combinations).
So you have got some keys, which do not do what you expect. Let's bind them to
what we want. But what are the codes of the keys?
Ask the zsh what coded these keys produce:
you> type: M-x (M- stands for meta or alt key -x means contemporary press the letter x)
zsh> says: execute:_
you> type: describe-key-briefly
zsh> says: Describ key briefly: _
you> press the key which bothers you. e.g Home
zsh> says: "^[[1" is undefined-key
but you want it to go to the beginning of the line, so you must bind it:
bindkey "^[[1" beginning-of-line
Note that ^[ is 1 character (escape), so you must quote it (i do it in emacs).
after this the key will do what you want, but it still insert the ~. So I think
that describe-key-briefly did not report all the key sequence. Let's append it
bindkey "^[[1~" beginning-of-line
Now it works!
Do the same with other keys. Well you need to consult some guide to know the
names of functions ... sorry
extract from ~/.zprofile:
bindkey "[1~" beginning-of-line
bindkey "[4~" end-of-line
bindkey "[3~" delete-char
ciao.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author