Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
key bindings table?
- X-seq: zsh-users 18500
- From: Ray Andrews <rayandrews@xxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: key bindings table?
- Date: Sat, 22 Feb 2014 10:35:42 -0800
- In-reply-to: <CAH+w=7aqdvx52VFv6MCrkUKqt+5tzH665H_X6U1e1SMvNQF1ig@mail.gmail.com>
- 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: <CAHyxEs0RWnm_h1X6C6+VognALdCjZDabBATjUUtSUR58x+nHDw@mail.gmail.com> <140204073937.ZM21329@torch.brasslantern.com> <52F1146D.5020801@eastlink.ca> <140204194650.ZM21787@torch.brasslantern.com> <52F283E8.4050500@eastlink.ca> <CAH+w=7aqdvx52VFv6MCrkUKqt+5tzH665H_X6U1e1SMvNQF1ig@mail.gmail.com>
Gentlemen:
Do we have a key bindings table that translates all the various ways of
referring to a key press?
The reason I ask is that I'd like to assign some keybindings and I have
no way of knowing how to refer to them (unless I'm going to steal one
that's already defined).
For example, in 'zbindkey' we have this sort of thing:
[[ "$terminfo[kend]" == "O"* ]] && bindkey -M emacs
"${terminfo[kend]/O/[}" end-of-line
... and I can guess that 'kend' means that this refers to the 'End' key.
Cross checking with " $ bindkey " I get this:
"^E" end-of-line
"^[OF" end-of-line
"^[[F" end-of-line
... so I trust that one of those lines refers to the 'End' key. Which one?
and we also have this:
bindkey "\e[A" history-beginning-search-backward
... Now, I happen to know that that's the 'Up Arrow' key, but how could
I find out if I didn't know?
$ bindkey (at CLI)
... gives us a different language for the same key:
"^[[A" history-beginning-search-backward
... but at least now I know that " ^[[A " in bindkey-at-CLI speak is
the same thing as " \e[A " in bindkey-in-zbindkey speak. That's easy.
In the old days in DOS, the 'Up Arrow' was " 0;72 " -- you could find
the scan code of every legal keystroke and there was only the one language.
Is there a table? Or some other way of being able to pick a keystroke
and know how to refer to it in " terminfo[] " ... in "
bindkey-in-zbindkey " ... in "bindkey-at-CLI " and/or in whatever other
languages there may happen to be? Again, in DOS there was the 'scancode'
program -- type a keystroke, and you got the scancode. It was sinfully easy.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author