diff --git a/app/src/main/java/helium314/keyboard/keyboard/internal/keyboard_parser/floris/KeyCode.kt b/app/src/main/java/helium314/keyboard/keyboard/internal/keyboard_parser/floris/KeyCode.kt index a56a8a8ff..f85290a3a 100644 --- a/app/src/main/java/helium314/keyboard/keyboard/internal/keyboard_parser/floris/KeyCode.kt +++ b/app/src/main/java/helium314/keyboard/keyboard/internal/keyboard_parser/floris/KeyCode.kt @@ -127,9 +127,8 @@ object KeyCode { const val SHIFT_ENTER = -10005 const val ACTION_NEXT = -10006 const val ACTION_PREVIOUS = -10007 - const val SYMBOL_SHIFT = -10008 // todo: check, maybe can be removed // Code value representing the code is not specified. - const val NOT_SPECIFIED = -10009 // todo: not sure if there is need to have the "old" unspecified keyCode different, just test it and maybe merge + const val NOT_SPECIFIED = -10008 // todo: not sure if there is need to have the "old" unspecified keyCode different, just test it and maybe merge /** to make sure a FlorisBoard code works when reading a JSON layout */ private fun Int.checkOrConvertCode(): Int = when (this) { @@ -144,7 +143,7 @@ object KeyCode { // heliboard only ALPHA_SYMBOL, START_ONE_HANDED_MODE, STOP_ONE_HANDED_MODE, SWITCH_ONE_HANDED_MODE, SHIFT_ENTER, - ACTION_NEXT, ACTION_PREVIOUS, SYMBOL_SHIFT, NOT_SPECIFIED + ACTION_NEXT, ACTION_PREVIOUS, NOT_SPECIFIED -> this // conversion diff --git a/app/src/main/java/helium314/keyboard/latin/LatinIME.java b/app/src/main/java/helium314/keyboard/latin/LatinIME.java index bb20ad997..844f48049 100644 --- a/app/src/main/java/helium314/keyboard/latin/LatinIME.java +++ b/app/src/main/java/helium314/keyboard/latin/LatinIME.java @@ -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); } diff --git a/app/src/main/java/helium314/keyboard/latin/inputlogic/InputLogic.java b/app/src/main/java/helium314/keyboard/latin/inputlogic/InputLogic.java index c45174ba2..6d5147222 100644 --- a/app/src/main/java/helium314/keyboard/latin/inputlogic/InputLogic.java +++ b/app/src/main/java/helium314/keyboard/latin/inputlogic/InputLogic.java @@ -745,7 +745,6 @@ public final class InputLogic { // We need to switch to the shortcut IME. This is handled by LatinIME since the // input logic has no business with IME switching. case KeyCode.CAPS_LOCK: - case KeyCode.SYMBOL_SHIFT: case KeyCode.ALPHA_SYMBOL: case KeyCode.ALPHA: case KeyCode.SYMBOL: