remove unused SYMBOL_SHIFT key

This commit is contained in:
Helium314 2024-03-02 21:07:27 +01:00
parent a34b3f4cdd
commit fe5aa2c33c
3 changed files with 3 additions and 18 deletions

View file

@ -1525,19 +1525,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
}
}
// TODO: Instead of checking for alphabetic keyboard here, separate keycodes for
// alphabetic shift and shift while in symbol layout and get rid of this method.
private int getCodePointForKeyboard(final int codePoint) {
if (KeyCode.SHIFT == codePoint) {
final Keyboard currentKeyboard = mKeyboardSwitcher.getKeyboard();
if (null != currentKeyboard && currentKeyboard.mId.isAlphabetKeyboard()) {
return codePoint;
}
return KeyCode.SYMBOL_SHIFT;
}
return codePoint;
}
// Implementation of {@link KeyboardActionListener}.
@Override
public void onCodeInput(final int codePoint, final int x, final int y, final boolean isKeyRepeat) {
@ -1556,7 +1543,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// this transformation, it should be done already before calling onEvent.
final int keyX = mainKeyboardView.getKeyX(x);
final int keyY = mainKeyboardView.getKeyY(y);
final Event event = createSoftwareKeypressEvent(getCodePointForKeyboard(codePoint), keyX, keyY, isKeyRepeat);
final Event event = createSoftwareKeypressEvent(codePoint, keyX, keyY, isKeyRepeat);
onEvent(event);
}