Hi guys,
For my final project, I write an application which allows me to typing using KeyTap Gestures combination (e.g. KeyTap made by index and middle fingers gives A etc..).
-
Firstly, I tried the code below to detect a specific finger, however I don't know how to do it to detect multiple fingers as long as pointable always give 1 finger performing the KeyTapGesture.
public int getKeyTappers(GestureList gestures){
int id=0;
for(Gesture gesture : gestures){
if(gesture.type() == KeyTapGesture.classType()){
KeyTapGesture keytap = new KeyTapGesture(gesture);
Pointable tappingPointable = keytap.pointable();
if(tappingPointable.isFinger()){
Finger tappingFinger = new Finger(tappingPointable);
//System.out.println("type: " + tappingFinger.type());
id = tappingFinger.id();
}
}
}
return id;
}
Can anyone help me to process with more than 1 finger performing KeyTap Gesture in the same moment?
2.I also wonder how to manage this idea with frames. I need to respond on some specific gestures and I'm not sure how to organize it over frames.
Please notice, I am very new to coding and excuse me if this question has been asked before but I could not find any. I'd be very very grateful for your help