Skip to main content

Keyboard Scroll from Prompt

Scroll through your terminal history using keyboard shortcuts while staying in the prompt box - no mouse needed!
╔═══════════════════════════════════════════════════════════════════════════════════╗
║                                                                                   ║
║   Hold SHIFT and press arrow keys to scroll the terminal                          ║
║   without leaving your prompt.                                                    ║
║                                                                                   ║
╚═══════════════════════════════════════════════════════════════════════════════════╝

The Problem

Have you ever been typing a command and needed to check something you saw earlier?
┌─────────────────────────────────────────────────────────────────────────────────┐
│                         THE OLD WAY (Frustrating!)                              │
├─────────────────────────────────────────────────────────────────────────────────┤
│                                                                                 │
│   You're typing your command...                                                 │
│                                                                                 │
│   ┌───────────────────────────────────────────────────────────────────────────┐ │
│   │ TERMINAL                                                                  │ │
│   │                                                                           │ │
│   │  $ npm install                                                            │ │
│   │  added 1,234 packages...                                                  │ │
│   │  warning: peer dependency...   ◄── "Wait, what was that warning?"         │ │
│   │  $ _                                                                      │ │
│   └───────────────────────────────────────────────────────────────────────────┘ │
│   ┌───────────────────────────────────────────────────────────────────────────┐ │
│   │ PROMPT: npm run bui█                     ◄── You're typing here           │ │
│   └───────────────────────────────────────────────────────────────────────────┘ │
│                                                                                 │
│   To scroll up, you had to:                                                     │
│                                                                                 │
│       Step 1: Click on the terminal                                             │
│       Step 2: Scroll with mouse/trackpad                                        │
│       Step 3: Find what you were looking for                                    │
│       Step 4: Click back on the prompt                                          │
│       Step 5: Remember what you were typing                                     │
│       Step 6: Continue typing                                                   │
│                                                                                 │
│       ❌ 6 steps just to check previous output!                                 │
│       ❌ Loses your place in the prompt                                         │
│       ❌ Breaks your flow                                                       │
│                                                                                 │
└─────────────────────────────────────────────────────────────────────────────────┘

The Solution

Now you can scroll the terminal with just your keyboard - without leaving the prompt!
┌─────────────────────────────────────────────────────────────────────────────────┐
│                           THE NEW WAY (Easy!)                                   │
├─────────────────────────────────────────────────────────────────────────────────┤
│                                                                                 │
│   Same situation, but now...                                                    │
│                                                                                 │
│   ┌───────────────────────────────────────────────────────────────────────────┐ │
│   │ TERMINAL                                      ▲                           │ │
│   │                                               │                           │ │
│   │  $ npm install                                │  Press Shift+↑            │ │
│   │  added 1,234 packages...                      │  to scroll here           │ │
│   │  warning: peer dependency...   ◄── See it!   │                            │ │
│   └───────────────────────────────────────────────────────────────────────────┘ │
│   ┌───────────────────────────────────────────────────────────────────────────┐ │
│   │ PROMPT: npm run bui█          ◄── Cursor stays here the whole time!       │ │
│   └───────────────────────────────────────────────────────────────────────────┘ │
│                                                                                 │
│       Step 1: Press Shift+↑ (scroll up)                                         │
│       Step 2: See what you needed                                               │
│       Step 3: Press Shift+↓ (back to bottom)                                    │
│       Step 4: Continue typing                                                   │
│                                                                                 │
│       ✓ Only 4 steps (2 are just looking!)                                      │
│       ✓ Never leave the prompt                                                  │
│       ✓ Keep your typing flow                                                   │
│                                                                                 │
└─────────────────────────────────────────────────────────────────────────────────┘

Keyboard Shortcuts

Shift + ↑

Scroll UP a few lines (see older output)

Shift + ↓

Jump to BOTTOM (back to current)

Shift + Page Up

Scroll UP a whole page (fast navigation)

Shift + Page Down

Jump to BOTTOM (back to current)
┌─────────────────────────────────────────────────────────────────────────────────┐
│                            YOUR KEYBOARD                                        │
├─────────────────────────────────────────────────────────────────────────────────┤
│                                                                                 │
│    ┌─────────┐                               ┌───────────┐  ┌───────────┐       │
│    │  Shift  │  ◄── Hold this key           │  Page Up   │ │ Page Down  │       │
│    └─────────┘                               └───────────┘  └───────────┘       │
│                                                                                 │
│                         ┌───┐                                                   │
│                         │ ↑ │ ◄── Plus this                                     │
│                     ┌───┼───┼───┐                                               │
│                     │ ← │ ↓ │ → │                                               │
│                     └───┴───┴───┘                                               │
│                                                                                 │
│    Shift + ↑  = Scroll up 3 lines                                               │
│    Shift + ↓  = Go to bottom                                                    │
│    Shift + Page Up = Scroll up one screen                                       │
│    Shift + Page Down = Go to bottom                                             │
│                                                                                 │
└─────────────────────────────────────────────────────────────────────────────────┘

How It Works

Scrolling Up

┌─────────────────────────────────────────────────────────────────────────────────┐
│                         SCROLLING UP (Shift + ↑)                                │
├─────────────────────────────────────────────────────────────────────────────────┤
│                                                                                 │
│   BEFORE pressing Shift+↑:              AFTER pressing Shift+↑:                 │
│                                                                                 │
│   ┌─────────────────────────┐           ┌─────────────────────────┐             │
│   │ ...older output...      │           │ ...even older stuff...  │             │
│   │ ───────────────────     │           │ ───────────────────     │             │
│   │                         │           │ ...older output...      │             │
│   │ Recent command output   │    →      │ ───────────────────     │             │
│   │ More recent output      │           │                         │             │
│   │ Even more recent        │           │ Recent command output   │             │
│   │ $ current prompt█       │           │ More recent output      │             │
│   └─────────────────────────┘           └─────────────────────────┘             │
│                                                                                 │
│   The view moves UP to show older content                                       │
│   (Press multiple times to keep scrolling up)                                   │
│                                                                                 │
└─────────────────────────────────────────────────────────────────────────────────┘

Going Back

┌─────────────────────────────────────────────────────────────────────────────────┐
│                      GOING BACK (Shift + ↓)                                     │
├─────────────────────────────────────────────────────────────────────────────────┤
│                                                                                 │
│   BEFORE (viewing history):             AFTER pressing Shift+↓:                 │
│                                                                                 │
│   ┌─────────────────────────┐           ┌─────────────────────────┐             │
│   │ ...ancient history...   │           │ Latest command output   │             │
│   │ ───────────────────     │           │ ───────────────────     │             │
│   │ Some old command        │    →      │ More recent output      │             │
│   │ Its output here         │           │ Even more recent        │             │
│   │ ───────────────────     │           │ Most recent line        │             │
│   │ Another old command     │           │ $ current prompt█       │             │
│   │ And its output          │           │                         │             │
│   └─────────────────────────┘           └─────────────────────────┘             │
│                                                                                 │
│   Instantly jumps to the bottom to show current state                           │
│   (One press = all the way down)                                                │
│                                                                                 │
└─────────────────────────────────────────────────────────────────────────────────┘

Speed Comparison

┌─────────────────────────────────────────────────────────────────────────────────┐
│                           SPEED COMPARISON                                      │
├─────────────────────────────────────────────────────────────────────────────────┤
│                                                                                 │
│   Shift + ↑        ██                              3 lines per press            │
│                    (Precise, for finding specific lines)                        │
│                                                                                 │
│   Shift + Page Up  ████████████████████████████    Full screen per press        │
│                    (Fast, for going through lots of output)                     │
│                                                                                 │
└─────────────────────────────────────────────────────────────────────────────────┘
When to use which:
  • “I just want to see what happened a moment ago” → Use Shift + ↑ (a few lines at a time)
  • “I need to find something from way earlier” → Use Shift + Page Up (whole screens at a time)

All Scroll Methods

You now have THREE ways to scroll the terminal:
Hover your mouse over the terminal, then scroll with:
  • Mouse wheel
  • Trackpad two-finger scroll
Works when mouse is over terminal. Smooth scrolling.
While typing in prompt:
  • Shift+↑ = up 3 lines
  • Shift+↓ = to bottom
  • Shift+PageUp = up 1 page
  • Shift+PageDown = to bottom
Focus stays in prompt! Keyboard only.
Click and drag the scrollbar on the right side of the terminal.Visual position indicator.

FAQ

No! If you’re in the prompt, just press Shift+Arrow keys. If you want to use the mouse wheel, just hover over the terminal.
Never! Your cursor and text stay exactly where they were.
Press Shift+↓ or Shift+PageDown - one press goes all the way down.
In practice, you almost always want to jump back to the current output. That’s why both “down” shortcuts go straight to the bottom.

Quick Reference

╔═══════════════════════════════════════════════════════════════════════════════════╗
║                                                                                   ║
║                    ⌨️  KEYBOARD SCROLL QUICK REFERENCE                            ║
║                                                                                   ║
║   ┌─────────────────────────────────────────────────────────────────────────────┐ ║
║   │                                                                             │ ║
║   │       Shift + ↑           Scroll UP (3 lines)                               │ ║
║   │                                                                             │ ║
║   │       Shift + ↓           Jump to BOTTOM                                    │ ║
║   │                                                                             │ ║
║   │       Shift + Page Up     Scroll UP (1 page)                                │ ║
║   │                                                                             │ ║
║   │       Shift + Page Down   Jump to BOTTOM                                    │ ║
║   │                                                                             │ ║
║   └─────────────────────────────────────────────────────────────────────────────┘ ║
║                                                                                   ║
║     Remember: These work while you're typing in the prompt!                       ║
║                                                                                   ║
╚═══════════════════════════════════════════════════════════════════════════════════╝