+3 votes

Hi,

In the integrated Godot editor, the "Home" key scrolls to the top of the file and the "End" key to the bottom. Years of ingrained muscle-memory has got me pressing "Home" to go to the start of the line and "End" to go to the end of the line. I can't stop pressing these keys -- I do it without even thinking as I need to move around -- and of course, jumping away from the function I'm writing is not what I want to do!

I've looked through "Editor Settings" "Shortcuts" for any reference to the Home and End keys, but I find nothing. Is there some way to remap these keys? If not (which would be really disappointing) is there some way to completely disable them? Doing nothing would be far better than jumping to the top or bottom of the file every couple minutes!

(I've even tried using an external editor just so that I can have the Home/End keys work as I'm used to them, but I've run into too many issues with improper/unrecognized indenting and the lack of debugging support, so switching to an external editor doesn't seem to be a solution. I really just want to control the Home and End keys.)

Thanks in advance for any help!

in Engine by (15 points)

2 Answers

0 votes

I may be wrong but I don't think that this is a feature. What you can do is go to yours keyboard software and disable these keys.
If you hava a Razer keyboard, you can even create a profile that have these keys disabled and set to automatically change to this profile when the Godot Engine .exe starts (you probably can do the same with other brands, I'm just not 100% sure since my keyboard is from Razer).

by (514 points)
0 votes

Unfortunately there's no feature that I know of that does this. I've been searching around for a solution but became fed up and dug through the source code. In scene/gui/text_edit.cpp, you can make the following changes and recompile.

On line 3008, replace the line with cursor_set_column(0);
On line 3071, replace the line with cursor_set_column(text[cursor.line].length());

That will make the HOME and END keys jump to the beginning and end of the line.

by (14 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.