LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 04-18-2005, 01:52 AM   #1
softking
LQ Newbie
 
Registered: Sep 2004
Posts: 2

Rep: Reputation: 0
Unhappy Problem in getting key codes in curses


Hi,
i am writing a cli using curses in c++. There is simple loop

while ((ch = wgetch (this->win)) != KEY_ENTER) {
switch (ch)
{
case KEY_BACKSPACE:
wprintw (this->win, " inside baskspace");
break;
default:
wprintw (this->win, "(%d)%c", ch, ch);
break;
}
refresh ();
}

The problem is i get value 8 in ch when i press BACKSPACE. Even i am getting different value for the KEY_ENTER.

What could be the problem? How to solve it?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Are the hex codes for colors in a jpg the same codes as used in html? abefroman Linux - Security 3 07-31-2005 03:21 PM
do I need curses? jake_01 Programming 1 04-28-2005 06:24 AM
Where is curses.h and semun.h DavidW567 Programming 1 01-13-2005 11:57 AM
curses and iostream irfanhab Programming 3 05-10-2004 10:14 AM
Curses nitinkatageri Linux - General 2 08-18-2003 04:58 AM


All times are GMT -5. The time now is 09:11 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration