From: DervishD <raul@pleyades.net>
To: "David Gómez" <david@pleyades.net>
Cc: Zsh-users <zsh-users@sunsite.dk>
Subject: Re: bindkey and widgets
Date: Sun, 21 Mar 2004 19:18:30 +0100 [thread overview]
Message-ID: <20040321181830.GE302@DervishD> (raw)
In-Reply-To: <20040321143156.GA31236@fargo>
Hi David :)
* Davilín <david@pleyades.net> dixit:
> It is possible to map the "Ctrl+RePag" combination using bindkey?
No. If you want to use 'Ctrl+RePag' combo you must edit your
/etc/keymap and modify the lines that bind that combo to the
scrollback facility under Linux. You should bind them to a string:
string F20 = "\033[98~"
string F21 = "\033[99~"
keycode 104 = PageUp F20
keycode 109 = PageDown F21
The above will generate sequences so if you press 'C-PgUp' or
'C-PgDn' you will send '\e[98~' and '\e[99~'. You can bind them under
Zsh using bindkey:
bindkey -s "^[[25~" " |\$pager\n"
is what I use to bind that... well, key, at the right of the
infamous WinDOS logo, at the right side of my keyboard (in my
/etc/keymap file I have that key generate '^[[25~').
> On the other hand, how can i map one action with two widgets?
See Bart's message for that. Is a very good explanation :) IMHO
the easiest one if you don't want to create new widgets is the one I
told you yesterday: bind some strange key combo to each widget and
after that use bindkey to bind your usual 'kill-line' combo to the
string corresponding to the two strange key combos (in Bart's
explanation, they are '\e{' and '\e}')
Nonetheless, if you plan to make something more complicated in
the future regarding kill-line (e.g. adding more widgets to run after
kill-line, making the killing depending on the contents of the
$BUFFER, etc.) I encourage you to create a new widget. Is pretty
straightforward (if I can do it, anyone can XDD) and very, very
powerful ;)
Have fun with Zle :)
Raúl Núñez de Arenas Coronado
--
Linux Registered User 88736
http://www.pleyades.net & http://raul.pleyades.net/
next prev parent reply other threads:[~2004-03-21 18:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-21 14:31 David Gómez
2004-03-21 17:01 ` Bart Schaefer
2004-03-21 21:26 ` David Gómez
2004-03-21 18:18 ` DervishD [this message]
2004-03-21 21:51 ` David Gómez
2004-03-22 14:52 ` DervishD
2004-03-22 16:02 ` David Gómez
2004-03-22 17:53 ` Eric Mangold
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040321181830.GE302@DervishD \
--to=raul@pleyades.net \
--cc=david@pleyades.net \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).