Why don't we have custom keybinds yet?

User avatar
PolySaken
Member
 
Posts: 341
Joined: Thu Nov 09, 2017 05:18
Location: djelibabi
GitHub: PolySaken-I-Am
In-game: PolySaken

Why don't we have custom keybinds yet?

by PolySaken » Tue Jul 02, 2019 20:58

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.
 

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

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

by paramat » Wed Jul 03, 2019 01:46

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: 5788
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

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

by rubenwardy » Wed Jul 03, 2019 02:09

It's not just core dev time. Core devs aren't the only people who can implement features
 

User avatar
PolySaken
Member
 
Posts: 341
Joined: Thu Nov 09, 2017 05:18
Location: djelibabi
GitHub: PolySaken-I-Am
In-game: PolySaken

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

by PolySaken » Wed Jul 03, 2019 05:45

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.
 

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

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

by Pyrollo » Wed Jul 03, 2019 07:17

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: 2106
Joined: Wed Sep 17, 2014 11:21
Location: Germany
In-game: Linuxdirk

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

by Linuxdirk » Wed Jul 03, 2019 08:23

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: 341
Joined: Thu Nov 09, 2017 05:18
Location: djelibabi
GitHub: PolySaken-I-Am
In-game: PolySaken

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

by PolySaken » Wed Jul 03, 2019 20:45

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
 

User avatar
GreenDimond
Member
 
Posts: 1267
Joined: Wed Oct 28, 2015 01:26
Location: SCP-3008
GitHub: GreenXenith
IRC: GreenDimond
In-game: GreenDimond

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

by GreenDimond » Thu Jul 04, 2019 04:48

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.
Y▹uTube | Mods | Patreon | Minetest Discord | GreenDimond#3232
 

User avatar
PolySaken
Member
 
Posts: 341
Joined: Thu Nov 09, 2017 05:18
Location: djelibabi
GitHub: PolySaken-I-Am
In-game: PolySaken

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

by PolySaken » Thu Jul 04, 2019 06:53

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?
 

ShadMOrdre
Member
 
Posts: 465
Joined: Mon Dec 29, 2014 08:07
Location: USA
GitHub: ShadMOrdre
In-game: shadmordre

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

by ShadMOrdre » Thu Jul 04, 2019 07:36

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
MY MODS: lib_ecology lib_materials lib_clouds lib_node_shapes ---- Inspired By: Open Source Virtual World Simulator Opensimulator.
 

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

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

by Linuxdirk » Thu Jul 04, 2019 09:48

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: 341
Joined: Thu Nov 09, 2017 05:18
Location: djelibabi
GitHub: PolySaken-I-Am
In-game: PolySaken

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

by PolySaken » Thu Jul 04, 2019 20:40

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.
 

User avatar
Hugues Ross
Member
 
Posts: 28
Joined: Mon May 06, 2019 22:52
GitHub: Df458

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

by Hugues Ross » Fri Jul 05, 2019 11:26

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: 465
Joined: Mon Dec 29, 2014 08:07
Location: USA
GitHub: ShadMOrdre
In-game: shadmordre

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

by ShadMOrdre » Fri Jul 05, 2019 23:26

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
MY MODS: lib_ecology lib_materials lib_clouds lib_node_shapes ---- Inspired By: Open Source Virtual World Simulator Opensimulator.
 

User avatar
Hugues Ross
Member
 
Posts: 28
Joined: Mon May 06, 2019 22:52
GitHub: Df458

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

by Hugues Ross » Sat Jul 06, 2019 10:16

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: 465
Joined: Mon Dec 29, 2014 08:07
Location: USA
GitHub: ShadMOrdre
In-game: shadmordre

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

by ShadMOrdre » Sat Jul 06, 2019 21:13

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.
MY MODS: lib_ecology lib_materials lib_clouds lib_node_shapes ---- Inspired By: Open Source Virtual World Simulator Opensimulator.
 

User avatar
runs
Member
 
Posts: 721
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

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

by runs » Sun Jul 07, 2019 10:32

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

ShadMOrdre
Member
 
Posts: 465
Joined: Mon Dec 29, 2014 08:07
Location: USA
GitHub: ShadMOrdre
In-game: shadmordre

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

by ShadMOrdre » Sat Jul 13, 2019 19:21

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
MY MODS: lib_ecology lib_materials lib_clouds lib_node_shapes ---- Inspired By: Open Source Virtual World Simulator Opensimulator.
 

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

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

by Jessss » Tue Sep 03, 2019 13:25

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 » Tue Sep 03, 2019 13:34

[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: 341
Joined: Thu Nov 09, 2017 05:18
Location: djelibabi
GitHub: PolySaken-I-Am
In-game: PolySaken

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

by PolySaken » Wed Sep 11, 2019 06:15

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>
 


Return to Feature Discussion



Who is online

Users browsing this forum: No registered users and 3 guests