* Xterm and CURSOR (INS && OVERRIDE)
@ 1998-08-03 5:49 heiko_elger
1998-08-03 8:42 ` Peter Stephenson
1998-08-05 22:03 ` Bart Schaefer
0 siblings, 2 replies; 4+ messages in thread
From: heiko_elger @ 1998-08-03 5:49 UTC (permalink / raw)
To: zsh-users
Hello,
my ZSH version is 3.05 and 3.1.4
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.
Sorry, I'm that this is perhaps a faq but I cannot find any info about this
problem.
best regards
Heiko Elger
===============================================================================
ARBURG GmbH + Co Tel: +49 7446 33-0
Postfach 1109 +49 7446 33-3659 (Heiko Elger)
D-72286 Lossburg Fax: +49 7446 33-3365
WWW: http://www.arburg.com
Email: heiko_elger@arburg.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Xterm and CURSOR (INS && OVERRIDE)
1998-08-03 5:49 Xterm and CURSOR (INS && OVERRIDE) heiko_elger
@ 1998-08-03 8:42 ` Peter Stephenson
1998-08-03 8:53 ` Peter Stephenson
1998-08-05 22:03 ` Bart Schaefer
1 sibling, 1 reply; 4+ messages in thread
From: Peter Stephenson @ 1998-08-03 8:42 UTC (permalink / raw)
To: Zsh users list; +Cc: heiko_elger
heiko_elger@arburg.com wrote:
> 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.
This shouldn't be a problem. The usual trick applies: use ^V, then
the INS key to see what escape sequence it's sending, then bind that.
In my case the incantation is
bindkey "^[[2~" overwrite-mode
--
Peter Stephenson <pws@ifh.de> Tel: +39 50 844536
WWW: http://www.ifh.de/~pws/
Gruppo Teorico, Dipartimento di Fisica
Piazza Torricelli 2, 56100 Pisa, Italy
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Xterm and CURSOR (INS && OVERRIDE)
1998-08-03 8:42 ` Peter Stephenson
@ 1998-08-03 8:53 ` Peter Stephenson
0 siblings, 0 replies; 4+ messages in thread
From: Peter Stephenson @ 1998-08-03 8:53 UTC (permalink / raw)
To: Zsh users list; +Cc: heiko_elger
Peter Stephenson wrote:
> heiko_elger@arburg.com wrote:
> > Is it possible to send an escape sequence when pressing the INS key to chan
> ge
> >
> > the cursor in the XTERM (AIXTERM), e.x. INSERT MODE --> full cursor, OVERRI
> DE
> >
> > MODE small cursor.
>
> This shouldn't be a problem.
Sorry, I realise I misread that. You don't just want to go into
overwrite mode, you want the cursor to look different, where I can't help.
pws
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Xterm and CURSOR (INS && OVERRIDE)
1998-08-03 5:49 Xterm and CURSOR (INS && OVERRIDE) heiko_elger
1998-08-03 8:42 ` Peter Stephenson
@ 1998-08-05 22:03 ` Bart Schaefer
1 sibling, 0 replies; 4+ messages in thread
From: Bart Schaefer @ 1998-08-05 22:03 UTC (permalink / raw)
To: heiko_elger; +Cc: zsh-users
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1998-08-05 22:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-08-03 5:49 Xterm and CURSOR (INS && OVERRIDE) heiko_elger
1998-08-03 8:42 ` Peter Stephenson
1998-08-03 8:53 ` Peter Stephenson
1998-08-05 22:03 ` Bart Schaefer
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).