[comp.mail.mush] curses bind question

edrbtsn@iuvax.cs.indiana.edu (Ed Robertson) (05/22/89)

In my .mushrc file I put the line
	bind \CV next msg
in order to get proper motion corresponding to cursor keys.
(My terminal sends control-V for down-arrow.)  However, I must
strike the key TWICE in order for the mush cursor to move down.
I doubt very much if it's the terminal or system, since it works
as expected in vi or (rebound) emacs.  Also, the other keys work 
as expected (control-J moves the cursor down).

Please mail any help with this strange behavior.
-- 
	Edward Robertson		robertson@cs.indiana.edu
	Computer Science Dept
	Indiana University		812-855-4954
	Bloomington, IN 47405-4101

john@jetson.UPMA.MD.US (John Owens) (05/24/89)

In article <21011@iuvax.cs.indiana.edu>, edrbtsn@iuvax.cs.indiana.edu (Ed Robertson) writes:
> (My terminal sends control-V for down-arrow.)  However, I must
> strike the key TWICE in order for the mush cursor to move down.

I don't have a system with BSD tty drivers, but I'd guess that mush is
in cbreak (not raw) mode, and control-V is your lnext character,
which, when hit, causes the next character pressed not to be
interpreted as a special function by the device driver.  (In other
words, if your interrupt character were ^C, you could send a literal
^C as input to a program by typing ^V^C.)  You could always try

sh stty lnext u

(I think that syntax is right) in your .mushrc to undefine the lnext
character, then alias (map or cmd) your exit character to
[line-mode]sh stty lnext '^v'\n (or whatever) to set it back.

Good luck!
-- 
John Owens		john@jetson.UPMA.MD.US		uunet!jetson!john
+1 301 249 6000		john%jetson.uucp@uunet.uu.net

pinkas@hobbit.intel.com (Israel Pinkas ~) (05/25/89)

In article <21011@iuvax.cs.indiana.edu> edrbtsn@iuvax.cs.indiana.edu (Ed Robertson) writes:

> In my .mushrc file I put the line
>	   bind \CV next msg
> in order to get proper motion corresponding to cursor keys.
> (My terminal sends control-V for down-arrow.)  However, I must
> strike the key TWICE in order for the mush cursor to move down.
> I doubt very much if it's the terminal or system, since it works
> as expected in vi or (rebound) emacs.  Also, the other keys work 
> as expected (control-J moves the cursor down).

I suspect that your terminal driver is doing this.  At the shell, type ^V.
Do you get a ^V, or does the system print a ^ and then move the cursor back
on top of it?  If the latter, your terminal driver (in cooked and cbreak
modes) is using ^V as "quote the next character".  This allows you to put
control characters in the command line.

Alternatively, try 'stty all'.  (I don't know if that is the correct
feature on SysV.)  My system (Ultrix 3.1) lists ^V as the lnext feature.

-Israel Pinkas
--
--------------------------------------
Disclaimer: The above are my personal opinions, and in no way represent
the opinions of Intel Corporation.  In no way should the above be taken
to be a statement of Intel.

UUCP:	{amdcad,decwrl,hplabs,oliveb,pur-ee,qantel}!intelca!mipos3!cadev4!pinkas
ARPA:	pinkas%cadev4.intel.com@relay.cs.net
CSNET:	pinkas@cadev4.intel.com