N/Curses - deleting chars

N/Curses - deleting chars

Post by T For » Sun, 09 Jul 2000 04:00:00



I've recently starting looking at and attempting to work with the
ncurses libs on linux.  I currently have a loop that uses wgetch to read
chars from the user.  I'm also using cbreak mode so the buffering is
turned off.  I'm wondering if there's an easy way to detect when the
user hits delete or backspace.  I'm also wondering if I'll need to learn
the terminfo libs to do this.  Any ideas?

T.F.

 
 
 

N/Curses - deleting chars

Post by T For » Sun, 09 Jul 2000 04:00:00




> :I've recently starting looking at and attempting to work with the
> :ncurses libs on linux.  I currently have a loop that uses wgetch to read
> :chars from the user.  I'm also using cbreak mode so the buffering is
> :turned off.  I'm wondering if there's an easy way to detect when the
> :user hits delete or backspace.  I'm also wondering if I'll need to learn
> :the terminfo libs to do this.  Any ideas?

> curses should do this,

> man inopts
> man getch

> -r

after getting a char via wgetch, i can compare it to KEY_BACKSPACE.  This
only seams to work when TERM is set to linux and xterm, after having called
meta(<win *>, TRUE).  I've only tried a few of the TERM options, but I was
hoping there was a more general way of doing so.

T.F.

 
 
 

N/Curses - deleting chars

Post by Rob Manchest » Mon, 10 Jul 2000 04:00:00


:I've recently starting looking at and attempting to work with the
:ncurses libs on linux.  I currently have a loop that uses wgetch to read
:chars from the user.  I'm also using cbreak mode so the buffering is
:turned off.  I'm wondering if there's an easy way to detect when the
:user hits delete or backspace.  I'm also wondering if I'll need to learn
:the terminfo libs to do this.  Any ideas?

curses should do this,

man inopts
man getch

-r

 
 
 

1. SYSV curses & delete char

        How can I discourage SYSV curses from using delete char on long
lines instead of just doing clear to eol?  I'm hitting a situation where
curses is scrolling the screen up (by one line) by deleting every character
on every line individually.
        The program in question is tn3270, and the OS is HP-UX 7.05.  It's
politically impossible to change the terminfo entries.
--

Never trust a psychic who hasn't won the lottery.  Twice.

2. No SCB Message During Boot Sequence

3. delete key = delete-next-char?

4. mmap limits

5. char *strcasestr(char *haystack, char *needle) a simple case independent strstr()

6. 3.2 fvwm95 config file

7. curses curses curses

8. pwauth.h

9. curses and wide chars

10. Line chars in curses

11. C== Curses and Special Chars, HELP! ==

12. Q: Curses leaves garbage chars.

13. Graphics chars using curses