Move keybinding settings to (Lua-based) setting menu#15791
Conversation
f34b127 to
b80e86f
Compare
b80e86f to
b6fd155
Compare
This comment was marked as outdated.
This comment was marked as outdated.
I tried #15791 (comment). It does not crop the text, but it looks worse IMO, so I reverted it. IMO it might be better to change the setting menu to use up the full screen/window space, which will (in general) create less problems for setting entries with two columns; although that would be out of scope for this PR. |
ce229cc to
a992320
Compare
There was a problem hiding this comment.
Thank you for working on this.
Suggestions:
-
The menu feels like it's not using the available vertical space well enough. I have to scroll a lot to see all the keybindings. Current layout:

I think something like this would be an improvement (button height reduced to 0.6, spacing reduced heavily as well):

(The "info" buttons would need to be put in again of course)
EDIT: in hindsight, this is too cramped, see newer proposal below instead -
It's impossible to set a keybinding to mouse buttons, even though dig/place are listed and show them correctly
-
It might make sense to put the keybinding section below a new sub-heading
5243f2c to
6704a8f
Compare
The height of 0.8 is taken from other elements, so I would like to keep it this way for consistency. I would personally prefer having a dedicated tab with a table of keybindings, but this does not seem to fit well into the way the setting form is currently designed.
Fixed in 33adc71:
Done in cfaf84d. |
2dcf68b to
d719328
Compare
Thank you, that looks good.
Reducing the height would indeed make things look more inconsistent. It could be a significant improvement in this case though. The amount of hidden pixels (the amount of scrolling necessary to see all the keybindings) was reduced by about 40% in my test (from 3711 to 2185). Maybe it would be possible to argue that buttons that usually only show a single letter don't need as much space :) Since #13282, the keybinding menu also serves the purpose of informing the user about the controls, so being able to get a quick overview is useful. Some of the keys listed at the very bottom are actually quite useful, like the viewing range and camera mode keys, so you'd want users to scroll all the way. On a side note, it might make sense to move these three further up.
It indeed doesn't. However, what you could do (not saying you should) is moving the keybinding settings to a separate dialog again, just in Lua instead of C++ this time. This would also allow the keybindings to use the full available screen space. |
Why exactly do we need this additional dialogue? Could we instead listen to mouse/keypad events as well to shorten the following steps ...
... to this:
|
d719328 to
7446d7d
Compare
The main issue was that I could not figure out how to cleanly handle mouse buttons with the keybinding button. I have a solution now (and committed) so I reverted the dialog. Side note: We will likely still want a dialog for #15934, but we can leave it to that PR instead of here. |
d2cb7b5 to
b74ee3f
Compare
b74ee3f to
0869380
Compare
…cle (e.g. A -> B -> A)
| # Key for switching to the previous entry in Quicktune. | ||
| keymap_quicktune_prev (Quicktune: select previous entry) key | ||
|
|
||
| # Key for switching to the next entry in Quicktune. | ||
| keymap_quicktune_next (Quicktune: select next entry) key | ||
|
|
||
| # Key for decrementing the selected value in Quicktune. | ||
| keymap_quicktune_dec (Quicktune: decrement value) key | ||
|
|
||
| # Key for incrementing the selected value in Quicktune. | ||
| keymap_quicktune_inc (Quicktune: increment value) key |
There was a problem hiding this comment.
I hope the description for Quicktune keys is correct? (I have never used quicktune before)
grorp
left a comment
There was a problem hiding this comment.
Looks good 👍
Thank you for working on this!



#15614 (comment)
Alternative to #15152.
Due to merge conflicts, please merge this after #14964.
This PR removes the dedicated settings menu for keybindings and instead adds the keybinding settings to the "Keyboard and mouse" section in the settings menu.
This PR introduces a
button_keyformspec element for capturing key inputs. This element is used in the Lua-based settings menu.The
aux1_descends,doubletap_jump, andautojumpoptions (which were also included in the keybinding form) can be found in "Controls" -> "General".2.3 UI Improvements.
To do
This PR is ready for review.
button_keyelement.Add sections to the keybinding list.How to test
See #15152.