KeyTapGestureΒΆ

Methods:

class com::leapmotion::leap::KeyTapGesture

The KeyTapGesture class represents a tapping gesture by a finger or tool.

controller.config().setFloat("Gesture.KeyTap.MinDownVelocity", 40.0f);
controller.config().setFloat("Gesture.KeyTap.HistorySeconds", .2f);
controller.config().setFloat("Gesture.KeyTap.MinDistance", 1.0f);
controller.config().save();

Public Functions

Vector direction()

The direction of finger tip motion.

Vector tapDirection = keytap.direction();

Return
Vector A unit direction vector if the finger tip is moving; otherwise, a zero-vector.

KeyTapGesture()

Constructs a new KeyTapGesture object.

KeyTapGesture(Gesture rhs)

Constructs a KeyTapGesture object from an instance of the Gesture class.

if(gesture.type() == KeyTapGesture.classType()) {
    KeyTapGesture keytapGesture = new KeyTapGesture(gesture);
}

Pointable pointable()

The finger performing the key tap gesture.

Pointable tappingPointable = keytap.pointable();

Return
Pointable A Pointable object representing the tapping finger.

Vector position()

The position where the key tap is registered.

Vector tapPosition = keytap.position();

Return
Vector A Vector containing the coordinates of tap location.

float progress()

The progress value is always 1.0 for a key tap gesture.

Return
float The value 1.0.

Public Static Functions

Gesture.Type classType()

The key tap gesture type.

if(gesture.type() == KeyTapGesture.classType()) {
    KeyTapGesture keytapGesture = new KeyTapGesture(gesture);
}

Return
Type The type value designating a key tap gesture.