Skip to content

TextInput: Shift-Insert does not work to paste #178483

Closed

Description

@logiclrd

Steps to reproduce

  1. Within a Flutter visual tree, create a TextInput widget.
  2. When running, put focus into the TextInput.
  3. Press Shift+Insert.

Expected results

The results should be identical to pressing Ctrl+V: The clipboard's contents should be pasted into the TextInput.

Actual results

Nothing.

Code sample

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    Clipboard.setData(ClipboardData(text: "This is some text on the clipboard"));
    return MaterialApp(
      title: 'Shift-Insert Bug',
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key});

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: TextField(
        decoration: InputDecoration(labelText: "Click here and then press Shift-Insert. (For comparison, press Ctrl-V.)"),
      ),
    );
  }
}

Screenshots or Video

No response

Logs

No response

Flutter Doctor output

Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.35.7, on Ubuntu 25.10 6.17.0-6-generic, locale en_CA.UTF-8)
[✓] Linux toolchain - develop for Linux desktop
[✓] VS Code (version 1.105.1)
[✓] Connected device (1 available)
[✓] Network resources

• No issues found!

Activity

  1. logiclrd commented on Nov 13, 2025

    @logiclrd
    ContributorAuthor

    Shift+Insert is a standard paste shortcut on Windows. I am running KDE Plasma 6 on X11 right now, and Shift+Insert pastes everywhere other than Flutter apps on this Linux installation. I have read that Shift+Insert is not a standard Paste shortcut on OS X, so this behaviour is expected to be different on different systems. But, on a system where I can Shift+Insert in Chrome and Visual Studio Code and Kate/Notepad, I expect to be able to Shift+Insert in Flutter apps too.

  2. logiclrd commented on Nov 13, 2025

    @logiclrd
    ContributorAuthor

    Something like this??

    --- a/packages/flutter/lib/src/widgets/default_text_editing_shortcuts.dart
    +++ b/packages/flutter/lib/src/widgets/default_text_editing_shortcuts.dart
    @@ -297,6 +297,14 @@ class DefaultTextEditingShortcuts extends StatelessWidget {
         const SingleActivator(LogicalKeyboardKey.keyV, control: true): const PasteTextIntent(
           SelectionChangedCause.keyboard,
         ),
    +
    +    const SingleActivator(LogicalKeyboardKey.delete, shift: true):
    +        const CopySelectionTextIntent.cut(SelectionChangedCause.keyboard),
    +    const SingleActivator(LogicalKeyboardKey.insert, control: true): CopySelectionTextIntent.copy,
    +    const SingleActivator(LogicalKeyboardKey.insert, shift: true): const PasteTextIntent(
    +      SelectionChangedCause.keyboard,
    +    ),
    +
         const SingleActivator(LogicalKeyboardKey.keyA, control: true): const SelectAllTextIntent(
           SelectionChangedCause.keyboard,
         ),

    But this is platform-agnostic and would enable Shift+Insert on systems where it isn't part of the paradigm. (I'm assuming that's not okay?)

  3. logiclrd commented on Nov 13, 2025

    @logiclrd
    ContributorAuthor

    I don't have an OS X machine to test on, but I just did some searches to see what I could find, and as far as I can tell:

    • By default, Shift+Insert doesn't do anything on OS X.
    • EXCEPT in Google Chrome, where it does a paste.
    • EXCEPT EXCEPT sometimes people find that if the clipboard contents were copied from another application, then Shift-Insert in Chrome doesn't work.
    • EXCEPT EXCEPT EXCEPT when that happens, pressing Command+V once makes Shift+Insert start working maybe? 😁
    • There are a number of examples of people asking on forums how to make Shift+Insert paste on OS X. The answer seems to be, "There isn't a generalized way to do that with the base system, but you could use an app called Keyboard Maestro."

    For what it's worth, and all that... 😛

  4. darshankawar commented on Nov 14, 2025

    @darshankawar
    Member

    Thanks for the report. I tried on mac desktop, but it doesn't have insert key, although with ctrl + v it does paste the text properly. I also tried with physical magic keyboard but it doesn't have an insert key.
    I'll keep the issue open for team's tracking.

  5. added
    a: text inputEntering text in a text field or keyboard related problems
    in triagePresently being triaged by the triage team
    platform-windowsBuilding on or for Windows specifically
    platform-linuxBuilding on or for Linux specifically
    and removed
    a: text inputEntering text in a text field or keyboard related problems
    in triagePresently being triaged by the triage team
    on Nov 14, 2025
  6. logiclrd commented on Nov 14, 2025

    @logiclrd
    ContributorAuthor

    I tried on mac desktop, but it doesn't have insert key

    Oh, yeah, I do recall reading a post somewhere where someone said that the same physical key is marked "Help" or something.

    ETA: To be extra sure, you could plug in a USB keyboard with PC-style markings, if you have access to one. If what I read is true, OS X will still see it as the "Help" key, but you'll at least be confidently pressing a button marked "Insert". 😁

  7. logiclrd commented on Nov 15, 2025

    @logiclrd
    ContributorAuthor

    Another observation: When Flutter is rendering to a web browser, whatever the browser supports works. Flutter's shortcut mappings seem to be irrelevant (or at least are overlaid either onto or by the browser's built-in shortcuts). Running against Windows, with currently-released Flutter, the IBM CUA style shortcuts don't work, but if I launch the test app within Chrome, they do work thanks to Chrome. 🙂

  8. added a commit that references this issue on Dec 29, 2025
    8fe208e
  9. logiclrd commented on Dec 30, 2025

    @logiclrd
    ContributorAuthor

    🎉

  10. added
    r: fixedIssue is closed as already fixed in a newer version
    on Jan 5, 2026
  11. github-actions commented on Jan 19, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  12. locked as resolved and limited conversation to collaborators on Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: desktopRunning on desktopa: text inputEntering text in a text field or keyboard related problemsplatform-linuxBuilding on or for Linux specificallyplatform-windowsBuilding on or for Windows specificallyr: fixedIssue is closed as already fixed in a newer versionteam-text-inputOwned by Text Input teamtriaged-text-inputTriaged by Text Input teamwaiting for PR to land (fixed)A fix is in flight

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions