Hi I just discovered KBHit, and it seems to fit better with my needs than Hid. I played around with both, and think I get the difference somehow (KBHit reads through the os, Hid is raw from device, + KBHit only reads chars). Is this correctly understood? -- peace, love & harmony Atte http://www.atte.dk | quintet: http://www.anagrammer.dk | compositions: http://www.atte.dk/compositions
Hi Atte, Yes, thats the main difference. Here are a few extra details that I can think of, if you are interested: KBHit - provides ASCII value for printable characters - operates the same across all platforms - tells you that a key was pressed, but not when it is released - continually sends the key press if you hold down a key - on most systems, only one key is reported when multiple keys are held down - only reports key presses when associated terminal is in focus HidIn keyboard - provides os-dependent key code for almost all keys - potentially different codes on different platforms - tells you when a key was pressed + when it was released - reports accurately when multiple keys are pressed simultaneously - reports key presses regardless of window focus - can handle multiple connected keyboards on Linux/Mac - is known to not always (not ever?) recognize PS/2 keyboards on Linux hope this helps! spencer On Nov 26, 2006, at 3:39 PM, Atte André Jensen wrote:
Hi
I just discovered KBHit, and it seems to fit better with my needs than Hid. I played around with both, and think I get the difference somehow (KBHit reads through the os, Hid is raw from device, + KBHit only reads chars). Is this correctly understood?
-- peace, love & harmony Atte
http://www.atte.dk | quintet: http://www.anagrammer.dk | compositions: http://www.atte.dk/ compositions _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
Spencer Salazar wrote:
hope this helps!
Thanks for the explanation! -- peace, love & harmony Atte http://www.atte.dk | quintet: http://www.anagrammer.dk | compositions: http://www.atte.dk/compositions
participants (2)
-
Atte André Jensen
-
Spencer Salazar