![]() |
Leap Motion C# API Reference
0.8.0
|
The KeyTapGesture class represents a tapping gesture by a finger or tool. More...
Inherits Leap.Gesture.
Public Member Functions | |
KeyTapGesture () | |
Constructs a new KeyTapGesture object. | |
KeyTapGesture (Gesture rhs) | |
Constructs a KeyTapGesture object from an instance of the Gesture class. | |
![]() | |
bool | Equals (Gesture rhs) |
Compare Gesture object equality. | |
Gesture () | |
Constructs a new Gesture object. | |
Gesture (Gesture rhs) | |
Constructs a new copy of an Gesture object. | |
override string | ToString () |
A string containing a brief, human-readable description of this Gesture. | |
Static Public Member Functions | |
static Gesture.GestureType | ClassType () |
The key tap gesture type. | |
Properties | |
Vector | Direction [get] |
The direction of finger tip motion. | |
Pointable | Pointable [get] |
The finger performing the key tap gesture. | |
Vector | Position [get] |
The position where the key tap is registered. | |
float | Progress [get] |
The progess value is always 1.0 for a key tap gesture. | |
![]() | |
long | Duration [get] |
The elapsed duration of the recognized movement up to the frame containing this Gesture object, in microseconds. | |
float | DurationSeconds [get] |
The elapsed duration in seconds. | |
Frame | Frame [get] |
The Frame containing this Gesture instance. | |
HandList | Hands [get] |
The list of hands associated with this Gesture, if any. | |
int | Id [get] |
The gesture ID. | |
static Gesture | Invalid [get] |
Returns an invalid Gesture object. | |
bool | IsValid [get] |
Reports whether this Gesture instance represents a valid Gesture. | |
PointableList | Pointables [get] |
The list of fingers and tools associated with this Gesture, if any. | |
Gesture.GestureState | State [get] |
The gesture state. | |
Gesture.GestureType | Type [get] |
The gesture type. | |
Additional Inherited Members | |
![]() | |
enum | GestureState { STATEINVALID = -1, STATESTART = 1, STATEUPDATE = 2, STATESTOP = 3 } |
The possible gesture states. More... | |
enum | GestureType { TYPEINVALID = -1, TYPESWIPE = 1, TYPECIRCLE = 4, TYPESCREENTAP = 5, TYPEKEYTAP = 6 } |
The supported types of gestures. More... | |
The KeyTapGesture class represents a tapping gesture by a finger or tool.
A key tap gesture is recognized when the tip of a finger rotates down toward the palm and then springs back to approximately the original postion, as if tapping. The tapping finger must pause briefly before beginning the tap.
Important: To use key tap gestures in your application, you must enable recognition of the key tap gesture. You can enable recognition with:
Key tap gestures are discrete. The KeyTapGesture object representing a tap always has the state, STATE_STOP. Only one KeyTapGesture object is created for each key tap gesture recognized.
You can set the minimum finger movement and velocity required for a movement to be recognized as a key tap as well as adjust the detection window for evaluating the movement using the config attribute of a connected Controller object. Use the following configuration keys to configure key tap recognition:
Key string | Value type | Default value | Units |
---|---|---|---|
Gesture.KeyTap.MinDownVelocity | float | 50 | mm/s |
Gesture.KeyTap.HistorySeconds | float | 0.1 | s |
Gesture.KeyTap.MinDistance | float | 5.0 | mm |
The following example demonstrates how to set the key tap configuration parameters:
|
inline |
Constructs a new KeyTapGesture object.
An uninitialized KeyTapGesture object is considered invalid. Get valid instances of the KeyTapGesture class from a Frame object.
|
inline |
Constructs a KeyTapGesture object from an instance of the Gesture class.
rhs | The Gesture instance to specialize. This Gesture instance must be a KeyTapGesture object. |
|
inlinestatic |
The key tap gesture type.
|
get |
The direction of finger tip motion.
|
get |
|
get |
|
get |
The progess value is always 1.0 for a key tap gesture.