<br>HI Manuel,<div><span style="font-size:15px"><br></span></div><div><span style="font-size:15px">I have no more idea unfortunately. Maybe you can try with Hid events</span></div><div><br></div><div><span style="font-size:17px"><a href="http://chuck.cs.princeton.edu/doc/examples/hid/kb.ck">http://chuck.cs.princeton.edu/doc/examples/hid/kb.ck</a></span></div>
<div><br></div><div>Br,</div><div>Julien</div><div><br></div><div><br></div><div>Le dimanche 22 décembre 2013, Manuel Bärenz  a écrit :<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>I tried all numbers from 0 to 7, all
      the other numbers give, surprisingly, "Power Button ready" and
      otherwise the same results.<br>
      <br>
      Am 22/12/13 13:38, schrieb Julien Saint-Martin:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>
                <div>Hi Manuel,<br>
                  <br>
                  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.<br>
                </div>
                <br>
              </div>
              On my side I tested your code replacing 5 by 0 in the
              line:<br>
              if(!hid.openKeyboard(0)) me.exit();<br>
              <br>
            </div>
            It works for me. Can you try the same thing? Maybe argument
            of openKeyboard is not related to the event number in your
            system.<br>
            <br>
          </div>
          Cheers,<br>
        </div>
        Julien<br>
        <div>
          <div>
            <div>
              <div><br>
                <div><br>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div><br>
        <br>
        <div>2013/12/22 Manuel Bärenz <span dir="ltr"><<a>manuel@enigmage.de</a>></span><br>
          <blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000">
              <div>Thanks a lot Julien,<br>
                <br>
                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:<br>
                <br>
                Hid hid;<br>
                HidMsg msg;<br>
                if(!hid.openKeyboard(5)) me.exit();<br>
                <<< <a href="http://hid.name" target="_blank">hid.name</a>(),
                "ready">>>;<br>
                while(true)<br>
                {<br>
                  hid => now;<br>
                  <<< "received event" >>>;<br>
                  while(hid.recv(msg))<br>
                  {<br>
                    <<< msg.ascii, " was used" >>>;<br>
                  }<br>
                }<br>
                <br>
                The output of it is, surprisingly, "Sleep Button ready",
                and it never comes to the point of "received event". Any
                ideas?<br>
                <br>
                Best, Manuel<br>
                Am 06/12/13 09:57, schrieb Julien Saint-Martin:<br>
              </div>
              <div>
                <div>
                  <blockquote type="cite">
                    <div dir="ltr">
                      <div>
                        <div>
                          <div>
                            <div>
                              <div>
                                <div>
                                  <div>
                                    <div>
                                      <div>
                                        <div>Hi Manuel and <span name="Moisés Gabriel Cachay
                                            Tello">Moisés</span>,<br>
                                          <br>
                                        </div>
                                        Sorry for confusion I checked my
                                        code and I use Hid event not
                                        KBHit.<br>
                                        <br>
                                      </div>
                                      I work on linux too (Debian). And
                                      I have to modify a little my linux
                                      config to use KeyBoard in Chuck.<br>
                                    </div>
                                    On linux distrubutions I tried,
                                    Chuck didn't receives Kb event by
                                    default. But fortunately there is a
                                    work around.<br>
                                  </div>
                                  I am not on my linux PC now  so maybe
                                  the following is not exactly right:<br>
                                </div>
                                Go to directory /dev/input and find
                                which event corresponds to your keyboard
                                (there is a directory with links name of
                        </div></div></div></div></div></div></blockquote></div></div></div></blockquote></div></div></blockquote></div>

</blockquote></div>