Why don't we have custom keybinds yet?

User avatar
PolySaken
Member
Posts: 817
Joined: Thu Nov 09, 2017 05:18
GitHub: PolySaken-I-Am
In-game: PolySaken
Location: Wānaka, Aotearoa
Contact:

Why don't we have custom keybinds yet?

by PolySaken » Post

One of the major problems I run into is the lack of keybinds.
The sheer number of mods that make use of the 'special' key is infuriating.
Surely an api function could be implemented like:

Code: Select all

minetest.register_keybind("mod:name", {
description="mykey",
on_press=function(player)
end,
on_release=function(player)
end
})
(Where player is the player who pressed the key)

The list of registered keybinds could be iteratively added to a list of binds that the player can assign themselves, maybe including a default setting for each keybind.
Guidebook Lib, for in-game docs | Poly Decor, some cool blocks | Vision Lib, an all-purpose library.

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: Why don't we have custom keybinds yet?

by paramat » Post

This feature is being discussed, see the GitHub issues page, as is sorting out the 'special' key mess and separating it from 'fastmove'.
Answer is the usual, lack of core dev time because we're unpaid =)

User avatar
rubenwardy
Moderator
Posts: 6972
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: Why don't we have custom keybinds yet?

by rubenwardy » Post

It's not just core dev time. Core devs aren't the only people who can implement features
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
PolySaken
Member
Posts: 817
Joined: Thu Nov 09, 2017 05:18
GitHub: PolySaken-I-Am
In-game: PolySaken
Location: Wānaka, Aotearoa
Contact:

Re: Why don't we have custom keybinds yet?

by PolySaken » Post

rubenwardy wrote:It's not just core dev time. Core devs aren't the only people who can implement features
I'm not really familiar with the engine code, but I can do the C++ thing. Maybe Ill try.
Guidebook Lib, for in-game docs | Poly Decor, some cool blocks | Vision Lib, an all-purpose library.

User avatar
Pyrollo
Developer
Posts: 385
Joined: Mon Jan 08, 2018 15:14
GitHub: pyrollo
In-game: Naj
Location: Paris

Re: Why don't we have custom keybinds yet?

by Pyrollo » Post

There is also design issues:
- What about android controls ?
- How to manage dozens of mods using dozens of different keys without conflicts ?

I thing that could be solved but it needs a good design. And I also often feel lack of customizable keys.
[ Display Modpack ] - [ Digiterms ] - [ Crater MG ] - [ LATE ]

User avatar
Linuxdirk
Member
Posts: 3217
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: Why don't we have custom keybinds yet?

by Linuxdirk » Post

Pyrollo wrote:- What about android controls ?
Android is touch so it is not affected by key configurations unless you attach a keyboard. And then it should behave like the desktop version.
Pyrollo wrote:- How to manage dozens of mods using dozens of different keys without conflicts ?
Have mods to suggest a key to use. If the key is not used by another mod or a user configuration the key is assigned to this action. If it is already used the engine should warn about. Users can configure keys to use actions with plaintext strings like "modname:actionname" (or predefined actions like "jump", "walk forward", etc.).

Keys that are configured with an action of a mod that is not available do nothing when pressed.

User avatar
PolySaken
Member
Posts: 817
Joined: Thu Nov 09, 2017 05:18
GitHub: PolySaken-I-Am
In-game: PolySaken
Location: Wānaka, Aotearoa
Contact:

Re: Why don't we have custom keybinds yet?

by PolySaken » Post

Pyrollo wrote: - How to manage dozens of mods using dozens of different keys without conflicts ?

.
The Idea wasn't to have the mod define which key to use, but rather to define a 'keybind' which can have any key assigned to it by the player. So the player can resolve conflicts themselves
Guidebook Lib, for in-game docs | Poly Decor, some cool blocks | Vision Lib, an all-purpose library.

User avatar
GreenXenith
Member
Posts: 1356
Joined: Wed Oct 28, 2015 01:26
GitHub: GreenXenith
Location: UTC-8:00
Contact:

Re: Why don't we have custom keybinds yet?

by GreenXenith » Post

PolySaken wrote:
Pyrollo wrote: - How to manage dozens of mods using dozens of different keys without conflicts ?

.
The Idea wasn't to have the mod define which key to use, but rather to define a 'keybind' which can have any key assigned to it by the player. So the player can resolve conflicts themselves
I'm pretty sure that creates a breakage, as you would have to send the keybinds to the client and the client would have to return the presses. So only clients supporting it would be able to do so.
YouTube | Mods | Patreon | Minetest Discord @greenxenith

You should not be able to read this message.

User avatar
PolySaken
Member
Posts: 817
Joined: Thu Nov 09, 2017 05:18
GitHub: PolySaken-I-Am
In-game: PolySaken
Location: Wānaka, Aotearoa
Contact:

Re: Why don't we have custom keybinds yet?

by PolySaken » Post

GreenDimond wrote:
PolySaken wrote:
Pyrollo wrote: - How to manage dozens of mods using dozens of different keys without conflicts ?

.
The Idea wasn't to have the mod define which key to use, but rather to define a 'keybind' which can have any key assigned to it by the player. So the player can resolve conflicts themselves
I'm pretty sure that creates a breakage, as you would have to send the keybinds to the client and the client would have to return the presses. So only clients supporting it would be able to do so.
Why would any clients not support it if it were a core feature?
Guidebook Lib, for in-game docs | Poly Decor, some cool blocks | Vision Lib, an all-purpose library.

ShadMOrdre
Member
Posts: 1118
Joined: Mon Dec 29, 2014 08:07
Location: USA

Re: Why don't we have custom keybinds yet?

by ShadMOrdre » Post

This should be implemented in such a way that user control keys are still user-definable, but separated from the keys that are available to mods.

I honestly can't think of many mods, other than mods that expand, refine, or otherwise enhance the player experience aspect of the game, that actually could use more than a single action at a time I'm either opening a door, or using the furnace, or ...

All of those mods do not require a complete keyset available to them, just a standard set of user keys that are well mapped to user actions available within the game being played, in this case MT, not MTG. Here, I'm specifically referring to such actions as fastmove, sneak, prone, use, dig, place, attack, block, run/sprint, the quickslot keys 1-8, inventory, and maybe player stats.

For the most part, anything else is mostly one of the above actions with toggles and combinations to really provide a simple, consistent, yet functionally and fully featured. Too many key options will really make the game unwieldy.

No game should ever be simulation where each action provided by each node is independently mapped to a single keystroke. This greatly complicates things, reduces game playability, and thus, game play value.

Most actions are more easily handled using toggle keys, because some actions are simply not done simultaneously, such as running while prone, or placing while digging.

I would specifically advocate for the following, with additions thought by others, but not too much more than the following:
Along with movement (WASD)
Run/Sprint/Fastmove
Sneak
Prone
Fly and Noclip should be server or game settable, and disabled by default.

Interact - Separate action so users can open doors without
Use - Mod controllable action with access to keystroke.
Dig - This is really a function of a tool, and should be made customizable by mods
Take - This is a basic action, like the above interact
Place - This is akin to the Dig action, and is moddable
Drop - Basic action like Take and Interact

Hit - A basic action
Attack - A function of a weapon, (tool), and thus moddable
Block - A basic action, but moddable

The Quick Slot (HUD) keys 1-8
Perhaps a Use Slot key, for potions, eating, scrolls, and such
Inventory - Access to player inventory
Player Stats - Preferably engine side, moddable otherwise

Shad

User avatar
Linuxdirk
Member
Posts: 3217
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: Why don't we have custom keybinds yet?

by Linuxdirk » Post

GreenDimond wrote:I'm pretty sure that creates a breakage, ...
Of course it would. And thus it will never happen.

User avatar
PolySaken
Member
Posts: 817
Joined: Thu Nov 09, 2017 05:18
GitHub: PolySaken-I-Am
In-game: PolySaken
Location: Wānaka, Aotearoa
Contact:

Re: Why don't we have custom keybinds yet?

by PolySaken » Post

Linuxdirk wrote:
GreenDimond wrote:I'm pretty sure that creates a breakage, ...
Of course it would. And thus it will never happen.
That seems like a way of ignoring ideas.
Guidebook Lib, for in-game docs | Poly Decor, some cool blocks | Vision Lib, an all-purpose library.

User avatar
Hugues Ross
Developer
Posts: 72
Joined: Mon May 06, 2019 22:52
GitHub: Df458
Location: Kitchens, Pantries, etc.
Contact:

Re: Why don't we have custom keybinds yet?

by Hugues Ross » Post

ShadMOrdre wrote:I honestly can't think of many mods, other than mods that expand, refine, or otherwise enhance the player experience aspect of the game, that actually could use more than a single action at a time I'm either opening a door, or using the furnace, or ...
I disagree. As things stand right now, adding new player actions is pretty much entitrely limited to using items and E. There are plenty of interesting actions that something like minetest could have (air dashes, crawling, jetpacks, grabbing and climbing up onto a 2-node ledge... and those are just in-world actions), but the current systems dis-incentivize adding them because buttons are limited and adding more items will clutter the player's inventory.

And of course, games aren't necessarily constrained by the same actions as Minetest, in theory. One of the reasons that they are in practice is the current handling of controls.

As a developer, I don't really see any technical hurdles to:
1. Letting mods define controls in a config file
2. Displaying controls from downloaded mods in the settings, so the player can rebind them
3. Marking any conflicts on that same page
4. Exposing an interface for receiving events based on the control ids

As far as I can tell, that's really all that's needed.

EDIT, just to build on this a little:
There are some other benefits over adding more action buttons that come from a flexible feature like this. First of all, there's no real guarantee that mod/game developers will collaborate well with binding usage. I could definitely see a future where conflicts between several mods that happened to pick the same keybind slot make this a nightmare, whereas something like what I talk about above fixes the issue easily (by letting the user rebind or unbind some actions). There's also the reverse, where two mods with similar actions choose different keybind slots. That would also suck.

Second, I think a system where mods declare their bindings has a nice side-benefit: The engine can make mods provide a name for each action, which would improve the visibility of the keybinds (oh, there's a hotkey for opening inventory tab X?) and also make it clearer in the control settings what you're actually changing. Even if all possible new actions added up to <5 keys, I'd argue that the UX benefits of registering those actions would be worth it alone

ShadMOrdre
Member
Posts: 1118
Joined: Mon Dec 29, 2014 08:07
Location: USA

Re: Why don't we have custom keybinds yet?

by ShadMOrdre » Post

Hughes,

Please consider that the following actions are essentially the same:
Air Dash = Fast + Fly + Forward
Crawling = Prone + Forward
Jetpacks = Vehicle + Forward + Fly (Only useful when wearing the jetpack, in which case, default movement is controlled by the mod providing the Jetpack.
Grabbing = Take / Dig / Hold (I can see where grab / hold item in hand on screen is a useful addition to Take / Dig)
Climbing 2 Nodes (This is essentially the old sneak. As such, it can only be implemented in such a way as to disable the ability to sneak ladder to the top. I like to think of this as Hoist, as in hoisting oneself up. In this case, it should only work if and ONLY if, the node above the second node is empty. If there are 3 nodes, you should not be able to sneak climb / hoist, because there would no place to land.

Again, think that most actions are either derivative of exisitng actions, or similar enough to be considered so, and most of these are the built in player actions available to mods. Some actions are very game specific, and so hardcoding all those details is not an engine issue. The engine should only provide a small set of keys for mods to use, over and above what I consider to be the built in action keys, which are hardcoded to and totally dependent on the actions available to players from within the engine itself.

Not every game will use jetpacks, so to have anything hardcoded specifically for the jetpack doesn't make sense. Jetpacks really only allow you to fly, while moving. This is already encoded to the available engine actions. The Jetpack mod should be able to modify how the movement is made, and maybe provide access to weapons / shields on Jetpack, and a few other gadgets. This can all be accommodated via a small set of extra keys, outside of the standard keybinds for the default engine actions. Not a hard coded fire button or raise shield strength button, but a few buttons that mods can use. If I am not wearing the Jetpack, those mod buttons can be used by whatever item is active at the moment, whether by wielding it, or wearing it. If I am not wielding or wearing or otherwise using an item, why would there be a hard coded key bind, thus limiting all other mods from using it, and leading to the current situation of not enough keybinds?

Please remember, not all games are even 3D simulations or styles of game. Look at Flux.

Shad

User avatar
Hugues Ross
Developer
Posts: 72
Joined: Mon May 06, 2019 22:52
GitHub: Df458
Location: Kitchens, Pantries, etc.
Contact:

Re: Why don't we have custom keybinds yet?

by Hugues Ross » Post

You seem to have completely misunderstood me. I'm not saying to hardcode more actions, I'm explicitly arguing against that!

My point is that actions should be defined on the mod-level, not engine-level as you claim. Also, some of those keybinds look like an absolute nightmare to actually use in practice.

ShadMOrdre
Member
Posts: 1118
Joined: Mon Dec 29, 2014 08:07
Location: USA

Re: Why don't we have custom keybinds yet?

by ShadMOrdre » Post

Hughes,

Sorry if I over read into all that. I do agree for moddable keys, but feel that some actions, being so heavily tied to the engine, maybe should stay hard coded. Yet, I am also thinking about MT engine as not just a voxel game engine, but in a much larger sense, so I can see where maybe all keys being available to and through the LuaAPI actually expands the potential of MT as something far greater than a game engine.

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: Why don't we have custom keybinds yet?

by runs » Post

I said it, instead of changing the engine, better to do little 'things' to improve Minetest, like this idea.

ShadMOrdre
Member
Posts: 1118
Joined: Mon Dec 29, 2014 08:07
Location: USA

Re: Why don't we have custom keybinds yet?

by ShadMOrdre » Post

So, the keys are available through the API via two functions, one for control bits, and one using booleans for each keypress.

There is also a controls mod, that did some efforts towards making some of this more accessible.

The best way to continue this discussion, is to come up with a small set of extra keys, to have exposed through the Lua API, that is not or cannot otherwise be handled through the existing keyset.

Think, the Jetpack example from above, while not perfect, is something to consider. Movement is still controlled via the built in movement keys, WASD and Space / Shift for up / down. Shift, being already the "sneak" key, should be usable in the flying context to slow down flight when both fast and fly are enabled, so using "sneak" / shift for down doesn't make sense.

A healthy discussion of keys to include, that are exposed through the API and accessible to mods for custom behavior, on top of the hardcoded keys for general movement, inventory and other built in behaviors can really help with efforts to make this happen.

A well thought out key map is more easily sold to the developers. General statements regarding the issue followed by a random set of actions that are actually more mod dependent than engine dependent, will not sell the developers on adding those actions. Those actions are defined by the mod providing the items for which the actions are defined. So instead of saying something like "Oh, a key that does this action or that action", a statement like:

Code: Select all

"Since the existing keys are hardcoded to very specific engine actions, can a small set of additional keys be exposed to the Lua API for general purpose programming via mods.
If the answer is yes, (not necessarily a yes from the devs, but a yes from us in the community capable of making it happen), then lets discuss the keys, how many, and who amongst the community has the requisite skill set to code this in C and present a pull request to the engine devs.

Shad

Jessss
Member
Posts: 10
Joined: Fri Aug 30, 2019 15:48

Re: Why don't we have custom keybinds yet?

by Jessss » Post

Pyrollo wrote:There is also design issues:
- What about android controls ?
- How to manage dozens of mods using dozens of different keys without conflicts ?

I thing that could be solved but it needs a good design. And I also often feel lack of customizable keys.
android should be a very low priority. it distracts from the game and hampers it. no one uses phones.

Jessss
Member
Posts: 10
Joined: Fri Aug 30, 2019 15:48

Re: Why don't we have custom keybinds yet?

by Jessss » Post

[quote="ShadMOrdre"]

Code: Select all

"Since the existing keys are hardcoded to very specific engine actions, can a small set of additional keys be exposed to the Lua API for general purpose programming via mods.
I don't understand why they are hard coded. Who does that?
Someone might have different looking keyboard or inputs.

User avatar
PolySaken
Member
Posts: 817
Joined: Thu Nov 09, 2017 05:18
GitHub: PolySaken-I-Am
In-game: PolySaken
Location: Wānaka, Aotearoa
Contact:

Re: Why don't we have custom keybinds yet?

by PolySaken » Post

Jessss wrote:
ShadMOrdre wrote:

Code: Select all

"Since the existing keys are hardcoded to very specific engine actions, can a small set of additional keys be exposed to the Lua API for general purpose programming via mods.
I don't understand why they are hard coded. Who does that?
Someone might have different looking keyboard or inputs.
It's much easier to have set bindings than modifiable ones because modifiable bindings need two parameters: <key> and <action> rather than just <key>
Guidebook Lib, for in-game docs | Poly Decor, some cool blocks | Vision Lib, an all-purpose library.

User avatar
Kalabasa
Member
Posts: 37
Joined: Tue Jan 06, 2015 17:36
GitHub: Kalabasa
IRC: Kalabasa
In-game: Kalabasa

Re: Why don't we have custom keybinds yet?

by Kalabasa » Post

Jessss wrote:
Pyrollo wrote:There is also design issues:
- What about android controls ?
- How to manage dozens of mods using dozens of different keys without conflicts ?

I thing that could be solved but it needs a good design. And I also often feel lack of customizable keys.
android should be a very low priority. it distracts from the game and hampers it. no one uses phones.
Apparently, ~90% of players are on mobile.

https://kitsunemimi.pw/tmp/serverlist_s ... -03-17.txt
insert signature here

User avatar
PolySaken
Member
Posts: 817
Joined: Thu Nov 09, 2017 05:18
GitHub: PolySaken-I-Am
In-game: PolySaken
Location: Wānaka, Aotearoa
Contact:

Re: Why don't we have custom keybinds yet?

by PolySaken » Post

Kalabasa wrote:
Jessss wrote:
Pyrollo wrote:There is also design issues:
- What about android controls ?
- How to manage dozens of mods using dozens of different keys without conflicts ?

I thing that could be solved but it needs a good design. And I also often feel lack of customizable keys.
android should be a very low priority. it distracts from the game and hampers it. no one uses phones.
Apparently, ~90% of players are on mobile.

https://kitsunemimi.pw/tmp/serverlist_s ... -03-17.txt
There is no 'good' way to handle custom controls for android anyway. The only option that actually works is if mods register their own buttons on screen, which causes clutter.
This was the biggest issue with modPE back in the day cause' there were only five buttons.
Guidebook Lib, for in-game docs | Poly Decor, some cool blocks | Vision Lib, an all-purpose library.

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: Why don't we have custom keybinds yet?

by paramat » Post

PolySaken wrote:
Linuxdirk wrote:
GreenDimond wrote:I'm pretty sure that creates a breakage, ...
Of course it would. And thus it will never happen.
That seems like a way of ignoring ideas.
The impression Linuxdirk gives here about MT development is not accurate and is characteristically negative.
We are careful about breakage for good reason, it is not done to obstruct ideas.

User avatar
PolySaken
Member
Posts: 817
Joined: Thu Nov 09, 2017 05:18
GitHub: PolySaken-I-Am
In-game: PolySaken
Location: Wānaka, Aotearoa
Contact:

Re: Why don't we have custom keybinds yet?

by PolySaken » Post

paramat wrote:
PolySaken wrote:
Linuxdirk wrote: Of course it would. And thus it will never happen.
That seems like a way of ignoring ideas.
The impression Linuxdirk gives here about MT development is not accurate and is characteristically negative.
We are careful about breakage for good reason, it is not done to obstruct ideas.
It's worse to worry and hinder progress than to break compatibility with older versions though
Guidebook Lib, for in-game docs | Poly Decor, some cool blocks | Vision Lib, an all-purpose library.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests