mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
am 69db35c4
: Make the buttons work for edge pixels of the keyboard
* commit '69db35c493aa3a6a9f17094bf2180a52ffb2358e': Make the buttons work for edge pixels of the keyboard
This commit is contained in:
commit
b5e8c77997
@ -797,7 +797,9 @@ public class LatinKeyboard extends Keyboard {
|
||||
if (mCurrentlyInSpace) {
|
||||
return new int[] { mSpaceKeyIndex };
|
||||
} else {
|
||||
return super.getNearestKeys(x, y);
|
||||
// Avoid dead pixels at edges of the keyboard
|
||||
return super.getNearestKeys(Math.max(0, Math.min(x, getMinWidth() - 1)),
|
||||
Math.max(0, Math.min(y, getHeight() - 1)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -83,4 +83,4 @@ class ProximityKeyDetector extends KeyDetector {
|
||||
}
|
||||
return primaryIndex;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user