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 "+/-" shortkeys to edit variables in inspector #29

Closed
ghost opened this issue Sep 5, 2019 · 12 comments · Fixed by godotengine/godot#41855
Closed

Add "+/-" shortkeys to edit variables in inspector #29

ghost opened this issue Sep 5, 2019 · 12 comments · Fixed by godotengine/godot#41855
Milestone

Comments

@ghost
Copy link

ghost commented Sep 5, 2019

Describe enhancement of the existing feature:
To change integer value in the Inspector you can:

  • Click into the field, drag mouse up/down or left/right to +1/-1. (Mouse)
  • Use buttons up/down near the field. (Mouse)
  • Click into the field, set new value. (Keyboard)

It would be great, if you can increment/decrement integer values using keyboard, like:

  • Click into the field, use up/down keys to +1/-1 (Keyboard)

Now if you use up/down keys when you are editing the field it will set cursor position to begin/end of value (Which is not that useful in my opinion.)
L5zTaFR

As title says, this issue is about "+/-" short-keys, but in discussion below @girng suggested a better way.
I can't change the issue title.

@Xrayez
Copy link
Contributor

Xrayez commented Sep 5, 2019

but it require to click on them using mouse

Sometimes I found it difficult to hit the right arrow (no pun intended!).

@nathanfranke
Copy link
Contributor

It will be easier to use +/- buttons on keyboard.

How would the behaviour work if the user selects inside of the field (like text)? Currently, it literally types a '+' or '-' which a lot of users need to input math (Like '200+10' which is later evaluated)

@JustYourAverageJosh
Copy link

It will be easier to use +/- buttons on keyboard.

How would the behaviour work if the user selects inside of the field (like text)? Currently, it literally types a '+' or '-' which a lot of users need to input math (Like '200+10' which is later evaluated)

Perhaps using the up and down keys would work better then?

@ghost
Copy link
Author

ghost commented Sep 5, 2019

How would the behaviour work if the user selects inside of the field (like text)?

In a normal way I suppose, this feature shouldn't work while editing value and should work only with integers. If you press increment/decrement buttons it will select field, but not edit it.

image
As @JustYourAverageJosh mentioned, it will be logically use Up/Down buttons on keyboard, but they are using for navigation in the inspector. (Ctrl + Up/Down, also needed for something else).

Shift + Up/Down seems free (it used to change nodes position in scene editing, but it isn't work while using an inspector).

@girng
Copy link

girng commented Sep 5, 2019

you can:

  • click into the field, and drag mouse left or right (this would work nice with your circle).
  • use the arrow buttons
  • or just simply edit the field to adjust your value.

i think the functionality to modify an int value is sufficient

@ghost
Copy link
Author

ghost commented Sep 6, 2019

use the arrow buttons

Usually when you need the arrow buttons, you use them at least 3-5 times. It will improve user experience, if simple action like this could be accomplished without using mouse.

There are a lot of mini improvements in editing experience, like delete button in the Inspector affect selected node, not selected value-field, but for them issues already created.

@Xrayez
Copy link
Contributor

Xrayez commented Sep 6, 2019

click into the field, and drag mouse left or right (this would work nice with your circle)

Imagine I have to seed a value from inspector while the game is running.

It's simply not as easy to control the exact number of increments/decrements with mouse movement, you could accidentally go through in-between values which would lead to unnecessary generation steps which could take a while (this could be optimized but that not the point here).

And there's not enough space on the mouse pad to keep changing the value infinitely. 🙂

@girng
Copy link

girng commented Sep 6, 2019

i think clicking inside the int field, then using arrow keys is ideal, if you want keyboard precision.

+/- would imo hurt the user experience, cause some keyboards don't have the numpad, and if they don't, the user has to hold shift.

@coppolaemilio
Copy link
Member

coppolaemilio commented Sep 4, 2020

Clicking inside the field and using the arrow keys is totally what I do every time (even if it doesn't work) because I'm used to doing exactly that within the web inspector while working on websites. You select a CSS value, press the up or down keys and modify the value by 1 while your eyes are looking at the element on the screen.
Also pressing shift + up or shift + down adds or subtracts 10 units.

I would love to see this implemented so my muscle memory works when I use Godot. I'll try to get it done 💪

@Calinou Calinou changed the title "+/-" shortkeys to edit variables in inspector Add "+/-" shortkeys to edit variables in inspector Sep 4, 2020
@Razoric480
Copy link

Quoting my response in discussion from PR to issue for potential discussing:

An issue occurs with using devtools style is that in GDScript, you can export a variable with a given step. I.E.

@export_range(0, 100, 0.5)
var my_exported_range = 50.0

So the question occurs: if pressing up does 0.5, if the user holds down CTRL/CMD, SHIFT or ALT and presses up, how does the number react? 50.0, 5.0, 0.5, 0.05?

The default step for floating point numbers is 0.001, furthermore. Unless we force the values to 100, 10, 1, 0.1, that makes even ctrl/cmd have only a small effect.

EDIT: One suggestion is to make modifier-less up and down use step, and the rest go with their devtool style of 100, 10 and 0.1.

@shayded-exe

This comment has been minimized.

@YuriSizov
Copy link
Contributor

@rshea0 Please don't bump issues if you just want to support the idea, use the 👍 reaction on the post instead.

Razoric480 added a commit to Razoric480/godot that referenced this issue Sep 28, 2021
@akien-mga akien-mga added this to the 4.0 milestone Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants