• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

detecting left click using a laser pointer

ok, so I have a projector, webcam, any number of laser pointers, and my computer. I have programmed an app that allows the user to move the mouse around using a laser pointer. I have general mouse movement down, and now I am working on left and right clicking.

So far, here are some ideas I have had

1) If user turns off laser pointer, then turns it back on around the same spot within a certain time period, then register a left click. If they turn it off for a little longer, then register a right click.

2) Using two or more laser pointers. Once the program detects the first laser pointer, then look in the immediate area for a second laser pointer. If it finds it, depending on where it was (if it was vertical, for example) then register a left click. If the second pointer was horizontal to the first pointer, for example, then register a right click.

The second solution is problematic for a few reasons. First of all, it makes for awkward movement to have to deal with and orient a second laser pointer, even if it is attached to the first one.

Any thoughts or other ideas as to how I could work left and right clicking with this?
 
Two pointers sounds very awkward.

Your first idea sounds pretty good. There aren't a lot of different things to try, since all you can do with a laser pointer is move it or turn it on/off. My basic assumption would be when the laser is on and moving, that means move the mouse, and when they are done moving the mouse they would turn the laser off.

Here's one idea:

When laser is on and moving, move the mouse. If the laser is "blinked" (turned on very briefly, then off) that means left-click at the place where the mouse is. Blinked twice means right-click where the mouse is. That would mean when you first detect the laser, don't start moving the mouse until you detect whether it's being blinked or not. Don't require the "blinks" to be done at the same position where the mouse is (it could be too hard to aim like that).
 
Don't require the "blinks" to be done at the same position where the mouse is (it could be too hard to aim like that).
How about just having the user wave their free hand in front of the beam, once for left click and twice for a right? Yeah, it's ghetto but it'll be a) easier to keep the pointer in the same spot for a click to register and b) saves wear and tear on the pointer's switch.

I'm curious what this would be used for, but good luck with it regardless.
 
yah thats an intresting project. I'd make anyone sick that was watching because my hand is nowhere near steady. They have different color laser pointers now, but i dont know if they make different colors built into one unit, but if they did that would be cool, like green for left click and blue for right.
 
Gestures would be neat, i.e. draw a circle for left click, a line up then down for right click.

Or a line right then left means right click, left then right means left click...something like that.
 
Back
Top