From 51b330c6168a8b0e0c16482254d4674fbe5476c7 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Sun, 13 Nov 2022 00:24:23 +0100 Subject: Allow switching quickly between two layouts A new option allow to choose a secondary layout, the switching key is placed on the top edge of the space bar. The "Programming layout" option was basically doing that but it was possible to choose from a few layouts only. It is improved and renamed. The 'LayoutListPreference' allows setting the string for the first entry but otherwise share the rest of the array. Add nice icons from materialdesignicons. --- srcs/juloo.keyboard2/KeyValue.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'srcs/juloo.keyboard2/KeyValue.java') diff --git a/srcs/juloo.keyboard2/KeyValue.java b/srcs/juloo.keyboard2/KeyValue.java index e8155f6..0c19eb7 100644 --- a/srcs/juloo.keyboard2/KeyValue.java +++ b/srcs/juloo.keyboard2/KeyValue.java @@ -15,7 +15,8 @@ final class KeyValue SWITCH_BACK_EMOJI, CHANGE_METHOD, ACTION, - SWITCH_PROGRAMMING, + SWITCH_SECOND, + SWITCH_SECOND_BACK, SWITCH_GREEKMATH, CAPS_LOCK, } @@ -304,7 +305,8 @@ final class KeyValue addEventKey("switch_numeric", "123+", Event.SWITCH_NUMERIC, FLAG_SMALLER_FONT); addEventKey("switch_emoji", 0x01, Event.SWITCH_EMOJI, FLAG_SMALLER_FONT); addEventKey("switch_back_emoji", "ABC", Event.SWITCH_BACK_EMOJI, 0); - addEventKey("switch_programming", "Prog", Event.SWITCH_PROGRAMMING, FLAG_SMALLER_FONT); + addEventKey("switch_second", 0x13, Event.SWITCH_SECOND, FLAG_SMALLER_FONT); + addEventKey("switch_second_back", 0x14, Event.SWITCH_SECOND_BACK, FLAG_SMALLER_FONT); addEventKey("switch_greekmath", "πλ∇¬", Event.SWITCH_GREEKMATH, FLAG_SMALLER_FONT); addEventKey("change_method", 0x09, Event.CHANGE_METHOD, FLAG_SMALLER_FONT); addEventKey("action", "Action", Event.ACTION, FLAG_SMALLER_FONT); // Will always be replaced -- cgit v1.2.3