IMDTouchKnowledge BaseShop main store

Troubleshooting

Why Touch JOG Buttons Start Late but Mouse Works Fine

HMI and touchscreens Published 7 min read

Short answer

The start delay is Windows press-and-hold recognition holding the touch contact before your button handler fires; mouse clicks skip that path entirely. Bind jog start to touch-down and jog stop to touch-up instead of click or hold events, and the wait — typically near half a second — disappears.

On this page
  1. Why does touch start jog later than the mouse?
  2. How much delay points at the gesture and not the network?
  3. How do I timestamp the delay to prove it?
  4. How should the jog button be bound instead?
  5. Should I disable press-and-hold on the panel as well?
  6. When is the delay not the touchscreen at all?
  7. How do I verify the fix on the machine?
  8. Questions asked

Touch starts your jog axis late and the mouse does not because the two inputs take different paths in Windows: a mouse click reaches the button handler immediately, while a touch contact is held by press-and-hold right-click recognition before the framework commits to a tap. The fix belongs in the HMI, not in the controller or the OPC UA link: bind jog start to the touch-down event and jog stop to the touch-up event, and take click and hold events out of the jog path. The sections below measure the delay, confirm the gesture as the cause, change the binding, and verify the result at the axis.

Why does touch start jog later than the mouse? #

Windows holds a touch contact in press-and-hold right-click recognition before your button sees a tap, while a mouse click is delivered to the handler immediately; the recognition wait is typically near half a second.

Touch and mouse are separate input streams in Windows. Mouse buttons arrive as they happen. Touch is interpreted: the WM_GESTURE model does not forward each contact message to your code, it delivers results once it has classified what the finger is doing, and until a press-and-hold or a drag is ruled out, a control listening for a click waits. Your operator comparing the delay with touch right-click is the fingerprint, because it is the same gesture timer.

The shape of the symptom confirms where the fault sits. Start waits for a classified tap, so the axis moves late. Release in your application evidently drives stop directly, which is why the axis halts the instant the finger lifts. A late start with an immediate stop marks the start-side binding and clears the command path. The same gesture causes other touch-panel complaints; see fixing press-and-hold right-click in HMI apps on a touch panel for the menu side of the behavior.

How much delay points at the gesture and not the network? #

A touch-to-mouse difference of roughly 350 to 600 ms points at press-and-hold recognition; the same jog started with the mouse should complete end to end inside about 100 ms.

The press-and-hold duration sits near half a second on default settings, and the measured delay follows the setting: move the duration control and the start delay moves by roughly the amount you changed. Keep this separate from MenuShowDelay, the value under HKEY_CURRENT_USER\Control Panel\Desktop that defaults to 400 ms and governs how fast a context menu paints after a right-click has already been recognized. A jog command opens no menu, so MenuShowDelay never sits in your start path; leave it alone.

Read the measurement as a decision. A difference inside the band is the gesture, and the fix is the binding. A difference of tens of milliseconds is a command-path problem. No difference at all, with the mouse equally slow, clears the touchscreen and points at the OPC UA link or the controller.

How do I timestamp the delay to prove it? #

Log four timestamps on every press — contact begin, handler entry, outgoing OPC UA write, axis moving — and subtract; the boundary pair that is slow only under touch names the faulty layer.

Capture these, using the application's own event and communication logging where it exists and controller-side timestamps where it does not:

  • contact begin, from the operating system input timestamp
  • entry into the jog button handler
  • the outgoing OPC UA write to the jog tag
  • the controller reporting the axis as moving
  • contact end and axis stopped, on the release side

A worked example with illustrative readings shows the arithmetic:

Boundary Touch Mouse
Contact or button-down 0 ms 0 ms
Jog handler entry 480 ms 2 ms
OPC UA write 485 ms 7 ms
Axis moving 520 ms 45 ms

Handler entry, touch minus mouse: 480 - 2 = 478 ms, all of it spent before your code ran. Axis moving, touch minus mouse: 520 - 45 = 475 ms, essentially the same gap carried downstream. Because every boundary after the handler moved together, the entire extra wait sits in front of your handler, in the gesture. The decision is the binding; nothing in the OPC UA link or the controller needs changing. After the rebind, the same capture reading about 8 ms at handler entry and about 60 ms to axis moving under touch matches the mouse case, with the residual being the command path.

How should the jog button be bound instead? #

Bind start to the touch-down event and stop to the touch-up event on the same control, and take click, tap and long-press events out of the jog path entirely.

  1. Move the jog start action to touch-down, the contact-begin event of the button control.
  2. Move the stop action to touch-up, the contact-end event, and make stop unconditional: also stop when the contact ends outside the button after a slide, when the window loses focus, and when any communication fault appears between the two events.
  3. If the control only exposes mouse events, register the window for touch input with WM_TOUCH so contacts arrive as they happen; the WM_GESTURE route is the one that classifies before delivering.
  4. Keep the pair deadman-shaped: any error between down and up commands stop, never a maintained run.
  5. Confirm no parent control, context-menu handler or gesture recognizer consumes the contact before your handler, because the binding only helps if the event reaches the button.

Under IEC 60204-1, jog is momentary by definition — motion only while the control is actuated — and stop overrides start, so touch-down/touch-up is the compliant shape, not merely a fast one. The touchscreen is an operating control; the hardwired E-stop remains the safety stop.

Should I disable press-and-hold on the panel as well? #

Yes, on the account the HMI runs under: press-and-hold for right-clicking is a per-user setting in Windows 10 and 11, and turning it off removes the recognition wait for every application on that account.

Open Control Panel > Hardware and Sound > Pen and Touch, on the Touch tab select "Press and hold" from the list, open its settings and clear the enable checkbox; the same settings hold the duration and tolerance controls if you would rather shorten the gesture than remove it. On builds where Pen and Touch is absent, the equivalent controls sit under Tablet PC Settings in Control Panel. The trade-off is that operators lose hold-to-right-click on that account, so any context menu your screens rely on needs an on-screen button instead. Other HMI runtimes trip over the same gesture; a right-click gesture fix for another HMI runtime covers the matching setting there.

Disabling multitouch is a diagnostic, not the fix. With multitouch off, Windows delivers touch as synthesized mouse events, so if the delay vanishes you have confirmed the binding as the cause — at the cost of every multi-finger interaction the interface uses. Confirm with it, restore it, and ship the binding.

When is the delay not the touchscreen at all? #

When the mouse shows the same delay, or the measured gap sits downstream of the button handler, the fault is in the command path — application dispatch, OPC UA publishing, or the controller — and touch is innocent.

Read the four boundaries this way: handler entry late under touch only means the gesture, and the fix is the binding. Handler prompt but the OPC UA write late means application logic dispatching the command. Write prompt but controller state late means the OPC UA server or the controller scan. Controller state changed but the axis still idle means axis enable or interlocks on the motion side. A delayed release would be a different and serious fault, and your symptom rules it out; after the rebind, verify that release still stops instantly.

How do I verify the fix on the machine? #

Run about twenty jog presses with touch and five with the mouse, log the same four boundaries, and accept the fix when touch and mouse reach axis-moving within 50 ms of each other (an example limit — set yours from the machine's jog tolerance) and every release stops the axis instantly.

Do the first passes with the axis uncoupled or under supervision, then at working speed. Re-check the rest of the screen in the same pass: buttons that used press-and-hold, context menus now that the gesture may be disabled, and any two-finger control if multitouch was toggled during diagnosis. The acceptance figure is a touch-versus-mouse difference, not an absolute time, because the absolute number carries your command path — controller scan, OPC UA publish interval, drive enable — which the touchscreen never controlled.

Questions asked

Does the same delay affect other buttons on the screen?

Yes. Any control whose action waits for a click, tap or long-press event inherits the same recognition wait, so ordinary pushbuttons on the same screen feel sluggish too — a whole screen of half-second buttons is the giveaway. Move every momentary action to touch-down and touch-up in one pass, not just the jog pair, or operators will read the entire screen as faulty.

Will operators lose anything if I disable press-and-hold?

They lose hold-to-right-click on that account, so any context menu opened by holding needs an on-screen replacement such as a menu button. Two-finger gestures such as scroll and zoom keep working; only the hold gesture is removed. Because the setting is per user, make the change on the account the HMI runs under rather than your engineering login, or the delay survives it.

Is lowering MenuShowDelay a quicker fix?

No. MenuShowDelay, the value under HKEY_CURRENT_USER\Control Panel\Desktop that defaults to 400 ms, controls how fast a context menu paints after Windows has already recognized the right-click. Jog never opens a menu, so the value never sits in the start path; leave it at its default and spend the change on the event binding instead.

What if the delay comes back after a Windows update?

Check two things in order: that press-and-hold is still disabled on the account the HMI runs under, because a feature update can restore default touch settings, and that your binding still fires on touch-down, because a framework update can re-map controls to click events. Re-run the four-timestamp test; whichever boundary grew back tells you which fix to reapply.

Keep reading

  • Troubleshooting

    Fixing Press-and-Hold Right-Click in HMI Apps on a Touch Panel

    If press-and-hold opens the right-click menu in Notepad but drags a control inside your HMI or CNC application, the touch panel, its driver and the Windows gesture setting are proven good — the application is capturing the touch as a drag. The fix is a correction to that application from its vendor, not a driver change; in the documented case, a patched KMotionCNC.exe for KMotion435c resolved it.

    Panel PCs and displays

  • Selection guide

    Running an Ignition Vision Client as a Machine HMI Without Edge

    No Edge license is needed. A Vision client at the machine is one more client session of your existing on-site gateway, so the only check is whether that gateway's license counts clients. Edge is a separate device-level gateway for machines that must keep running with the site link down; your panel HMI stays as the OPC UA server either way.

    HMI and touchscreens

  • Selection guide

    How to Choose an HMI Display Size by Operator Task

    Sort panels by operator task: 3–7 in for local control of one machine, 7–15 in for standalone machines and lines, 15–24 in or larger for process overview. Then take the smallest panel whose smallest text and touch targets pass at the operator's real viewing distance — about 0.25 in of character height at a 30 in stand — and confirm bezel, cut-out and depth from the installation drawing.

    HMI and touchscreens