mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-04-24 08:36:26 +00:00
remove unused SYMBOL_SHIFT key
This commit is contained in:
parent
a34b3f4cdd
commit
fe5aa2c33c
3 changed files with 3 additions and 18 deletions
|
@ -127,9 +127,8 @@ object KeyCode {
|
||||||
const val SHIFT_ENTER = -10005
|
const val SHIFT_ENTER = -10005
|
||||||
const val ACTION_NEXT = -10006
|
const val ACTION_NEXT = -10006
|
||||||
const val ACTION_PREVIOUS = -10007
|
const val ACTION_PREVIOUS = -10007
|
||||||
const val SYMBOL_SHIFT = -10008 // todo: check, maybe can be removed
|
|
||||||
// Code value representing the code is not specified.
|
// 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 */
|
/** to make sure a FlorisBoard code works when reading a JSON layout */
|
||||||
private fun Int.checkOrConvertCode(): Int = when (this) {
|
private fun Int.checkOrConvertCode(): Int = when (this) {
|
||||||
|
@ -144,7 +143,7 @@ object KeyCode {
|
||||||
|
|
||||||
// heliboard only
|
// heliboard only
|
||||||
ALPHA_SYMBOL, START_ONE_HANDED_MODE, STOP_ONE_HANDED_MODE, SWITCH_ONE_HANDED_MODE, SHIFT_ENTER,
|
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
|
-> this
|
||||||
|
|
||||||
// conversion
|
// conversion
|
||||||
|
|
|
@ -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}.
|
// Implementation of {@link KeyboardActionListener}.
|
||||||
@Override
|
@Override
|
||||||
public void onCodeInput(final int codePoint, final int x, final int y, final boolean isKeyRepeat) {
|
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.
|
// this transformation, it should be done already before calling onEvent.
|
||||||
final int keyX = mainKeyboardView.getKeyX(x);
|
final int keyX = mainKeyboardView.getKeyX(x);
|
||||||
final int keyY = mainKeyboardView.getKeyY(y);
|
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);
|
onEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -745,7 +745,6 @@ public final class InputLogic {
|
||||||
// We need to switch to the shortcut IME. This is handled by LatinIME since the
|
// We need to switch to the shortcut IME. This is handled by LatinIME since the
|
||||||
// input logic has no business with IME switching.
|
// input logic has no business with IME switching.
|
||||||
case KeyCode.CAPS_LOCK:
|
case KeyCode.CAPS_LOCK:
|
||||||
case KeyCode.SYMBOL_SHIFT:
|
|
||||||
case KeyCode.ALPHA_SYMBOL:
|
case KeyCode.ALPHA_SYMBOL:
|
||||||
case KeyCode.ALPHA:
|
case KeyCode.ALPHA:
|
||||||
case KeyCode.SYMBOL:
|
case KeyCode.SYMBOL:
|
||||||
|
|
Loading…
Add table
Reference in a new issue