[chuck-users] kb hid problems

Perry Cook prc at CS.Princeton.EDU
Sun Nov 1 13:21:53 EST 2015


This is really odd, because I have two Yosemite machines that work
fine with your posted code.  I’m trying to figure which of my Macs I
want to subject to the ElCap upgrade, and will test on that and report.

For fun, have you tried the other non-hid keyboard device example?
This one suffers from not working on Windows, but uses a non-hid
path without requiring device number, etc.


// computer keyboard input via terminal
KBHit kb;

// time-loop
while( true )
{
    // wait on event
    kb => now;

    // loop through 1 or more keys
    while( kb.more() )
    {
        // get and print key...
        kb.getchar() => int c;
        <<< "ascii:", c >>>;
    }
}



More information about the chuck-users mailing list