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
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
man XQueryKeymap
ASKER
Edited text of question
Is your keyboard /dev/kbd? Try ioctl(kb,KIOCTRANS,TR_NONE )
ASKER
B
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.