diff options
| author | Jules Aguillon | 2026-02-19 00:35:14 +0100 |
|---|---|---|
| committer | GitHub | 2026-02-19 00:35:14 +0100 |
| commit | ebf80415d8034d853bd79ba7cfb578db67862529 (patch) | |
| tree | 6c437e8130edace1fb1efc03b7a79dc1e5214b57 /srcs/juloo.keyboard2/KeyModifier.java | |
| parent | 1cd252f8fa7b7b776c8b86f0c4e4357c46b5693b (diff) | |
| download | unexpected-keyboard-ebf80415d8034d853bd79ba7cfb578db67862529.tar.gz unexpected-keyboard-ebf80415d8034d853bd79ba7cfb578db67862529.zip | |
Refactor: KeyValue constants (#1180)
* Refactor: KeyValue constants
Add constants for keys that are accessed from the app's code. This
simplifies the fake pointer handling in Keyboard2View.
* Refactor: Pre-compute action key replacement
The action key and the enter swap are pre-computed in EditorConfig. This
simplifies the code.
Diffstat (limited to 'srcs/juloo.keyboard2/KeyModifier.java')
| -rw-r--r-- | srcs/juloo.keyboard2/KeyModifier.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/srcs/juloo.keyboard2/KeyModifier.java b/srcs/juloo.keyboard2/KeyModifier.java index cf9af3b..c40c342 100644 --- a/srcs/juloo.keyboard2/KeyModifier.java +++ b/srcs/juloo.keyboard2/KeyModifier.java @@ -109,9 +109,9 @@ public final class KeyModifier { case CHANGE_METHOD_PREV: case CHANGE_METHOD_NEXT: - return KeyValue.getKeyByName("change_method"); + return KeyValue.CHANGE_METHOD; case SWITCH_VOICE_TYPING: - return KeyValue.getKeyByName("voice_typing_chooser"); + return KeyValue.VOICE_TYPING_CHOOSER; } break; } @@ -150,7 +150,7 @@ public final class KeyModifier return res; /* Tapping compose again exits the pending sequence. */ case Compose_pending: - return KeyValue.getKeyByName("compose_cancel"); + return KeyValue.COMPOSE_CANCEL; /* These keys are not greyed. */ case Event: case Modifier: |
