[chuck-users] KBHit and arrow keys
adamtindale at hotmail.com
Fri Apr 28 22:57:11 EDT 2006
Thanks for your discussion about this. Please post your findings on
the wiki. I would be more than happy to merge this into the manual.
If you have some LaTeX skills you could also do it yourself and send
me a patch.
On 28-Apr-06, at 4:14 PM, Kassen wrote:
> Jim Hinds;
>> This isn't unique to the keyboard, but is pretty much the way all
>> driven I/O works. So, be happy: what you thought were warts in
>> your program
>> were really elegant solutions to a universal problem. Or
>> something like
> Ah, yes, I did some more testing and now it's clear. Thanks.
> I was under the impression that "kb.getchar()" would be updated every
> iteration of the "while" loop and that the top value would be cleared
> at that time and instead calling it already clears it from the buffer
> so you need to be carefull how you do that or it'll be gone forever.
> I didn't expect this to work;
> if ( ( kb.getchar() == 224) && ( kb.getchar() == 72) ) <<<"up">>>;
> But it does.
> Considdering what you wrote that's all very understandable, realy, but
> in that case it might be nice if something along the lines of the
> example I posted previously would be in the documentation somewhere
> because that's a bit tricky and this stuff covers almost half the
> So, should I add it to the Wiki? If so, what would be a apropriate
> Thanks again for your the explanation,
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
More information about the chuck-users