ghosttyTerminalMatchesPasteShortcut function
- LogicalKeyboardKey key, {
- required GhosttyTerminalModifierState modifiers,
- required TargetPlatform platform,
Whether the current key chord should trigger terminal paste.
Implementation
bool ghosttyTerminalMatchesPasteShortcut(
LogicalKeyboardKey key, {
required GhosttyTerminalModifierState modifiers,
required TargetPlatform platform,
}) {
if (platform == TargetPlatform.macOS) {
return modifiers.metaPressed && key == LogicalKeyboardKey.keyV;
}
return (modifiers.controlPressed &&
modifiers.shiftPressed &&
key == LogicalKeyboardKey.keyV) ||
(modifiers.shiftPressed && key == LogicalKeyboardKey.insert);
}