On Mon, 14 Apr 2008 16:26:53 +0200
Mattieu Puel <[EMAIL PROTECTED]> wrote:
> Hello everyone,
>
> I recently upgraded from an Aterm setup to rxvt-unicode for its
> support of... unicode. It works pretty well, but I am not able
> anymore to bind cursor keys in conjunction with screen. Classically,
> I use the shell builtin "read" to find the key sequence that
> describes the shortcut, and as usual, Alt+Left respond: ^[^[[D and
> Alt+Right: ^[^[[C
>
> Here are the setup lines concerned in my .screenrc:
> bindkey "^[^[[D" prev
> bindkey "^[^[[C" next
>
> When I hit the keys sequence, my screen bells and "[C" or "[D"
> appears.
>
> Anyone any idea ?
I think this problem occurs because of multibyte characters. But first
of all, what is $TERM?
I don't know personally how to solve this. I use "zsh" as shell, where
you can run zkbd to get characters. Here is the function defined in it
to check for key strokes.
getmbkey () {
local k='' i
for ((i=10; i>0; --i))
do
read -t -k 1 k && break
sleep 1
done
[[ -n $k ]] || return 1
[[ $k = $'\012' || $k = $'\015' || $k = ' ' ]] && return 0
# We might not be done yet, thanks to multibyte characters
local mbk=$k
while read -t -k 1 k
do
mbk=$mbk$k
done
print -Rn $mbk
}
I am not posting to mailing list because I am not sure it is of much
help. If it is, please tell me.
Btw, the exact command you have given works for me in screen. I am
using zsh and rxvt-unicode, with TERM=rxvt-unicode
_______________________________________________
rxvt-unicode mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/rxvt-unicode