fix broken ctrl/alt/fn/meta

This commit is contained in:
Helium314 2024-05-22 23:47:51 +02:00
parent a9ec745650
commit c98d6d0cc6
2 changed files with 4 additions and 4 deletions

View file

@ -513,9 +513,8 @@ public class Key implements Comparable<Key> {
}
public final boolean isModifier() {
return mCode == KeyCode.SHIFT || mCode == KeyCode.SYMBOL_ALPHA || mCode == KeyCode.ALPHA || mCode == KeyCode.SYMBOL;
// todo: if this is used, sliding input starts on those keys, but it's not yet implemented
// || mCode == KeyCode.CTRL || mCode == KeyCode.ALT || mCode == KeyCode.FN || mCode == KeyCode.META;
return mCode == KeyCode.SHIFT || mCode == KeyCode.SYMBOL_ALPHA || mCode == KeyCode.ALPHA || mCode == KeyCode.SYMBOL
|| mCode == KeyCode.CTRL || mCode == KeyCode.ALT || mCode == KeyCode.FN || mCode == KeyCode.META;
}
public final boolean isRepeatable() {

View file

@ -705,7 +705,8 @@ public final class PointerTracker implements PointerTrackerQueue.Element,
private void startKeySelectionByDraggingFinger(final Key key) {
if (!mIsInDraggingFinger) {
mIsInSlidingKeyInput = key.isModifier();
final int code = key.getCode(); // todo: no sliding input yet for those keys, but it would be really useful
mIsInSlidingKeyInput = key.isModifier() && code != KeyCode.CTRL && code != KeyCode.ALT && code != KeyCode.FN && code != KeyCode.META;
}
mIsInDraggingFinger = true;
}