Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Home/End to text caret movements on macOS #94073

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

mihe
Copy link
Contributor

@mihe mihe commented Jul 8, 2024

Fixes #90826.

This adds the Home and End keys to the default bindings for the ui_text_caret_line_start and ui_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 and ui_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.

@akien-mga akien-mga modified the milestones: 4.x, 4.3 Jul 8, 2024
@akien-mga akien-mga merged commit 3ced38c into godotengine:master Jul 8, 2024
18 checks passed
@mihe mihe deleted the macos-home-end branch July 8, 2024 17:25
@akien-mga
Copy link
Member

Thanks!

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.

"Home" and "End" keys do not work in the editor in MacOS
4 participants