Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[BUG] Clipboard Paste inserts nothing in Flutter macOS apps (synthetic Cmd+V lacks the left-Command device flag)

Open Beginner friendly
#1,191 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
flutter, swift

Research direction

Read PasteDeliveryCoordinator.swift, especially SystemPasteCommandPoster.makePasteEvents(), and verify how it creates and posts the synthetic Cmd+V events. Reproduce with a focused Flutter macOS TextField using Clipboard Paste, comparing the current flags with the proposed left-Command device flag. Done when dictated text is inserted and delivery no longer reports success when nothing was pasted.

Written by the indexing model from the issue text.

Description

Describe the bug

With Text insertion set to "Clipboard Paste (Recommended)", dictated text never reaches text fields in Flutter macOS apps, while FluidVoice logs the delivery as successful (outcome=inserted).

Cause: SystemPasteCommandPoster.makePasteEvents() in PasteDeliveryCoordinator.swift sets the flags of the synthetic Command and V events to .maskCommand only (0x100000). A physical Cmd+V also carries the device-dependent bit that tells which Command key is down (NX_DEVICELCMDKEYMASK, 0x8). Flutter's macOS embedder tracks modifier state from these device-dependent bits only (synchronizeModifiers in FlutterEmbedderKeyResponder.mm, kModifierFlagMetaLeft = 0x8 in KeyCodeMap_Internal.h). Flutter therefore sees a plain V with no Command key held, its Cmd+V shortcut never fires, and nothing is pasted.

Proposed fix, in makePasteEvents():

let commandFlags: CGEventFlags = [.maskCommand, CGEventFlags(rawValue: UInt64(NX_DEVICELCMDKEYMASK))]
cmdDown.flags = commandFlags
vDown.flags = commandFlags
vUp.flags = commandFlags

The left bit matches the key that is actually posted (kVK_Command). Spoken send with Cmd+Enter (SpokenSendKey.commandEnter.eventFlags is .maskCommand) probably has the same problem in Flutter apps. I have not tested it.

Reproduction steps

  1. Create a minimal Flutter macOS app (Flutter 3.47.7 stable here) with flutter create --platforms=macos repro, then replace repro/lib/main.dart with:

    import 'package:flutter/material.dart';
    
    void main() => runApp(
      const MaterialApp(home: Scaffold(body: TextField(autofocus: true))),
    );
    
  2. Run it with flutter run -d macos and leave the text field focused.

  3. In FluidVoice, set Text insertion to "Clipboard Paste (Recommended)" and dictate a sentence.

  4. The field stays empty.

To isolate the cause, I replayed the exact four events from makePasteEvents() against that app (same flags, posted to .cghidEventTap, same temporary pasteboard item, clipboard restored after 500 ms):

  • flags as in FluidVoice (0x100000): nothing is inserted;
  • same events with 0x8 added (0x100008): the text is pasted.

Expected behavior

The dictated text is inserted into the focused Flutter text field, as with a physical Cmd+V.

Actual behavior

Nothing is inserted, and FluidVoice logs the delivery as successful (outcome=inserted). Switching Text insertion to "Direct Paste" works around it.

App Version

1.6.11

macOS Version

macOS 27.0.1

Architecture

Apple Silicon

Dominant language
Swift
Stars
11.9k
Forks
863
Avg merge
1d 22h
Merged PRs (30d)
29

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from altic-dev/FluidVoice

All issues in altic-dev/FluidVoice

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.