Skip to content

Add tab key moves focus to TextEdit - #102663

Open
Giganzo wants to merge 1 commit into
godotengine:masterfrom
Giganzo:textedit-tab-key
Open

Add tab key moves focus to TextEdit#102663
Giganzo wants to merge 1 commit into
godotengine:masterfrom
Giganzo:textedit-tab-key

Conversation

@Giganzo

@Giganzo Giganzo commented Feb 10, 2025

Copy link
Copy Markdown
Contributor

Proposal: closes godotengine/godot-proposals#3050

This PR adds a new option that lets you toggle the TextEdit/CodeEdit Tab trapping behavior. And a new shortcut to the Script/Shader editor to help out with keyboard navigation.

Screenshot_20250208_205615

Screenshot_20250208_211344

Editor

TextEdit

For TextEdit's used in the editor itself the setting has been set to true, going by this comment in the linked proposal:

...as most people won't be entering code in TextEdit nodes in projects.

Behavior can be changed by right clicking and changine the "Tab Key Moves Focus" option.

Screencast_20250208_211957.webm

Script/Shader Editor

A new shortcut has been added (default Ctrl+M, same as VS Code uses)

Screencast_20250208_221144.webm

@Giganzo
Giganzo requested review from a team as code owners February 10, 2025 16:02
@Calinou Calinou added this to the 4.5 milestone Feb 10, 2025
@KoBeWi KoBeWi modified the milestones: 4.5, 4.x Feb 10, 2025
@Giganzo
Giganzo force-pushed the textedit-tab-key branch 2 times, most recently from d86c975 to fc631fc Compare February 10, 2025 19:41
@kitbdev

kitbdev commented May 1, 2025

Copy link
Copy Markdown
Contributor

It looks like #76829 adds a similar property tab_input_mode, and a shortcut to TextEdit directly.
This can be rebased to use that instead.

@KoBeWi

KoBeWi commented May 15, 2025

Copy link
Copy Markdown
Member

Wouldn't it be better to add "editing mode" like in LineEdit? Though not sure about script editor 🤔 It would make sense for the inspector, so maybe we need both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a property to LineEdit and TextEdit to make it not capture KEY_TAB (= ui_focus_next)

4 participants