Thread: How to obtain more key code in curses ?

  1. #1
    Registered User
    Join Date
    Nov 2005

    How to obtain more key code in ncurses ?

    Hello !

    Could you tell me how to obtain more key code under ncurses library.
    The way that I followed was to use getch() two times. The first step I get the 0x1b code, at the second time I get the ASCII code.

    This method is not sufficient because some times I need to use for instance <SHIFT><ENTER> and <CONTROL><ENTER>. In this case I can not make the difference between both key stroke because at the first step I get always 0x1b , at second step always d13.

    Last edited by intmail; 07-07-2006 at 06:03 AM.

  2. #2
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    getch() under Dev-C++ can't tell the difference between some keys, like CTRL-A and SHIFT-CTRL-A. I don't know if ncurses is the same way.

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell

    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ:

    My website:
    Projects: codeform, xuni, atlantis, nort, etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. About aes
    By gumit in forum C Programming
    Replies: 13
    Last Post: 10-24-2006, 03:42 PM
  2. Window message loop (Keys)
    By Blackroot in forum Windows Programming
    Replies: 3
    Last Post: 09-12-2006, 05:15 PM
  3. getch() key code question
    By Zagaberoo in forum C++ Programming
    Replies: 2
    Last Post: 09-27-2003, 08:44 AM
  4. << !! Posting Code? Read this First !! >>
    By kermi3 in forum Windows Programming
    Replies: 0
    Last Post: 10-14-2002, 01:29 PM
  5. Registery with api?
    By ismael86 in forum Windows Programming
    Replies: 1
    Last Post: 05-14-2002, 10:28 AM