From ebf80415d8034d853bd79ba7cfb578db67862529 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Thu, 19 Feb 2026 00:35:14 +0100 Subject: 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.--- srcs/juloo.keyboard2/Config.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'srcs/juloo.keyboard2/Config.java') diff --git a/srcs/juloo.keyboard2/Config.java b/srcs/juloo.keyboard2/Config.java index 18e9fe7..2831254 100644 --- a/srcs/juloo.keyboard2/Config.java +++ b/srcs/juloo.keyboard2/Config.java @@ -281,10 +281,10 @@ public final class Config { switch (prefs.getString("change_method_key_replacement", "prev")) { - case "prev": return KeyValue.getKeyByName("change_method_prev"); - case "next": return KeyValue.getKeyByName("change_method_next"); + case "prev": return KeyValue.CHANGE_METHOD_PREV; + case "next": return KeyValue.CHANGE_METHOD_NEXT; default: - case "picker": return KeyValue.getKeyByName("change_method"); + case "picker": return KeyValue.CHANGE_METHOD; } } -- cgit v1.2.3