Function Keys and CURSES/TERMCAP ?

Function Keys and CURSES/TERMCAP ?

Post by Juergen Barte » Fri, 10 Jul 1992 21:59:26



Subj.:  Use Function Keys in Curses Program

Hello World!

At first the hard/software platform I use:

Apollo Domain DN4500
Domain/OS kernel(7), revision 10.3, or
UNIX SYS5.3, or
UNIX BSD4.3

Now the problem:

I want to write a simple user interface prg for getting some data. It should
use full screen mode and be controlled by function keys. If I use CURSES
function 'getch()' to read Function Key codes I do not get the right values
(that are defined in "curses.h") for some of them. Although my terminfo file
defines all function key codes for my terminal emulation (vt132) the program
does not get the correct key codes.

It seems to me as if the display manager defined key commands are still in
effect and not replaced by the terminals key capabilities.

How can I reprogram the terminfo database? How can I force CURSES/TERMCAP to
return the correct values? How can I program the function keys from a CURSES
program at all? What TERMCAP function must I use to redefine other keys? Have I
to use a terminal emulator at all? Should'nt CURSES emulate a terminal by itself
(defined in ENV) or if I use 'setupterm' that terminal that I want?

What, How ... ?

The documentation is not very helpful, so I have to ask the world.

Any help is appreciated.

Thanks

Armin

-------------------------------------------------------------------------------
Armin Montigny,   Motorola Taunusstein,  Germany



-------------------------------------------------------------------------------

 
 
 

1. Function Keys and CURSES/TERMCAP ?

Subj.:  Use Function Keys in Curses Program

Hello World!

At first the hard/software platform I use:

Apollo Domain DN4500
Domain/OS kernel(7), revision 10.3, or
UNIX SYS5.3, or
UNIX BSD4.3

Now the problem:

I want to write a simple user interface prg for getting some data. It should
use full screen mode and be controlled by function keys. If I use CURSES
function 'getch()' to read Function Key codes I do not get the right values
(that are defined in "curses.h") for some of them. Although my terminfo file
defines all function key codes for my terminal emulation (vt132) the program
does not get the correct key codes.

It seems to me as if the display manager defined key commands are still in
effect and not replaced by the terminals key capabilities.

How can I reprogram the terminfo database? How can I force CURSES/TERMCAP to
return the correct values? How can I program the function keys from a CURSES
program at all? What TERMCAP function must I use to redefine other keys? Have I
to use a terminal emulator at all? Should'nt CURSES emulate a terminal by itself
(defined in ENV) or if I use 'setupterm' that terminal that I want?

What, How ... ?

The documentation is not very helpful, so I have to ask the world.

Any help is appreciated.

Thanks

Armin

-------------------------------------------------------------------------------
Armin Montigny,   Motorola Taunusstein,  Germany



-------------------------------------------------------------------------------

2. Cross compilation with a C++ shared object

3. Olwm - need cmdtool termcap and function key mappings

4. megs basic program

5. Function keys in (n)curses

6. Vendor identification code?

7. Can't reliably read function keys with curses

8. OO-Database OBST3-3.3

9. Get Function Keys w/o using curses?

10. function keys in curses

11. Function keys / curses / xterm

12. Function keys in curses (BSD)

13. Curses and Function Keys