Fn: redo and pasteAsPlainText as undo and paste

Allows typing redo and pasteAsPlainText easily with Fn or the round-trip
gesture without adding them to the keyboard.
This commit is contained in:
Jules Aguillon 2024-12-31 11:49:51 +01:00
parent b43cbf77c2
commit f64a0be6fa

View File

@ -212,6 +212,7 @@ public final class KeyModifier
case Keyevent: name = apply_fn_keyevent(k.getKeyevent()); break;
case Event: name = apply_fn_event(k.getEvent()); break;
case Placeholder: name = apply_fn_placeholder(k.getPlaceholder()); break;
case Editing: name = apply_fn_editing(k.getEditing()); break;
}
return (name == null) ? k : KeyValue.getKeyByName(name);
}
@ -257,6 +258,16 @@ public final class KeyModifier
}
}
private static String apply_fn_editing(KeyValue.Editing p)
{
switch (p)
{
case UNDO: return "redo";
case PASTE: return "pasteAsPlainText";
default: return null;
}
}
private static KeyValue apply_ctrl(KeyValue k)
{
if (_modmap != null)