Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ public interface OnKeyboardActionListener {
private int mTapCount;
private long mLastTapTime;
private boolean mInMultiTap;
private static final int MULTITAP_INTERVAL = 800; // milliseconds
private static final int MULTITAP_INTERVAL = 250; // milliseconds
private StringBuilder mPreviewLabel = new StringBuilder(1);

/** Whether the keyboard bitmap needs to be redrawn before it's blitted. **/
Expand Down Expand Up @@ -547,11 +547,10 @@ public Keyboard getKeyboard() {
*/
public boolean setShifted(boolean shifted) {
if (mKeyboard != null) {
if (mKeyboard.setShifted(shifted)) {
// The whole keyboard probably needs to be redrawn
invalidateAllKeys();
return true;
}
mKeyboard.setShifted(shifted);
// The whole keyboard probably needs to be redrawn
invalidateAllKeys();
return true;
}
return false;
}
Expand Down Expand Up @@ -1519,7 +1518,10 @@ private void checkMultiTap(long eventTime, int keyIndex) {
}

} else if (key.codes[0] == CustomKeyboard.KEYCODE_SHIFT) {
mInMultiTap = true;
if (eventTime < mLastTapTime + MULTITAP_INTERVAL
&& keyIndex == mLastSentIndex) {
mInMultiTap = true;
}
}

if (eventTime > mLastTapTime + MULTITAP_INTERVAL || keyIndex != mLastSentIndex) {
Expand Down