Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Is it possible to remap C-; in zsh?
- X-seq: zsh-users 15421
- From: "Benjamin R. Haskell" <zsh@xxxxxxxxxx>
- To: Mikael Magnusson <mikachu@xxxxxxxxx>
- Subject: Re: Is it possible to remap C-; in zsh?
- Date: Tue, 21 Sep 2010 18:59:34 -0400 (EDT)
- Cc: Derek Thurn <derek@xxxxxxxx>, zsh-users@xxxxxxx
- In-reply-to: <AANLkTim4AFAE2znADti69Spbie83ZwQpr7C65-nL17v6@xxxxxxxxxxxxxx>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <AANLkTin4jzXe85c99FDGDGynWjrqDGiDrvUWEAeL_wkG@xxxxxxxxxxxxxx> <AANLkTim4AFAE2znADti69Spbie83ZwQpr7C65-nL17v6@xxxxxxxxxxxxxx>
On Wed, 22 Sep 2010, Mikael Magnusson wrote:
On 22 September 2010 00:18, Derek Thurn wrote:
Hi,
I'm a fan of remapping Ctrl+Semicolon, since it's conveniently on the
home row. However, when I try and map it to something in zsh using
bindkey, it doesn't let me. Am I out of luck if I want to bind this
useful sequence to a zsh function?
There is no such character as ^; so most terminals just send a ; when
you press ctrl-;, this is true of many other ascii chars near that
range. If you can rebind the keycombo in your terminal you can bind
that in zsh, but that is specific to your particular terminal.
In urxvt you could put this in your x resources:
URxvt.keysym.C-semicolon: \033[50~
After which it can be bound via:
bindkey "\033[50~" widget-name
Just emphasizing that there's still no equivalency of any sort with
Ctrl-;
\033[50~ is sort of like the sequence an <F36> key might produce:
F1=\e[11~, F2=\e[12~, F3=\e[13~, ...
(skips after F5, F10, F14, F16),
F18=\e[32~, F19=\e[33~, F20=\e[34~, ...
(I assume '50' was picked for being unlikely to conflict.)
--
Best,
Ben
Messages sorted by:
Reverse Date,
Date,
Thread,
Author