More Aux keys for games and mods

Post Reply
TX Miner
New member
Posts: 7
Joined: Thu Feb 09, 2023 22:37
In-game: TX_Miner

More Aux keys for games and mods

by TX Miner » Post

Recently I have been working on a new game for Minetest, while I was working on it I thought that it would be really helpful if the Minetest Engine had more Aux keys (and mouse buttons) that could be registered to by a game or mod, so that the engine could call a function in the mod when a key is pressed. Some thing like this, maybe:

Code: Select all

minetest.register_aux_key({
	auxnum = [Some Aux key number (keyboard and mouse)],
	action = function(pos, player, [etc.])
	        [Do job assigned to this key]
	end,
})
There are many uses for this, such as a game may want the use of the left hand, so on a 5 button mouse the side buttons could control the left hand, or there could be a key, like sneak, that lets the player crawl without messing with other keys.

User avatar
Blockhead
Member
Posts: 933
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under

Re: More Aux keys for games and mods

by Blockhead » Post

Everyone wants better controls, but nobody has made a PR yet apparently. Here's the most recent GitHub discussion: #12488.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️

TX Miner
New member
Posts: 7
Joined: Thu Feb 09, 2023 22:37
In-game: TX_Miner

Re: More Aux keys for games and mods

by TX Miner » Post

Thank you.

TX Miner
New member
Posts: 7
Joined: Thu Feb 09, 2023 22:37
In-game: TX_Miner

Re: More Aux keys for games and mods

by TX Miner » Post

So, please correct if I'm wrong, there are people that want this feature, but no one has had the time or has had higher priorities, and that is why it doesn't exist yet. If so, I may look into working on it, because it I think this would be really nice to have.

User avatar
Blockhead
Member
Posts: 933
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under

Re: More Aux keys for games and mods

by Blockhead » Post

TX Miner wrote:
Fri Mar 17, 2023 12:20
So, please correct if I'm wrong, there are people that want this feature, but no one has had the time or has had higher priorities, and that is why it doesn't exist yet.
That is correct as far as I understand and after having searched for related issues and PRs for a bit.
TX Miner wrote:
Fri Mar 17, 2023 12:20
If so, I may look into working on it, because it I think this would be really nice to have.
Please do go ahead. That would benefit a lot of people. It is relatively easy for PC but you need to bring forward a design that won't leave mobile players behind either. You should be able to get help familiarising yourself on the "Partly official engine development" forum section. You'll need to understand what input libraries we use and where in the stack - remember that Minetest is split into the core C++ application and the forked irrlichtMt library under that.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️

TX Miner
New member
Posts: 7
Joined: Thu Feb 09, 2023 22:37
In-game: TX_Miner

Re: More Aux keys for games and mods

by TX Miner » Post

Thank you.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests