Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

LineEdit

Inherits: Control < CanvasItem < Node < Object

An input field for single-line text.

Description

LineEdit provides an input field for editing a single line of text. It features many built-in shortcuts that are always available (Ctrl here maps to Cmd on macOS):

  • Ctrl + C: Copy

  • Ctrl + X: Cut

  • Ctrl + V or Ctrl + Y: Paste/"yank"

  • Ctrl + Z: Undo

  • Ctrl + ~: Swap input direction.

  • Ctrl + Shift + Z: Redo

  • Ctrl + U: Delete text from the caret position to the beginning of the line

  • Ctrl + K: Delete text from the caret position to the end of the line

  • Ctrl + A: Select all text

  • Up Arrow/Down Arrow: Move the caret to the beginning/end of the line

On macOS, some extra keyboard shortcuts are available:

  • Cmd + F: Same as Right Arrow, move the caret one character right

  • Cmd + B: Same as Left Arrow, move the caret one character left

  • Cmd + P: Same as Up Arrow, move the caret to the previous line

  • Cmd + N: Same as Down Arrow, move the caret to the next line

  • Cmd<