From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6627 invoked from network); 21 Mar 2004 18:20:50 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 21 Mar 2004 18:20:50 -0000 Received: (qmail 29356 invoked by alias); 21 Mar 2004 18:20:26 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7220 Received: (qmail 29344 invoked from network); 21 Mar 2004 18:20:26 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 21 Mar 2004 18:20:26 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [130.225.247.86] by sunsite.dk (MessageWall 1.0.8) with SMTP; 21 Mar 2004 18:20:25 -0000 Received: (qmail 15560 invoked from network); 21 Mar 2004 18:20:24 -0000 Received: from madrid10.amenworld.com (62.193.203.32) by a.mx.sunsite.dk with SMTP; 21 Mar 2004 18:20:23 -0000 Received: from DervishD.pleyades.net (212.Red-80-35-44.pooles.rima-tde.net [80.35.44.212]) by madrid10.amenworld.com (8.10.2/8.10.2) with ESMTP id i2LIKIk31256; Sun, 21 Mar 2004 19:20:21 +0100 Received: from raul@pleyades.net by DervishD.pleyades.net with local (Exim MTA 2.05) id <1B57Wo-0000ue-00>; Sun, 21 Mar 2004 19:18:30 +0100 Date: Sun, 21 Mar 2004 19:18:30 +0100 From: DervishD To: David =?iso-8859-1?Q?G=F3mez?= Cc: Zsh-users Subject: Re: bindkey and widgets Message-ID: <20040321181830.GE302@DervishD> Mail-Followup-To: David =?iso-8859-1?Q?G=F3mez?= , Zsh-users References: <20040321143156.GA31236@fargo> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20040321143156.GA31236@fargo> User-Agent: Mutt/1.4.2.1i Organization: Pleyades X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 Hi David :) * Davilín 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/