LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-29-2003, 07:13 AM   #1
Mohsen
Member
 
Registered: Feb 2003
Location: Iran
Distribution: Solaris 10
Posts: 201

Rep: Reputation: 30
Question kbhit ()


In the name of God
Hi everyone,
I used to program in dos with Borland C, and it had kbhit () function which becomes true as soon as a key is pressed. Now I'm tring to find something in Linux to do the same job for me.
Thanks in advance.
 
Old 03-29-2003, 08:20 AM   #2
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
I believe that the function name for determining this will depend upon which user interface toolkit you use for your program. If you're doing GUI stuff, you could see what different event-handling functions are available in the toolkit (Qt, Gtk, glut, or whatever), one of which is likely to tell you the status of the keyboard.

If you're doing console programming, I'm not too sure...
 
Old 03-29-2003, 08:36 PM   #3
Mohsen
Member
 
Registered: Feb 2003
Location: Iran
Distribution: Solaris 10
Posts: 201

Original Poster
Rep: Reputation: 30
Thanks man,
As soon as I post here, I found a previous post about the same problem (see below), so there is no problem right now
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
kbhit() iceman47 Programming 5 09-20-2009 12:34 PM
Borland's kbhit() iceman47 Linux - General 1 10-28-2002 02:46 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:18 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration