godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.18k stars 19.97k forks source link

MacOS Script editor loses default OS level Emacs keybindings #78122

Open kevzettler opened 1 year ago

kevzettler commented 1 year ago

Godot version

4.0.3.stable.official

System information

macOS Monterey version 12.4

Issue description

MacOS has default key bindings for all OS level text fields. These key bindings are usually available on every MacOS text input. These keybindings match default Emacs key bindings. I'm using these key bindings on this Github Issue input right now.

These keybindings are not available in the Godot script editor input. In particular I've noticed that:

Ctrl+P. - line up Ctrl+N - line down Alt+Forward - forward line Alt+Back - Backward line

Are not working in the script editor and probably some others. Inversely the key bindings

Ctrl+A - move to start of line Ctrl+E - move to end of line

Are working in the script editor.

Steps to reproduce

Try to use the script editor on Godot MacOS and use keybindings

Ctrl+P. - line up Ctrl+N - line down Alt+Forward - forward line Alt+Back - Backward line

Go any where else to edit text on MacOS and use those key bindings

Minimal reproduction project

Try to use the script editor on Godot MacOS and use keybindings

Ctrl+P. - line up Ctrl+N - line down Alt+Forward - forward line Alt+Back - Backward line

Go any where else to edit text on MacOS and use those key bindings

YuriSizov commented 1 year ago

This is not technically a bug, since Godot doesn't use native UI toolkits for any platform. So any relevant shortcuts need to be implemented anew (e.g. https://github.com/godotengine/godot/pull/47618). Other than that, there is no reason not to have them, so PRs are welcome!

inhalt120g commented 11 months ago

(4.1) One other keyboard combination I use a lot is Command (or Option) + delete (which deletes either the whole line or word). This mostly works in Godot 4.1, but not everywhere, for example it works in the IDE (which is very nice) but not in, for example when selecting the option to rename a file in the FileSystem panel.