From d74e8f3b0877570964715ff3d75435b5276cb69d Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Fri, 24 Jun 2022 20:56:04 +0200 Subject: Fix F12 being turned into F11 The "f11_placeholder" and "f12_placeholder" keys were equals since 31d6a70. Add an incrementing id into the unused key value to differentiate placeholder values. --- srcs/juloo.keyboard2/KeyValue.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/srcs/juloo.keyboard2/KeyValue.java b/srcs/juloo.keyboard2/KeyValue.java index d786959..fb4b776 100644 --- a/srcs/juloo.keyboard2/KeyValue.java +++ b/srcs/juloo.keyboard2/KeyValue.java @@ -231,9 +231,14 @@ final class KeyValue addKey(name, symbol, KIND_KEYEVENT, code, flags); } + // Within VALUE_BITS + private static int placeholder_unique_id = 0; + + /** Use a unique id as the value because the symbol is shared between every + placeholders (it is the empty string). */ private static void addPlaceholderKey(String name) { - addKey(name, "", KIND_STRING, 0, 0); + addKey(name, "", KIND_STRING, placeholder_unique_id++, 0); } static -- cgit v1.2.3