From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21297 invoked from network); 5 Aug 1998 22:46:47 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 5 Aug 1998 22:46:47 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id SAA09757; Wed, 5 Aug 1998 18:34:34 -0400 (EDT) Resent-Date: Wed, 5 Aug 1998 18:01:08 -0400 (EDT) From: "Bart Schaefer" Message-Id: <980805150306.ZM1826@candle.brasslantern.com> Date: Wed, 5 Aug 1998 15:03:06 -0700 In-Reply-To: <0000581F.@arburg.com> Comments: In reply to heiko_elger@arburg.com "Xterm and CURSOR (INS && OVERRIDE)" (Aug 3, 6:49am) References: <0000581F.@arburg.com> X-Mailer: Z-Mail (4.0b.820 20aug96) To: heiko_elger@arburg.com Subject: Re: Xterm and CURSOR (INS && OVERRIDE) Cc: zsh-users@math.gatech.edu MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"ar8R23.0.aE2.ZODor"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1705 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Aug 3, 6:49am, heiko_elger@arburg.com wrote: } Subject: Xterm and CURSOR (INS && OVERRIDE) } } Is it possible to send an escape sequence when pressing the INS key to change } the cursor in the XTERM (AIXTERM), e.x. INSERT MODE --> full cursor, OVERRIDE } MODE small cursor. In 3.1.4, this should do it; you may need to swap vs and ve, or use some other termcap sequence, to get the cursor you want in each case: INSkey='\e[2~' # The sequence sent by the INS key function overwrite_change_cursor { bindkey "$INSkey" insert_change_cursor zle overwrite-mode echotc vs } function insert_change_cursor { bindkey "$INSkey" overwrite_change_cursor zle overwrite-mode echotc ve } zle -N overwrite_change_cursor overwrite_change_cursor zle -N insert_change_cursor insert_change_cursor function precmd { if [[ -o overstrike ]] then echotc vs bindkey "$INSkey" insert_change_cursor else echotc ve bindkey "$INSkey" overwrite_change_cursor fi } -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com