Zsh Mailing List Archive
Messages sorted by:
Re: xterm meta and bindkey
- X-seq: zsh-users 13440
- From: Stephane Chazelas <Stephane_Chazelas@xxxxxxxx>
- To: lord_fleg@xxxxxxxxxxxx
- Subject: Re: xterm meta and bindkey
- Date: Mon, 10 Nov 2008 13:46:57 +0000
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <53737.1226304418@xxxxxxxxxxxx>
- Mail-followup-to: lord_fleg@xxxxxxxxxxxx, zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <53737.1226304418@xxxxxxxxxxxx>
On Mon, Nov 10, 2008 at 05:06:58PM +0900, lord_fleg@xxxxxxxxxxxx wrote:
> bindkey '\C-g' describe-key-briefly
> then hit CTRL-g and then when it prompts me hit META-d
> the response is "\M-C" is capitalize-word.
> if i hit CTRL-g and META-<any key at all> i get the same (\M-C) response.
> if i type 'read' and META-d i get the 8 bit character i expect echo'd.
> if i type 'bash' and hit META-d i get the 8 bit character i expect echo'd.
> i'm confused. anyone got any ideas?
What do you get if you run
then type <Meta-d> and then <Ctrl-D><Ctrl-D>
What do the "locale" and "locale charmap" commands output for
What do you get if you type: <Meta-d> after having run
strace -p $$ &
My suspicion is that upon <Meta-d>, your terminal doesn't send
the <Meta-d> byte (d | 0x80 == 0xc4) but the utf8 sequence that
corresponds to the unicode character <Meta-d>.
~$ echo -n '\xc4' | recode ..u8 | od -tx1
0000000 c3 84
And c3 being the <Meta-c> byte.
I wouldn't use Meta this way. I would tell xterm to send <Esc>x
upon <Meta-x> instead of sending the character <meta-x> (or its
utf8 representation). <Meta-i> is the é character in the
iso8859-1 charset but in utf8 does not correspond to any valid
character by itself which is probably why xterm chose to send
the utf8 sequence.
I suspect newer versions of zsh with multibyte charset support
would decode that c3 84 correctly into the <Meta-i> character as
long as you tell it that your terminal talks utf8 (by making
sure locale charmap returns utf8). So it may work as you expect
in newer zsh versions.
Messages sorted by: