How to handle two events or callbacks simultaneously?

Hi all,
How to handle two events simultaneously?

For eg.
Consider two buttons (b1, b2) in your project.
On pressing them simultaneously (touch screen), both the events (for each button) should be handled.
Is there any possibility?

In other words,
Press and hold b1 and at the same time press b2.
Now i want to handle the events of both b1 and b2.

Eagerly Waiting for reply…

I think is not possible, I guess it’s a limitation of the touch screen monitor. If you press two different positions simultaneously, the driver sends to photon one only average possition of the event…

Is just a guess…


I need it for my project. Is it possible using timers (in button callbacks)?

I tried using timer. I used two buttons (b1 and b2) and a label (label1 with font color white).
In b1’s arm callback, a flag is also setted and one second timer (generating pulse) is triggered.
In the b2’s arm callback, the same flag is resetted.
In timer function, the flag state is checked.
if flag is setted, then change font color(some color) of label1.
if flag is resetted, then label1’s font color is resetted to white.
But i not got the expected result?
Means, the label1’s font color is not resetted. (simultaneous press of both buttons)

what type of touchscreen is it? resistive or capacitive

I don’t think you can touch two places at the same time with a resistive touchscreen. The coordinate that gets sent to the app, when 2 fingers are touching the screen, will probably be the half way point between both fingers. A simple app that prints out the touch coordinates and button up and down status will probably give you a lot of insight.


Apples two year exclusivity period on the multi-touch technology has expired. You’ll see multi-touch touch screens everywhere soon…

True. But they’ll probably be capacitive touchscreens, not resistive. The common resistive touchscreen that most people have today can’t support it because of a hardware limitation, not a patent issue. If you have a capacitive touchscreen it probably already supports multi-touch.

Yes, but even capacitive touch screens require a special controller, and that is where the patent applies. The patent still applies, but it is now being widely licensed by the holder.

My point was that questions about multi-touch will likely become common…

There is no mouse equivalent (mouse can’t be in two different places at the same time - M theory excepted :-), so it requires support in the human input subsystem.