From 5404e7432d9240b3c88dce3a8cf240362016293c Mon Sep 17 00:00:00 2001 From: Raphael Date: Sat, 5 Mar 2022 14:17:45 -0500 Subject: Clicking twice on CTRL or ALT will lock them in 'ON' state (#72) * Clicking twice on CTRL or ALT will lock them in 'ON' state * Make Locking behaviour optional, configurable in preferences * Nest the new settings into a different page To avoid spamming the settings page and repetition in the summaries. Cannot be a popup unfortunately because that would require API >= 11. * Add Fn and Meta Co-authored-by: Jules Aguillon --- srcs/juloo.keyboard2/KeyValue.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'srcs/juloo.keyboard2/KeyValue.java') diff --git a/srcs/juloo.keyboard2/KeyValue.java b/srcs/juloo.keyboard2/KeyValue.java index ec29991..dd42f42 100644 --- a/srcs/juloo.keyboard2/KeyValue.java +++ b/srcs/juloo.keyboard2/KeyValue.java @@ -87,6 +87,11 @@ class KeyValue return new KeyValue(name, s, c, eventCode, flags); } + public KeyValue withFlags(int f) + { + return new KeyValue(name, symbol, char_, eventCode, f); + } + private static HashMap keys = new HashMap(); public KeyValue(String n, String s, char c, int e, int f) @@ -154,7 +159,7 @@ class KeyValue static { addModifierKey("shift", "\uE808", - FLAG_LOCK | FLAG_SHIFT | FLAG_KEY_FONT | FLAG_SMALLER_FONT); + FLAG_SHIFT | FLAG_KEY_FONT | FLAG_SMALLER_FONT); addModifierKey("ctrl", "Ctrl", FLAG_CTRL | FLAG_SMALLER_FONT); addModifierKey("alt", "Alt", FLAG_ALT | FLAG_SMALLER_FONT); addModifierKey("accent_aigu", "◌́", FLAG_ACCENT2); -- cgit v1.2.3