forked from extern/Unexpected-Keyboard
Refactor: Clearer names for CHANGE_METHOD* events
The keys are not renamed to retain compatibility.
This commit is contained in:
parent
b114c78bf1
commit
d7fa5ffa9a
@ -237,7 +237,7 @@ public final class Config
|
|||||||
case Event:
|
case Event:
|
||||||
switch (key.getEvent())
|
switch (key.getEvent())
|
||||||
{
|
{
|
||||||
case CHANGE_METHOD:
|
case CHANGE_METHOD_PICKER:
|
||||||
if (!shouldOfferSwitchingToNextInputMethod)
|
if (!shouldOfferSwitchingToNextInputMethod)
|
||||||
return null;
|
return null;
|
||||||
if (switch_input_immediate)
|
if (switch_input_immediate)
|
||||||
|
@ -75,7 +75,7 @@ public final class KeyModifier
|
|||||||
case Event:
|
case Event:
|
||||||
switch (k.getEvent())
|
switch (k.getEvent())
|
||||||
{
|
{
|
||||||
case CHANGE_METHOD_PREV:
|
case CHANGE_METHOD_AUTO:
|
||||||
return KeyValue.getKeyByName("change_method");
|
return KeyValue.getKeyByName("change_method");
|
||||||
case SWITCH_VOICE_TYPING:
|
case SWITCH_VOICE_TYPING:
|
||||||
return KeyValue.getKeyByName("voice_typing_chooser");
|
return KeyValue.getKeyByName("voice_typing_chooser");
|
||||||
|
@ -12,8 +12,8 @@ public final class KeyValue
|
|||||||
SWITCH_NUMERIC,
|
SWITCH_NUMERIC,
|
||||||
SWITCH_EMOJI,
|
SWITCH_EMOJI,
|
||||||
SWITCH_BACK_EMOJI,
|
SWITCH_BACK_EMOJI,
|
||||||
CHANGE_METHOD,
|
CHANGE_METHOD_PICKER,
|
||||||
CHANGE_METHOD_PREV,
|
CHANGE_METHOD_AUTO,
|
||||||
ACTION,
|
ACTION,
|
||||||
SWITCH_FORWARD,
|
SWITCH_FORWARD,
|
||||||
SWITCH_BACKWARD,
|
SWITCH_BACKWARD,
|
||||||
@ -365,8 +365,8 @@ public final class KeyValue
|
|||||||
case "switch_forward": return eventKey(0xE013, Event.SWITCH_FORWARD, FLAG_SMALLER_FONT);
|
case "switch_forward": return eventKey(0xE013, Event.SWITCH_FORWARD, FLAG_SMALLER_FONT);
|
||||||
case "switch_backward": return eventKey(0xE014, Event.SWITCH_BACKWARD, FLAG_SMALLER_FONT);
|
case "switch_backward": return eventKey(0xE014, Event.SWITCH_BACKWARD, FLAG_SMALLER_FONT);
|
||||||
case "switch_greekmath": return eventKey("πλ∇¬", Event.SWITCH_GREEKMATH, FLAG_SMALLER_FONT);
|
case "switch_greekmath": return eventKey("πλ∇¬", Event.SWITCH_GREEKMATH, FLAG_SMALLER_FONT);
|
||||||
case "change_method": return eventKey(0xE009, Event.CHANGE_METHOD, FLAG_SMALLER_FONT);
|
case "change_method": return eventKey(0xE009, Event.CHANGE_METHOD_PICKER, FLAG_SMALLER_FONT);
|
||||||
case "change_method_prev": return eventKey(0xE009, Event.CHANGE_METHOD_PREV, FLAG_SMALLER_FONT);
|
case "change_method_prev": return eventKey(0xE009, Event.CHANGE_METHOD_AUTO, FLAG_SMALLER_FONT);
|
||||||
case "action": return eventKey("Action", Event.ACTION, FLAG_SMALLER_FONT); // Will always be replaced
|
case "action": return eventKey("Action", Event.ACTION, FLAG_SMALLER_FONT); // Will always be replaced
|
||||||
case "capslock": return eventKey(0xE012, Event.CAPS_LOCK, 0);
|
case "capslock": return eventKey(0xE012, Event.CAPS_LOCK, 0);
|
||||||
case "voice_typing": return eventKey(0xE015, Event.SWITCH_VOICE_TYPING, FLAG_SMALLER_FONT);
|
case "voice_typing": return eventKey(0xE015, Event.SWITCH_VOICE_TYPING, FLAG_SMALLER_FONT);
|
||||||
|
@ -386,11 +386,11 @@ public class Keyboard2 extends InputMethodService
|
|||||||
setInputView(_keyboardView);
|
setInputView(_keyboardView);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CHANGE_METHOD:
|
case CHANGE_METHOD_PICKER:
|
||||||
get_imm().showInputMethodPicker();
|
get_imm().showInputMethodPicker();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CHANGE_METHOD_PREV:
|
case CHANGE_METHOD_AUTO:
|
||||||
if (VERSION.SDK_INT < 28)
|
if (VERSION.SDK_INT < 28)
|
||||||
get_imm().switchToLastInputMethod(getConnectionToken());
|
get_imm().switchToLastInputMethod(getConnectionToken());
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user