Touch delay and latency in Commander

Processing of a touch is expected to be instantaneous, but there are situations where this may not be the case, either due to valid operational processes or due to known issues, both of which should be resolved by appropriate setting changes. This document describes the causes of touch delay and latency in UPDD Commander and the settings that address them. UI element issues apply to macOS; the gesture thresholds apply to macOS and Windows.

UI element issues

On macOS, UPDD Commander requests the list of UI elements used by application dialogs. This request should be instantaneous, but in some cases the response is slow, which can delay gesture processing. Where applications do not satisfy this request immediately it is necessary to disable these UI element requests, as described below.

This has especially been observed in Unity applications and games created with Cocos2D-X. Because they are constantly rendering graphics, usually at 60 frames per second, they only respond to requests from the Accessibility API once every frame, so many Accessibility requests take a long time to complete. And since they often do not report any UI elements to the system anyway, it is unnecessary to make these requests. See also Unity and games.

Click nearest UI element

A useful setting, enabled by default, is Click the nearest clickable UI element. With this enabled, when you click in an application, Commander requests a list of clickable UI elements from the application and clicks one if it is very near to the touch. However, some applications are either slow or fail to respond to this request, causing the following issues:

IssueEffect
Slow responseCommander times out the request after 250 ms and generates the click at the point of touch, so the touch is delayed by 250 ms. When this occurs Commander writes the message "Warning: search for nearest clickable UI element took too long. Will simply click under touch." in the output log.
Fail to respondCommander is unable to search for a clickable element. It cannot determine which UI element was touched, and therefore does not know which set of gesture actions to apply, so no action is taken. The output log shows "Warning: applicable gesture search timed out" (and, at the Debug level, "Error: UI element task timed out").

If either of these issues occurs, you can globally disable the click nearest setting on the Touch Gestures tab, disable it in the Default Gestures definition, or add the application to the application list and add a One Finger Tap gesture with click nearest disabled for that application only. This is described in greater detail in Clickable UI element (click nearest).

UI element processing

Similar to the above, when a gesture is performed over a specific application, Commander requests the list of UI elements to determine if any elements have their own set of dedicated gestures, and experiences the same issues if the application does not respond as expected. See Applications, groups and UI elements for how to disable UI element detection for a specific application.

Latency issues

Latency, where cursor movement is delayed or lags behind the touch, was first reported by users of Avid Pro Tools and Propellerhead Reason when using small audio faders or adjusting some controls. There are a number of reasons latency can occur. Certain gesture settings are such that there could be touch latency, as described below. Adjust the settings to suit your usage.

Tap

Commander cannot be certain a single touch is actually a tap until the finger has been released, and therefore has to wait a short while to see if the finger is released. The tap timings can be adjusted on the Touch Gestures tab and in the individual gesture definition.

Drag

By default a single touch needs to move a minimum of 10 screen pixels for Commander to detect it as a "drag" gesture, so applications do not receive a mouse event until the 10 pixels have been traversed, creating a slight lag. The pixel threshold is configurable on the Touch Gestures tab and in the individual gesture definition. A smaller value reduces the lag or can eliminate it altogether.

The Click and drag action's advanced option "Include touch movement from before drag is detected" (enabled by default) makes the drag include the movement made before the threshold was reached.

Double tap

In normal usage you quickly tap the screen twice to produce a double click. However, you can enable a double tap gesture to be associated with a different action. If a double tap gesture is defined, single taps are delayed (by the time limit set for the second tap) while Commander waits to see if this is the start of a double tap gesture before generating a single click on the first tap.

The double tap gesture does not need to be defined for standard double click generation, only to associate a different action with the double tap gesture.

See Gestures and actions.

Gesture sensitivity

The gesture detection sensitivity setting on the Touch Behaviour tab adjusts how accurate or responsive the gesture detection process is. This can also affect latency.

Browser usage latency

Web browsers behave differently from other applications, as the gesture settings for the Browsers group are adjusted to emulate iOS usage and also to offer smart zoom on a double tap. With smart zoom on a double tap gesture there is a delay on each tap while Commander waits to see if a second tap follows within the double tap time limit. See Browsers.

Single touch usage only

If running an application that requires single touch only, with no gesture support, you can either quit Commander (see Running Commander), in which case the driver generates single touch mouse events, or, if you prefer to keep Commander running, add the application and configure it for single touch mouse events while the application is foremost, as described in Presentation and single-purpose touch screens.

This removes latency, as the first touch is processed immediately and subsequent touches are ignored.

For review

Log messages updated to the 1.15.0 text: "Warning: search for nearest clickable UI element took too long. Will simply click under touch." (osxNearestClickable.mm:885), "Warning: applicable gesture search timed out" (TouchSourceManager.cpp:837; 50664 had "Error:"), "Error: UI element task timed out" is a Debug-level message in shared NativeUIElement.mm:251.

"Single touch usage only": 50664 said to "add the application and set for single touch mouse events" without saying how. The likely method is the one-finger-press-with-minimum-hold set-up or the Simple touch preset; please confirm and the single-purpose topic should give the steps.

The link to the Gestures-era "Smart zoom" article (50471) was removed: that article was not imported.