mirror of
https://github.com/Julow/Unexpected-Keyboard.git
synced 2025-06-24 11:41:32 +02:00
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:
parent
b43cbf77c2
commit
f64a0be6fa
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user