From 3a794353504d802bea9552dfbc44b7a4dad31d17 Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Tue, 21 Feb 2023 16:03:05 +0000 Subject: [PATCH] Added question --- FAQ.md | 14 ++++++++++++++ questions/copy-text.question.md | 16 ++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 questions/copy-text.question.md diff --git a/FAQ.md b/FAQ.md index d2d7e7b35..239d53570 100644 --- a/FAQ.md +++ b/FAQ.md @@ -4,6 +4,7 @@ # Frequently Asked Questions - [Does Textual support images?](#does-textual-support-images) - [How can I fix ImportError cannot import name ComposeResult from textual.app ?](#how-can-i-fix-importerror-cannot-import-name-composeresult-from-textualapp-) +- [How can I select and copy text in a Textual app?](#how-can-i-select-and-copy-text-in-a-textual-app) - [How do I center a widget in a screen?](#how-do-i-center-a-widget-in-a-screen) - [How do I pass arguments to an app?](#how-do-i-pass-arguments-to-an-app) - [Why doesn't Textual support ANSI themes?](#why-doesn't-textual-support-ansi-themes) @@ -26,6 +27,19 @@ The following should do it: pip install "textual[dev]" -U ``` + +## How can I select and copy text in a Textual app? + +Running a Textual app puts your terminal in to *application mode* which disables clicking and dragging to select text. +Most terminal emulators offer a modifier key which you can hold while you click and drag to restore the behavior you +may expect from the command line. The exact modifier key depends on the terminal and platform you are running on. + +- **iTerm** Hold the OPTION key. +- **Gnome Terminal** Hold the SHIFT key. +- **Windows Terminal** Hold the SHIFT key. + +Refer to the documentation for your terminal emulator, if it is not listed above. + ## How do I center a widget in a screen? diff --git a/questions/copy-text.question.md b/questions/copy-text.question.md new file mode 100644 index 000000000..2487f6313 --- /dev/null +++ b/questions/copy-text.question.md @@ -0,0 +1,16 @@ +--- +title: "How can I select and copy text in a Textual app?" +alt_titles: + - "Can't copy text" + - "Highlighting and copy text not working" +--- + +Running a Textual app puts your terminal in to *application mode* which disables clicking and dragging to select text. +Most terminal emulators offer a modifier key which you can hold while you click and drag to restore the behavior you +may expect from the command line. The exact modifier key depends on the terminal and platform you are running on. + +- **iTerm** Hold the OPTION key. +- **Gnome Terminal** Hold the SHIFT key. +- **Windows Terminal** Hold the SHIFT key. + +Refer to the documentation for your terminal emulator, if it is not listed above.