Coding Horror

programming and human factors

(Very) Basic Textbox Keyboard Shortcuts

Everyone knows how to use the arrow keys to navigate within textboxes. But not many people know there are a slew of handy keyboard shortcuts for editing text in textboxes. And these keyboard shortcuts work everywhere, even in the most basic input areas – including vanilla HTML forms, such as the Wikipedia edit box.

(Note that on a Mac you may need to substitute Cmd for Ctrl.)

Moving the Cursor

Ctrl+
Move cursor to next word

Ctrl+
Move cursor to previous word

Ctrl+
Scroll text area up (only works in some apps)

Ctrl+
Scroll text area down (only works in some apps)

End
Move cursor to end of line

Home
Move cursor to start of line

Ctrl+Home
Move cursor to beginning of text

Ctrl+End
Move cursor to end of text

Cut, Paste, and Undo

Ctrl+X, or Shift+Del
Cut selected text

Ctrl+C, or Ctrl+Ins
Copy selected text

Ctrl+V, or Shift+Ins
Paste selected text

Ctrl+Z
Undo last edit

Ctrl+Y
Redo last edit

Deleting Text

Ctrl+Del
Delete forward to word break

Ctrl+Backspace
Delete back to word break

Selecting Text

Ctrl+A
Select all text

Shift+
Extend selection one character to the right

Shift+
Extend selection one character to the left

Shift+
Extend selection down one line

Shift+
Extend selection up one line

Shift+Home
Extend selection to beginning of line

Shift+End
Extend selection to end of line

Shift+Ctrl+
Extend selection to next word break

Shift+Ctrl+
Extend selection to previous word break

Shift+Ctrl+
Extend selection to below paragraph

Shift+Ctrl+
Extend selection to above paragraph

Shift+Ctrl+Home
Extend selection to top of text

Shift+Ctrl+End
Extend selection to bottom of text

Navigation

Tab
Move to next input area on form

Shift+Tab
Move to previous input area on form

Other

Shift+Enter
Add a manual line break

Ctrl+Enter
Submit form (if textarea is part of a form and has support)

All of these shortcuts work in any standard textbox, like the ones on every web page and in most apps for your operating system. Try them out!

Written by Jeff Atwood

Indoor enthusiast. Co-founder of Stack Overflow and Discourse. Disclaimer: I have no idea what I'm talking about. Find me here: https://infosec.exchange/@codinghorror