HI Manuel, I have no more idea unfortunately. Maybe you can try with Hid events
http://chuck.cs.princeton.edu/doc/examples/hid/kb.ck Br, Julien Le dimanche 22 décembre 2013, Manuel Bärenz a écrit : > I tried all numbers from 0 to 7, all the other numbers give, > surprisingly, "Power Button ready" and otherwise the same results. > > Am 22/12/13 13:38, schrieb Julien Saint-Martin: > > Hi Manuel, > > You're welcome and I think you are close to success :-) "Sleep Button > ready" means ChucK succeeds to open a device. But it don't looks like to be > the right one. > > On my side I tested your code replacing 5 by 0 in the line: > if(!hid.openKeyboard(0)) me.exit(); > > It works for me. Can you try the same thing? Maybe argument of > openKeyboard is not related to the event number in your system. > > Cheers, > Julien > > > > > 2013/12/22 Manuel Bärenz <[email protected]> > > Thanks a lot Julien, > > I'm still trying to set up the keyboard events. I found > /dev/input/by-path/, which contains symlinks to /dev/input with sensible > names. I guess this is what you meant. One of them is called > "platform-i8042-serio-0-event-kbd", I assume that is the keyboard. It links > to /dev/input/event5, so I granted access rights to the device to everyone > and wrote the following little script: > > Hid hid; > HidMsg msg; > if(!hid.openKeyboard(5)) me.exit(); > <<< hid.name(), "ready">>>; > while(true) > { > hid => now; > <<< "received event" >>>; > while(hid.recv(msg)) > { > <<< msg.ascii, " was used" >>>; > } > } > > The output of it is, surprisingly, "Sleep Button ready", and it never > comes to the point of "received event". Any ideas? > > Best, Manuel > Am 06/12/13 09:57, schrieb Julien Saint-Martin: > > Hi Manuel and Moisés, > > Sorry for confusion I checked my code and I use Hid event not KBHit. > > I work on linux too (Debian). And I have to modify a little my linux > config to use KeyBoard in Chuck. > On linux distrubutions I tried, Chuck didn't receives Kb event by > default. But fortunately there is a work around. > I am not on my linux PC now so maybe the following is not exactly right: > Go to directory /dev/input and find which event corresponds to your > keyboard (there is a directory with links name of > >
_______________________________________________ chuck-users mailing list [email protected] https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
