Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Control USdx using WINLIRC/Sendkeys

Help
2009-03-12
2012-10-03
  • Hello all,

    i wrote a small tool that receives an IR signal from my remote control and simulates pressing (keyboard)keys and mouse buttons to control my pc.
    It´s written in vb.net, using e.g. "SendKeys.Send("{LEFT}")".

    It works fine but not within Ultrastar Deluxe.

    Pressing the arrows directly on the keyboard works, but when i use my remote the "Really quit USdx" message appears.
    Does anybody have a hint to get this working?

    Thanks in advance
    Jan

     
    • Now i got it working!
      Ultrastar Deluxe is now controlable with the remote control of my TV/Sat receiver.
      Just use wm_keydown instead keyeventf_extendedkey in the code above.

       
    • An additional notice:

      It seems that USdx only receives the escape command independent to the designated key.
      E.g.
      I configured Up, Down, left, Right, Enter and Escape.
      But always the Quit message comes up, even if i pressed "left".

       
    • I got it almost working.
      The arrows and "escape" are working ...BUT... the Return key does not work.

      If i press it on the keyboard USdx does respond. But if my tool sends the command USdx does not respond.
      Does anyone have an idea about that?

      CODE:

      'define keys
      Const VK_LEFT = &H25
      Const VK_UP = &H26
      Const VK_RIGHT = &H27
      Const VK_DOWN = &H28
      Const VK_RETURN = &HD
      Const VK_ESCAPE = &H1B
      Dim vKey

      'simulates keyboard action
      Public Sub Tastendruck()
      keybd_event(vKey, 0, KEYEVENTF_EXTENDEDKEY, 0)
      keybd_event(vKey, 0, KEYEVENTF_EXTENDEDKEY Or KEYEVENTF_KEYUP, 0)
      End Sub