mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
am b5e8c779: am 69db35c4: Make the buttons work for edge pixels of the keyboard
* commit 'b5e8c7799726a5975283fa138ad2870ab02d01a4': Make the buttons work for edge pixels of the keyboard
This commit is contained in:
commit
2a952e9b7e
@ -715,7 +715,9 @@ public class LatinKeyboard extends BaseKeyboard {
|
||||
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…
x
Reference in New Issue
Block a user