Key bindings in ncurses

Key bindings in ncurses

Post by William Lac » Sat, 17 Feb 2001 06:16:13

I am teaching myself to program with ncurses in my spare time and have
been looking for some simple examples or information about binding
keystrokes etc.

I have been perusing the source of dselect and have had some luck
understanding how this works.  From what I can tell ncurses makes it
fairly easy to map a number of non-printing keystrokes to functions
provided in "menu" and "form".  I found a chart of ascii chars that has
helped but does not have all of the keys that I would like to detect.

 I am still a little shakey on the implementation- it seems that
creating a struct with the name of the keypress and a pointer to the
desired function is a good way to map these things together.

Anyway, does anyone know of a good tutorial, example or otherwise
helpful documentation?

I am interested in input loop examples as well as information about
detecting non-printing chars, etc.

Thanks ahead of time for any help :)


1. Ins key in ncurses applications?

I have compiled MouseLess Commander for Linux.
It should mark (tag) the selected file when I press Ins key but it doesnt.
C-t works ok

It uses ncurses' KEY_IC but when I press Ins key the only thing
I get is something like  ]]2~  in the command line

I dont know if its a problem of my terminfo database or my
ncurses package (1.8.5)

I have also tested KEY_IL, KEY_EIC and many others
KEY_DC has no problem but ncurses doesnt seem to know I have an Ins key

BTW, emacs recognizes Ins key as insertkey

Has anybody been successful using Ins key in ncurses applications?

thanks in advance

Jose Manuel

2. Volume Manager performance mystery

3. KDE 2.X key binding to Multimedia Keys

4. PCI bus PnP ?

5. NCurses and C++ binding: help please

6. RT-3106 Video Card and X Windows?? can it works?

7. Konsole and <ins> <del> keys

8. statfs gives weird ammount of free diskspace.

9. key-binding in emacs

10. key binding problem

11. ISO VT320 emulator with key-bindings for Oracle Forms

12. tcsh binding of function keys

13. Applixware - key bindings are braindead