Cursor and Selection
Arrow keys are the most precise way to move the cursor and change your selection when using the terminal with an external keyboard. With on-screen keyboards a few touch gestures are quicker.
Tap and drag near the cursor to send key strokes in the drag direction, use the on-screen arrow keys above the keyboard, or with a Magic Trackpad pan two fingers to fly the cursor without lifting your hand.
Double-tap text to start a new selection. Double-tap a blank area to send a tab. Triple-tap selects a whole line. Pinch with three fingers to copy or paste, the same gestures the system uses everywhere else.
Holding the on-screen space key activates trackpad mode for fine cursor positioning. Releasing without moving brings up the editing menu, which can also insert a password from your password manager.
The system text-editing gestures are documented in the iPhone user guide and the iPad user guide.