Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Original key function not being properly eaten in XBMC
#1
I'm trying to configure a USB numpad to use it as a remote control for the XBMC and PowerDVD applications. I've created a volume up function and assigned it the back key as a trigger. It works fine in PowerDVD, but in XBMC, when autorepeating, it occasionally sends the unaltered back key, which displays the menu. In other words, it doesn't manage to totally "eat" the original back key function.

Since I plan on using the keyboard detector to avoid interfering with another keyboard that's connected to my computer, I'm working with the low level hook disabled. When it is enabled, this problem doesn't occur.

I tried coming up with a function that avoided autorepeating, like this:

Function VolumeUp
Trigger B     Help - how to add the trigger to the macro
Code:
Copy      Help
rep
,key y
,ifk(B)
,,wait 0.3
,,key y
,else
,,break

The only problem is that, apparently, Quick Macros can't tell the back key is pressed, so the fourth and fifth lines are never executed.

Is there something else I could try?

By the way, nice software.
#2
Probably does not eat user-pressed keys when the macro presses keys simultaneously. It may happen when using non-low-level hook, because then there is no reliable way to know key source - user-pressed or QM-pressed.

Use opt keymark 1

Function VolumeUp
Trigger B     Help - how to add the trigger to the macro
Code:
Copy      Help
opt keymark 1
key y

This also should work:
Function VolumeUp
Trigger B     Help - how to add the trigger to the macro
Code:
Copy      Help
spe 10
BlockInput 1
key y
BlockInput 0
#3
That worked, many thanks!


Forum Jump:


Users browsing this thread: 1 Guest(s)