From 13a13ecbb6be202864dab70f4660ae241d037daa Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Sat, 9 Jul 2022 17:31:44 +0200 Subject: [PATCH] Switch to greekmath with Fn+switch_numeric Add a shortcut to switch to the greekmath pane directly from the main layout. --- srcs/juloo.keyboard2/KeyModifier.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/srcs/juloo.keyboard2/KeyModifier.java b/srcs/juloo.keyboard2/KeyModifier.java index fa23217..f119635 100644 --- a/srcs/juloo.keyboard2/KeyModifier.java +++ b/srcs/juloo.keyboard2/KeyModifier.java @@ -119,6 +119,7 @@ class KeyModifier { case Char: name = apply_fn_char(k.getChar()); break; case Keyevent: name = apply_fn_keyevent(k.getKeyevent()); break; + case Event: name = apply_fn_event(k.getEvent()); break; case String: switch (k.getString()) { @@ -147,6 +148,15 @@ class KeyModifier } } + private static String apply_fn_event(KeyValue.Event ev) + { + switch (ev) + { + case SWITCH_NUMERIC: return "switch_greekmath"; + default: return null; + } + } + /** Return the name of modified key, or [null]. */ private static String apply_fn_char(char c) {