I bought a Macbook Pro sensor off ebay so I can use my apple TV 2 remote (the silver aluminium one) with XBMC on my HTPC. Everything looked good, the sensor was automatically detected my W7 and the Generic HID Plugin works well when set to "Use Raw Data as event Name". The IR button presses are recorded successfully as Events in the Log and I have successfully created macros for the direction buttons, and even the "hold" events for the directions.
The problem is the hold events for the Menu & Plug buttons. When the either button is pressed it always fires of a single press IR signal before the hold signal. This makes it impossible to hold without a single event first. So in the scenario where I have on a list of movies on the screen and I want to hold press to bring up the context menu it will always fire off the single click event first which is "back" before bringing up the context menu that I want to be displaced. With the direction buttons this isnt an issue as when the button is pressed it fires off a single left event for example and then the "hold" signal kicks in and continues firing a sequence of lefts until the button is realeased.
So a single even would be
HID.AAAAAA (back)
and a hold would be
HID.AAAAAA (back)
HID.BBBBBBB (context menu)
HID.BBBBBBB
HID.BBBBBBB
HID.BBBBBBB
I have a Wait 0.1 sec and Clear pending events after the hold event to ignore the repeating hold events and that seems to be working well for all of the hold events so im not too bothered about that.
How the heck do I fire off a HID.BBBBBBB without a HID.AAAAAAA first!
I'm sure there is a simple comments or logic sequence or python script than can do this but I can't find it. I have also contacted the author of ATVClient which is a background application for Linux that reads input from the infra-red receiver and submits it to XBMC in a way very similar to how XBMCHelper does this under the native AppleTV OS to found out how he was able to resolve this issue and he advised the following
So I am hopefull something can assist with this, at the moment I have to keep my mouse on my couch in case I need to bring up the context menu which is a bit inconvenient.A 500ms timer starts when a button is pushed; if the button is released before the timer expires the short press is sent, otherwise the long press is sent. It's purely software so you should be able to simulate this using EG.
Regards,
Okbis.