beetlebug▾
/

ztcl::device haptic

Gives a haptic feedback.

ztcl::device haptic KIND

Description

Gives one haptic feedback of the system: light, medium, or heavy for an impact, and success, warning, or error for the end of a task.

Arguments

ArgumentTypeDefaultDescription
KINDwordrequiredThe kind of feedback.
ValueDescription
lightA light impact.
mediumA medium impact.
heavyA heavy impact.
successA task ended well.
warningA task needs care.
errorA task failed.

Returns

An empty string.

Examples

# A host with no haptics, as a desktop.
% catch {ztcl::device haptic light} msg; set msg
haptics is not available on this platform

Errors

% ztcl::device haptic light
haptics is not available on this platform
-errorcode ZTCL DEVICE UNAVAILABLE

% ztcl::device haptic tap
bad haptic "tap": must be light, medium, heavy, success, warning, or error
-errorcode NONE

Facts

Capability
device. A new interpreter does not have it until the host turns it on.
Tcl release
Tcl 9.1 and 8.6.
Since
ztcl 1.0.0-beta.6

See also