Link to home
Start Free TrialLog in
Avatar of byan
byan

asked on

How to detect status of keyboard (solaris)

Hi, Everyone who can help me,

I need to detect the  status of keyboard. In fact, what I want to know is: how to record the time duration of pressing a key. Getche or getch will accept keyboard input, but as soon as a key is pressed, the function will return a value. I need to realize some functions like DOS keyboard interrupt which can tell me when a key is pressed, when it is released, etc. My working platform is SUN workstation, Solaris 2.5.1

Thanks,

--
Yan, Bo

ECECS Dept. University of CincinnatiC
Avatar of ozo
ozo
Flag of United States of America image

man XQueryKeymap
Avatar of byan
byan

ASKER

Edited text of question
Is your keyboard /dev/kbd?  Try ioctl(kb,KIOCTRANS,TR_NONE )
Avatar of byan

ASKER

B
ASKER CERTIFIED SOLUTION
Avatar of dhughes111797
dhughes111797

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial