I already have an idea on how to make this work properly, if I am understanding what you want and how the bindings work.
It seems like it might not be able to detect both buttons simultaneously, but I think it should be relatively simple to check for either the right button or the left button (and, accordingly, the right-release or the left-release). If it isn't already timed to happen after 0.5 seconds, I can add that in as well (though I might need more information on how the bindings work, but failing that I could do it using Lua's built-in functions). I can't imagine this project taking any more than a few hours over a few days, as long as the code can be tested.
Cheers,
Justin