Lock shift with a gesture
Some checks failed
Make Apk CI / Build-Apk (push) Has been cancelled
Check translations / check-translations (push) Has been cancelled
Check layouts / check_layout.output (push) Has been cancelled
Check layouts / Generated files (push) Has been cancelled

The circle gesture locks shift. It is also the case for the round-trip
gesture if shift is in a corner.
This commit is contained in:
Jules Aguillon 2025-01-03 16:08:13 +01:00
parent 6ce2195253
commit a3023a7f18

View File

@ -213,6 +213,7 @@ public final class KeyModifier
case Event: name = apply_fn_event(k.getEvent()); break; case Event: name = apply_fn_event(k.getEvent()); break;
case Placeholder: name = apply_fn_placeholder(k.getPlaceholder()); break; case Placeholder: name = apply_fn_placeholder(k.getPlaceholder()); break;
case Editing: name = apply_fn_editing(k.getEditing()); break; case Editing: name = apply_fn_editing(k.getEditing()); break;
case Modifier: name = apply_fn_modifier(k.getModifier()); break;
} }
return (name == null) ? k : KeyValue.getKeyByName(name); return (name == null) ? k : KeyValue.getKeyByName(name);
} }
@ -268,6 +269,15 @@ public final class KeyModifier
} }
} }
private static String apply_fn_modifier(KeyValue.Modifier m)
{
switch (m)
{
case SHIFT: return "capslock";
default: return null;
}
}
private static KeyValue apply_ctrl(KeyValue k) private static KeyValue apply_ctrl(KeyValue k)
{ {
if (_modmap != null) if (_modmap != null)