Select Non-Contiguous Text with Command Key
In this article
Yes, on a Mac you can select multiple non-contiguous sections of text by holding down the Command (⌘) key while dragging the cursor over each section. This works in most native macOS apps like Pages, TextEdit, Notes, and many third-party editors, letting you copy or format several separate pieces of text in one go.
How It Works
When you hold the Command key and drag the mouse, macOS treats each drag as an independent selection rather than replacing the previous one. The system adds the newly dragged text to the existing selection, creating a multi-selection. This is different from the standard behavior where a new drag clears the old selection.
The feature is built into the macOS text system, so it appears automatically in any app that uses the standard text handling APIs. This includes Apple's own apps and most Cocoa-based applications. Some cross-platform apps like Microsoft Word or Google Docs in a browser may not support it, because they implement their own text rendering and selection logic.
When to Use It
Command-click selection is useful in several common scenarios:
- Copying scattered words or phrases from a document to paste elsewhere
- Applying the same formatting (bold, italic, color) to multiple non-adjacent words
- Deleting several separate lines or paragraphs at once
- Creating a single clipboard item from multiple sources
For example, if you have a list of names and want to bold only the last names, you can hold Command and drag over each last name, then press Command+B to bold them all simultaneously.
How to Do It Step by Step
- Click at the start of the first section you want to select.
- Drag to the end of that section, then release the mouse button.
- Hold down the Command (⌘) key.
- Click at the start of the next section and drag to its end, then release.
- Repeat for each additional section.
- Release the Command key when done.
You can also use the keyboard: after making the first selection, hold Command and use Shift+Arrow keys or Shift+Click to extend the selection in a new location. This works in most text fields as well.
Common Problems and Fixes
If the feature doesn't work, the likely cause is that the app doesn't support it. Try the same action in TextEdit or Notes to confirm the system works. If it works there but not in your target app, you're out of luck unless the app has its own multi-selection feature.
Another issue: if you drag without holding Command, you'll replace the previous selection. Always keep Command held down until you've finished adding all sections. If you accidentally release it mid-drag, the selection resets.
On some keyboards, especially non-Apple ones, the Command key might be labeled as the Windows key or have a different position. Make sure you're pressing the correct key - it's the one next to the Space bar on a standard Mac keyboard.
Comparison with Windows and Linux
Windows and most Linux desktop environments use the Ctrl key instead of Command for the same purpose. If you're used to Ctrl+click on a PC, the Mac equivalent is Command+click. The behavior is nearly identical, though the key name differs.
In browsers, the behavior is different: Command+click on a link opens it in a new tab, and Command+drag on text is not supported in most browsers. For web pages, you'll need to use browser extensions or copy sections one at a time.
Alternatives and Workarounds
If an app doesn't support Command-click multi-selection, you can:
- Copy each section separately and paste them into a temporary document, then copy the combined result.
- Use a text editor that supports multiple cursors, like Sublime Text or VS Code, which allow editing multiple locations at once.
- For formatting, apply the format to one section, then use the Format Painter (in Word) or the copy-paste format shortcut (Option+Command+C/V in Pages) to apply it to others.
These workarounds are slower but work everywhere.
Frequently Asked Questions
Does Command-click selection work in Microsoft Word for Mac?
No, Word for Mac does not support Command-click multi-selection in the same way as native macOS apps. Word has its own selection model, and while you can select multiple non-adjacent sections using Ctrl+click in some versions, it's not reliable. Use Word's own multi-select feature if available, or copy sections separately.
Can I select non-contiguous text in Safari or Chrome?
No, web browsers do not support multi-selection of text on a page. The Command key is used for opening links in new tabs. To copy multiple sections from a webpage, you'll need to copy them one at a time or use a browser extension like MultiCopy.
Why does my selection keep replacing the previous one?
You're probably not holding down the Command key while making the second selection. The Command key must be held down before you click and drag, and you must keep it held until you've finished adding all sections. If you release it, the next drag will start a new selection.
Does this work in text fields like search bars or form inputs?
In most macOS apps, yes, it works in single-line text fields as well. Hold Command and drag over multiple parts of the text in the field to select them all. However, some apps may not support it in custom text fields.
Can I use the keyboard to select non-contiguous text?
Yes, you can use the keyboard in most native macOS text views. After making the first selection, hold Command and use Shift+Arrow keys to extend the selection in a different location. This is slower than mouse dragging but works for precise selections.