Add Home/End to text caret movements on macOS #94073
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #90826.
This adds the Home and End keys to the default bindings for the
ui_text_caret_line_start
andui_text_caret_line_end
shortcuts respectively, for macOS.While it's true (as discussed in #90826) that this isn't the primary shortcut for this on macOS, it is nevertheless supported by pretty much every other text editor out there, including macOS' native text fields, macOS TextEdit, VS Code, Sublime Text, JetBrains products, and I'm sure many others. There's no real reason why Godot shouldn't also have this in the bindings by default.
I also threw in bindings for
ui_text_caret_document_start
andui_text_caret_document_end
, since they sort of go hand-in-hand. This was however slightly more fragmented across the various applications. macOS TextEdit and Sublime Text binds this as Ctrl+Home/End, whereas JetBrains products binds this as Cmd+Home/End, and VS Code binds neither of these. I opted to go with Cmd+Home/End, since other similar caret movements in Godot also used the Cmd modifier.