mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-14 05:52:47 +00:00
deal with keyboard layout changing between pressing and quickly releasing a key
fixes #994
This commit is contained in:
parent
32a37eaddf
commit
6100186f73
1 changed files with 10 additions and 1 deletions
|
@ -1047,7 +1047,16 @@ public final class PointerTracker implements PointerTrackerQueue.Element,
|
|||
final boolean isInSlidingKeyInput = mIsInSlidingKeyInput;
|
||||
resetKeySelectionByDraggingFinger();
|
||||
mIsDetectingGesture = false;
|
||||
final Key currentKey = mCurrentKey;
|
||||
final Key currentKey;
|
||||
if (mKeyboardLayoutHasBeenChanged) {
|
||||
// this is called when keyboard was changed shortly before releasing the key
|
||||
// e.g. when the input field is cleared and shift is set to auto right before pressing the key,
|
||||
// then we want to get the current key, and not the key from the old keyboard (bug report in #994)
|
||||
currentKey = mKeyDetector.detectHitKey(x, y);
|
||||
setReleasedKeyGraphics(mCurrentKey, true); // need to call this, otherwise preview popup will stay open
|
||||
} else {
|
||||
currentKey = mCurrentKey;
|
||||
}
|
||||
mCurrentKey = null;
|
||||
final int currentRepeatingKeyCode = mCurrentRepeatingKeyCode;
|
||||
mCurrentRepeatingKeyCode = Constants.NOT_A_CODE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue