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 code, script and node navigation & history controls using auxiliary (back/forward) mouse buttons #954

Open
golddotasksquestions opened this issue May 28, 2020 · 3 comments
Milestone

Comments

@golddotasksquestions
Copy link

Describe the project you are working on: Applies to all games and projects

Describe the problem or limitation you are having in your project:
I would like to quickly jump back and forth in the history of my code and script and node navigation. I use a 5 button mouse because it speeds up my web browsing to the tenfold. I would love the same speed and usability in Godot.

Original issue: godotengine/godot#26272

Describe the feature / enhancement and how it helps to overcome the problem or limitation:
5th mouse button to jump back in cursor navigation history / previous script / last selected node, 4th mouse button to jump forward.
Provide configuration options in the Editor to set custom keys/buttons or keyboard shortcuts and options to enable/disable jumping the cursor navigation history / script or node selection.
This way the user could use use the 4th and 5th mouse button to only jump between used scripts or between selected nodes or between cursor position in single script or any two of those options.

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
image

If this enhancement will not be used often, can it be worked around with a few lines of script?:
I don't think so?

Is there a reason why this should be core and not an add-on in the asset library?:
Usability features should be built in, I believe.

@kyleguarco
Copy link

kyleguarco commented May 28, 2020

Just to clarify, you want the ability to jump back and forth between previously opened scenes/scripts?

As an example, say you have opened scene_1 and script_1 recently. You want the ability to jump from scene_1 and script_1 using hotkeys, right?

I would love this feature.

@golddotasksquestions
Copy link
Author

Yeah. Well I imagine it to work like this:

Imagine you are in the script1 of scene1, you wrote a bunch of code, added a bunch of methods, then you realize you need to add another variable to the class scope. So you scoll up, add the variable, scroll back down, continue to add another method, then you realize you want another class variable, scroll back up again ... and down again ....
Instead of scrolling you could just press the 5th mouse button to go back to the last position you clicked in your script. You write a bunch of code then press 4th mouse button to go back to where you where before. If you would hit 5th mouse button again you would go back to that last cursor position before you jumped back forward ...

The script navigation history remembers only "jumps" (mouse clicks or key movement).
So if you would start to write at line 0 and write all your code in one go to line 50, pressing 5th mouse button (back) would bring you to line 0 position 0.

Imagine you wrote a few lines in scriptX of sceneX and then move ahead to scriptY of sceneX and write a few lines in one go in scriptY, I imagine hitting the 5th mouse button once will bring you exactly where you started out in scriptY when you came over from scriptX.
If you were to hit the 5th mouse button twice you would first jump back where you started out in scriptY when you came over from scriptX and then further back to the last position in script X.

Similarly, if your active panel is the 2D or 3D viewport, you would move the selected nodes back and forth with 5th and 4th mouse button.

@Calinou
Copy link
Member

Calinou commented May 29, 2020

godotengine/godot#36910 implements auxiliary mouse button navigation for the script editor.

@Calinou Calinou changed the title Add code, script and node navigation & history controls Add code, script and node navigation & history controls using auxiliary mouse buttons Sep 15, 2020
@Calinou Calinou changed the title Add code, script and node navigation & history controls using auxiliary mouse buttons Add code, script and node navigation & history controls using auxiliary (back/forward) mouse buttons Oct 22, 2020
@Calinou Calinou added this to the 4.0 milestone Jan 3, 2021
@aaronfranke aaronfranke modified the milestones: 4.0, 4.x Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants