LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Press and hold on a Surface pro touch screen

Hi,

I am having some problems with my Surface Pro, trying to control a relay 'press-and-hold'. When I connect a mouse to the Tablet, Windows registers the left mouse up and down events perfectly, allowing the user to control the relay exactly the way I intended, but when I use the touch screen with either the stylus pen or my finger it only seems to press the LabVIEW on release.

 

Does anyone have a solution for this problem?

 

Chris

0 Kudos
Message 1 of 16
(7,412 Views)

Hi Chris,

I assume you are clicking a button in a Labview VI that controls a relay? As the mouse is working correctly, I guess you already set the mechanical action of that button to Switch Until Released? Can you put it on Latch until released and see what the behavior of the button is in that case?

 

Jos

0 Kudos
Message 2 of 16
(7,305 Views)

That is very strange.  Like yourself, I would've just guessed the touchscreen driver would register as a pointing device and work like a mouse.  Does the touchscreen have some sort of "double-tap" feature like a touchpad?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 3 of 16
(7,286 Views)

I just tested this on my touchscreen laptop and got a similar behavior. Windows doesn't seem to be registering the left click when you touch the screen until you release. My guess is that this is related to the press+hold for right click functionality on Windows. When I touch and hold for over a second, I get a right click, but when I touch and hold for a shorter time, I get a left click that only registers when I take my finger off. This is consistent with the way that the Windows UI handles touch as well (test the start button for an example).

 

Interestingly, if I change the mechanical action of the LabVIEW boolean to 'Switch Unit Released' I can't actually toggle the button ever because the press and hold does not register as a left click, and eventually registers as a right click.

 

Jeff Peacock 

 

Product Support Engineer | LabVIEW R&D | National Instruments | Certified LabVIEW Architect 

0 Kudos
Message 4 of 16
(7,279 Views)

@Jeff-P wrote:

I just tested this on my touchscreen laptop and got a similar behavior. Windows doesn't seem to be registering the left click when you touch the screen until you release. My guess is that this is related to the press+hold for right click functionality on Windows. When I touch and hold for over a second, I get a right click, but when I touch and hold for a shorter time, I get a left click that only registers when I take my finger off. This is consistent with the way that the Windows UI handles touch as well (test the start button for an example).

 

Interestingly, if I change the mechanical action of the LabVIEW boolean to 'Switch Unit Released' I can't actually toggle the button ever because the press and hold does not register as a left click, and eventually registers as a right click.

 

Jeff Peacock 

 

Product Support Engineer | LabVIEW R&D | National Instruments | Certified LabVIEW Architect 


Actually, this is expected behavior.  Try clicking a button on any Windows app, then, while holding down the button, move off of it.  The button does not register as pressed.  This feature has saved me any number of times.  😉

 

edit:

 

Or do you mean it doesn't even depress the button?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 5 of 16
(7,273 Views)

@billko wrote:

Actually, this is expected behavior.  Try clicking a button on any Windows app, then, while holding down the button, move off of it.  The button does not register as pressed.  This feature has saved me any number of times.  😉

 

edit:

 

Or do you mean it doesn't even depress the button?


I am explicitly changing the mechanical action of the boolean to Switch until Released. The standard Windows behavior for a button is Latch when Released which is what you are describing. With the touch screen I can't actually depress the button when using switch until released.

 

The expected behavior for Switch until Released is that of a spring loaded button, as long as you hold it down it should be on.

 

Jeff Peacock 

 

Product Support Engineer | LabVIEW R&D | National Instruments | Certified LabVIEW Architect 

0 Kudos
Message 6 of 16
(7,267 Views)

@Jeff-P wrote:

@billko wrote:

Actually, this is expected behavior.  Try clicking a button on any Windows app, then, while holding down the button, move off of it.  The button does not register as pressed.  This feature has saved me any number of times.  😉

 

edit:

 

Or do you mean it doesn't even depress the button?


I am explicitly changing the mechanical action of the boolean to Switch until Released. The standard Windows behavior for a button is Latch when Released which is what you are describing. With the touch screen I can't actually depress the button when using switch until released.

 

The expected behavior for Switch until Released is that of a spring loaded button, as long as you hold it down it should be on.

 

Jeff Peacock 

 

Product Support Engineer | LabVIEW R&D | National Instruments | Certified LabVIEW Architect 


Wow, that is really interesting.  I understand exactly what you are saying.  It should be like a buzzer switch.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 7 of 16
(7,256 Views)

Yes exactly like a door bell, or spring loaded switch. I initialy thought it would be a mouse, pen or touch setting in Windows but I have tried all those. Is this just an issue (I mean 🙂 feature) with the Windows tablet's touch driver or do all touch panels respond like this? Any suggestions how I could work around this?

0 Kudos
Message 8 of 16
(7,217 Views)

I don't have any touch device at hand, but with these devices it is not clear what the user want to do until the finger (or pen) is released. This is due to right clicking usually being defined as pressing for a longer period of time (say you press down for e.g. 1 second, the right click menu will appear), so the operating system does not know whether you are "right clicking" or "left clicking" until you release your finger.



CLA
www.dvel.se
0 Kudos
Message 9 of 16
(7,211 Views)

Hi M_Peeker,

I don't think this is the only issue, because when I disable the RMB on hold (or something like that) option, it still registers a 'mouse press' on a touch release, very mutch like the Windows button like Bill and Jeff wrote.

 

If I double tap the button, I can hold on the second hit it and it works fine. I wonder if this would be the key of working around it; create a second mouse press or something.

 

Chris 

0 Kudos
Message 10 of 16
(7,202 Views)