Purpose

Explains the difference between “Move Caret to Page Bottom/Top” (visible area) vs “Move Caret to Text End/Start” (entire file) in WebStorm and other JetBrains IDEs on macOS.

Key Findings

  • “Page” navigation moves within visible area only - not to file boundaries
  • “Text Start/End” navigation moves to file boundaries - beginning or end of entire document
  • Mac keyboards lack Home/End keys, requiring Fn-based shortcuts
  • Different actions exist for line-level, page-level, and file-level navigation

The Confusion Explained

Why “Move Caret to Page Bottom” Doesn’t Go to End of File

Critical distinction:

“Move Caret to Page Bottom” only moves the caret to the bottom of the visible portion of the page. If the page is longer than what you can see in the window at that moment, it won’t reach the bottom of the file.

This is working as designed - “page” refers to the viewport (what’s currently visible), not the entire document.

WebStorm has THREE levels of caret navigation:

1. Line-Level Navigation

ActionMac Shortcut
Beginning of lineFn + ←
End of lineFn + →

2. Page-Level Navigation (Visible Area)

ActionMac Shortcut
Top of visible pageCtrl + Page Up or Fn + Cmd + ↑
Bottom of visible pageCtrl + Page Down or Fn + Cmd + ↓

These move only within what’s currently visible on screen.

3. File-Level Navigation (Entire Document)

ActionMac ShortcutKeymap Action Name
Beginning of fileFn + Cmd + ← or Cmd + Home”Move Caret to Text Start”
End of fileFn + Cmd + → or Cmd + End”Move Caret to Text End”

These move to the absolute start/end of the file.

Complete Keyboard Shortcuts Reference (Mac)

Basic Navigation

ActionShortcutNotes
Beginning of lineFn + ←First character of current line
End of lineFn + →Last character of current line
Top of visible pageCtrl + Page UpTop of viewport
Bottom of visible pageCtrl + Page DownBottom of viewport
Beginning of fileFn + Cmd + ←First line of document
End of fileFn + Cmd + →Last line of document

With Selection (Add Shift)

Adding Shift to any navigation shortcut selects text from current position to target:

ActionShortcut
Select to line startShift + Fn + ←
Select to line endShift + Fn + →
Select to file startShift + Fn + Cmd + ←
Select to file endShift + Fn + Cmd + →

Keymap action name: “Move Caret to Text End/Start with Selection”

Alternative: Go to Line

If you don’t have Home/End keys or shortcuts aren’t working:

Cmd + G

Opens “Go to Line” dialog:

  • Enter 1 for beginning of file
  • Enter last line number for end of file

Why Mac Keyboards Are Different

Mac keyboards (especially MacBook) lack dedicated Home/End keys, requiring:

  • Fn key combinations to emulate missing keys
  • Different muscle memory than Windows/Linux

Default WebStorm shortcuts assume:

  • Cmd + Home for file start
  • Cmd + End for file end

But without physical Home/End keys, you must use:

  • Fn + Cmd + ← (emulates Cmd+Home)
  • Fn + Cmd + → (emulates Cmd+End)

Customizing Shortcuts

Opening Keymap Settings

Cmd + , (Settings)
→ Keymap

Or:

Ctrl + Alt + S (on Mac: Cmd + ,)
→ Keymap

Finding Actions to Remap

Search for these action names in Keymap settings:

Action NameDefault Mac Shortcut
Move Caret to Text StartCmd + Home or Fn + Cmd + ←
Move Caret to Text EndCmd + End or Fn + Cmd + →
Move Caret to Text Start with SelectionShift + Cmd + Home
Move Caret to Text End with SelectionShift + Cmd + End
Move Caret to Page TopCtrl + Page Up
Move Caret to Page BottomCtrl + Page Down

If the default Fn + Cmd + ←/→ feels awkward, consider remapping to:

  • Cmd + ↑ for file start (may conflict with “Move Caret to Page Top”)
  • Cmd + ↓ for file end (may conflict with “Move Caret to Page Bottom”)

Trade-off: Easier file navigation but loses page-level shortcuts.

Common Issues

Issue: Shortcut Does Nothing

Possible causes:

  1. Keymap conflict - another action is using the same shortcut
  2. “Fn” key not working - check System Settings > Keyboard
  3. External keyboard may have different key layout

Solution:

Settings (Cmd + ,) → Keymap
→ Search for "Move Caret to Text Start"
→ Check assigned shortcuts
→ Add new shortcut if needed

Issue: Goes to Wrong Location

Check which action you’re using:

  • Page Bottom = bottom of visible area (viewport)
  • Text End = end of file

Use Fn + Cmd + → for true end-of-file navigation.

Issue: Fn Key Not Working

macOS System Settings:

System Settings
→ Keyboard
→ Keyboard Shortcuts
→ Function Keys
→ Ensure "Use F1, F2, etc. as standard function keys" is configured correctly

Quick Reference Card

Print-friendly cheat sheet:

╔════════════════════════════════════════════════╗
║ WebStorm Caret Navigation (Mac) ║
╠════════════════════════════════════════════════╣
║ Line Start: Fn + ← ║
║ Line End: Fn + → ║
║ Page Top: Ctrl + Page Up ║
║ Page Bottom: Ctrl + Page Down ║
║ File Start: Fn + Cmd + ← ║
║ File End: Fn + Cmd + → ║
║ ║
║ Add Shift to any shortcut to SELECT text ║
║ ║
║ Alternative: Cmd + G (Go to Line) ║
╚════════════════════════════════════════════════╝

Sources

  1. Keyboard Shortcut - Select text to the beginning/end of document - JetBrains Support
  2. How to move cursor to top of document on MacBook Pro - JetBrains Support
  3. Configure keyboard shortcuts - WebStorm Documentation
  4. Predefined macOS keymap - IntelliJ IDEA Documentation
  5. WebStorm keyboard shortcuts - WebStorm Documentation